Token导航 LogoToken导航TokenDH.com
研究检索执行命令clawhub未标认证来源可访问clear审计提醒

query-dbpedia查询数据库百科

Agent Skill

query-dbpedia 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

19,776

周安装

824

GitHub Stars

公开资料未说明

下载量

6,592
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:query-dbpedia(查询数据库百科)
来源仓库:https://github.com/kidehen/query-dbpedia
安装命令:
openclaw skills install query-dbpedia
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install query-dbpedia

简介

将自然语言问题转为 DBpedia SPARQL 查询并生成 HTML 结果页面。

  • 适合用于知识图谱问答与语义检索任务。query-dbpedia 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 通过 clawhub 安装,需确认 SPARQL 端点可用性。
  • 输出结果依赖 DBpedia 数据完整性,复杂查询可能响应较慢。
  • 建议限制单次查询复杂度以避免超时或返回过多结果。

SKILL.md

name
dbpedia-query-skill
description
Transform natural language questions into SPARQL queries for DBpedia and generate beautiful HTML results pages. Query the DBpedia knowledge graph using plain English prompts.

DBpedia Query Skill

When to Use This Skill

Use this skill when users want to:

  • Query DBpedia using natural language
  • Ask questions about people, places, movies, books, organizations, etc.
  • Get structured data from Wikipedia via DBpedia
  • Create visualizations of DBpedia query results
  • Generate HTML reports from SPARQL queries

Core Capabilities

Natural Language to SPARQL: Convert user questions into valid SPARQL queries ✅ Query Execution: Execute queries against DBpedia endpoint ✅ HTML Generation: Create beautiful, interactive HTML result pages ✅ Multiple Output Formats: JSON, Markdown tables, or HTML ✅ Error Handling: Graceful handling of malformed queries or no results

DBpedia Endpoint

SPARQL Endpoint: https://dbpedia.org/sparql Format: JSON results (format=json) Method: HTTP GET with URL-encoded query

Common DBpedia Prefixes

PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX dbp: <http://dbpedia.org/property/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dct: <http://purl.org/dc/terms/>

Query Conversion Workflow

When a user provides a natural language prompt:

1. Analyze the Question

  • Identify the subject (who/what is being asked about)
  • Identify the predicate (what information is requested)
  • Determine if filtering, sorting, or limiting is needed

2. Map to DBpedia Properties

Common mappings:

  • "directed by" → dbo:director
  • "release date" → dbp:date or dbo:releaseDate
  • "budget" → dbo:budget
  • "born in" → dbo:birthPlace
  • "population" → dbo:populationTotal
  • "capital of" → dbo:capital
  • "written by" → dbo:author
  • "starring" → dbo:starring

3. Construct SPARQL Query

Template:

PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?variable ?label
WHERE {
  ?variable <predicate> <object> ;
           rdfs:label ?label .
  FILTER(LANG(?label) = 'en')
}
ORDER BY <sort_criteria>
LIMIT <number>

4. Execute Query

Use curl to execute against DBpedia:

curl -s -G "https://dbpedia.org/sparql" \
  --data-urlencode "query=<SPARQL_QUERY>" \
  --data-urlencode "format=json"

5. Generate Output

Options:

  • JSON: Raw query results
  • Markdown Table: Formatted for terminal display
  • HTML Page: Interactive, styled results page

Example Query Patterns

Pattern 1: Films by Director

User: "Show me movies directed by Christopher Nolan"

SPARQL:

PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?film ?title ?releaseDate
WHERE {
  ?film dbo:director dbr:Christopher_Nolan ;
        a dbo:Film ;
        rdfs:label ?title .
  OPTIONAL { ?film dbo:releaseDate ?releaseDate }
  FILTER(LANG(?title) = 'en')
}
ORDER BY DESC(?releaseDate)

Pattern 2: Population Queries

User: "What are the 10 most populous cities in France?"

SPARQL:

PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?city ?name ?population
WHERE {
  ?city dbo:country dbr:France ;
        a dbo:City ;
        rdfs:label ?name ;
        dbo:populationTotal ?population .
  FILTER(LANG(?name) = 'en')
}
ORDER BY DESC(?population)
LIMIT 10

Pattern 3: Person Information

User: "Tell me about Albert Einstein - when was he born and where?"

SPARQL:

PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?birthDate ?birthPlace ?placeLabel
WHERE {
  dbr:Albert_Einstein dbo:birthDate ?birthDate ;
                      dbo:birthPlace ?birthPlace .
  ?birthPlace rdfs:label ?placeLabel .
  FILTER(LANG(?placeLabel) = 'en')
}

HTML Template Generation

When generating HTML results:

Required Elements

  1. Title: Question or query description
  2. Statistics: Number of results, query execution time
  3. Table: Results with hyperlinked DBpedia URIs
  4. SPARQL Query Display: Show the executed query
  5. Footer: Link to DBpedia, data source attribution

Styling Guidelines

  • Use gradient backgrounds
  • Responsive design (mobile-friendly)
  • Hover effects on table rows
  • Hyperlink all DBpedia resources
  • Color-code different data types
  • Include icons for visual appeal

HTML Template Structure

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>[Query Description] - DBpedia</title>
    <style>
        /* Modern, responsive styling */
        /* Gradient backgrounds */
        /* Hover effects */
        /* Mobile-first design */
    </style>
</head>
<body>
    <div class="container">
        <h1>[Question/Title]</h1>
        <div class="stats">[Results count]</div>
        <table>[Results]</table>
        <div class="sparql-query">[Query code]</div>
        <div class="footer">[Attribution]</div>
    </div>
</body>
</html>

Error Handling

No Results

If query returns 0 results:

  • Inform user clearly
  • Suggest alternative phrasings
  • Check for typos in entity names

Query Errors

If SPARQL syntax error:

  • Display error message
  • Show attempted query
  • Offer to reformulate

Timeout

If query times out:

  • Add LIMIT clause
  • Simplify query complexity
  • Suggest narrowing criteria

Output Preferences

Always ask the user:

"Would you like the results as:
1. JSON (raw data)
2. Markdown table (terminal display)
3. HTML page (interactive visualization)"

Best Practices

  1. Always use DISTINCT: Avoid duplicate results
  2. Filter by language: Use FILTER(LANG(?label) = 'en')
  3. Add LIMIT: Default to LIMIT 100 unless specified
  4. Use OPTIONAL: For properties that may not exist
  5. Order results: Make results meaningful with ORDER BY
  6. Hyperlink in HTML: All DBpedia URIs should be clickable

Example Session

User: "List books written by J.K. Rowling with publication dates"

Assistant: "I'll query DBpedia for books authored by J.K. Rowling.

Executing SPARQL query against DBpedia endpoint..."

[Constructs and executes query]

"Found 15 books! Would you like the results as:

  1. JSON
  2. Markdown table
  3. HTML page"

User: "HTML page"

Assistant: [Generates beautiful HTML page with results]

"✓ HTML page generated and saved to: ./jk_rowling_books.html ✓ 15 books found with publication dates"

Scope

This skill handles:

  • Queries about entities in DBpedia
  • Structured data extraction
  • Result formatting and visualization

This skill does NOT handle:

  • Text search (use DBpedia Lookup API instead)
  • Data modification (read-only queries)
  • Real-time data (DBpedia updates periodically)

Version: 1.0.0 Endpoint: https://dbpedia.org/sparql Data Source: DBpedia (Wikipedia structured data)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

77.75%
按下载量换算5,125

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install query-dbpedia 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills