{
  "schemaVersion": "1.0",
  "item": {
    "slug": "query-dbpedia",
    "name": "Query DBpedia using Natural Language",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/kidehen/query-dbpedia",
    "canonicalUrl": "https://clawhub.ai/kidehen/query-dbpedia",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/query-dbpedia",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=query-dbpedia",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "christopher_nolan_films.html",
      "README.md",
      "examples/sample-queries.md",
      "SKILL.md",
      "templates/html-template.html"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/query-dbpedia"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/query-dbpedia",
    "agentPageUrl": "https://openagent3.xyz/skills/query-dbpedia/agent",
    "manifestUrl": "https://openagent3.xyz/skills/query-dbpedia/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/query-dbpedia/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "When to Use This Skill",
        "body": "Use this skill when users want to:\n\nQuery DBpedia using natural language\nAsk questions about people, places, movies, books, organizations, etc.\nGet structured data from Wikipedia via DBpedia\nCreate visualizations of DBpedia query results\nGenerate HTML reports from SPARQL queries"
      },
      {
        "title": "Core Capabilities",
        "body": "✅ Natural Language to SPARQL: Convert user questions into valid SPARQL queries\n✅ Query Execution: Execute queries against DBpedia endpoint\n✅ HTML Generation: Create beautiful, interactive HTML result pages\n✅ Multiple Output Formats: JSON, Markdown tables, or HTML\n✅ Error Handling: Graceful handling of malformed queries or no results"
      },
      {
        "title": "DBpedia Endpoint",
        "body": "SPARQL Endpoint: https://dbpedia.org/sparql\nFormat: JSON results (format=json)\nMethod: HTTP GET with URL-encoded query"
      },
      {
        "title": "Common DBpedia Prefixes",
        "body": "PREFIX dbo: <http://dbpedia.org/ontology/>\nPREFIX dbr: <http://dbpedia.org/resource/>\nPREFIX dbp: <http://dbpedia.org/property/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX foaf: <http://xmlns.com/foaf/0.1/>\nPREFIX dct: <http://purl.org/dc/terms/>"
      },
      {
        "title": "Query Conversion Workflow",
        "body": "When a user provides a natural language prompt:"
      },
      {
        "title": "1. Analyze the Question",
        "body": "Identify the subject (who/what is being asked about)\nIdentify the predicate (what information is requested)\nDetermine if filtering, sorting, or limiting is needed"
      },
      {
        "title": "2. Map to DBpedia Properties",
        "body": "Common mappings:\n\n\"directed by\" → dbo:director\n\"release date\" → dbp:date or dbo:releaseDate\n\"budget\" → dbo:budget\n\"born in\" → dbo:birthPlace\n\"population\" → dbo:populationTotal\n\"capital of\" → dbo:capital\n\"written by\" → dbo:author\n\"starring\" → dbo:starring"
      },
      {
        "title": "3. Construct SPARQL Query",
        "body": "Template:\n\nPREFIX dbo: <http://dbpedia.org/ontology/>\nPREFIX dbr: <http://dbpedia.org/resource/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\nSELECT DISTINCT ?variable ?label\nWHERE {\n  ?variable <predicate> <object> ;\n           rdfs:label ?label .\n  FILTER(LANG(?label) = 'en')\n}\nORDER BY <sort_criteria>\nLIMIT <number>"
      },
      {
        "title": "4. Execute Query",
        "body": "Use curl to execute against DBpedia:\n\ncurl -s -G \"https://dbpedia.org/sparql\" \\\n  --data-urlencode \"query=<SPARQL_QUERY>\" \\\n  --data-urlencode \"format=json\""
      },
      {
        "title": "5. Generate Output",
        "body": "Options:\n\nJSON: Raw query results\nMarkdown Table: Formatted for terminal display\nHTML Page: Interactive, styled results page"
      },
      {
        "title": "Pattern 1: Films by Director",
        "body": "User: \"Show me movies directed by Christopher Nolan\"\n\nSPARQL:\n\nPREFIX dbo: <http://dbpedia.org/ontology/>\nPREFIX dbr: <http://dbpedia.org/resource/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\nSELECT DISTINCT ?film ?title ?releaseDate\nWHERE {\n  ?film dbo:director dbr:Christopher_Nolan ;\n        a dbo:Film ;\n        rdfs:label ?title .\n  OPTIONAL { ?film dbo:releaseDate ?releaseDate }\n  FILTER(LANG(?title) = 'en')\n}\nORDER BY DESC(?releaseDate)"
      },
      {
        "title": "Pattern 2: Population Queries",
        "body": "User: \"What are the 10 most populous cities in France?\"\n\nSPARQL:\n\nPREFIX dbo: <http://dbpedia.org/ontology/>\nPREFIX dbr: <http://dbpedia.org/resource/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\nSELECT ?city ?name ?population\nWHERE {\n  ?city dbo:country dbr:France ;\n        a dbo:City ;\n        rdfs:label ?name ;\n        dbo:populationTotal ?population .\n  FILTER(LANG(?name) = 'en')\n}\nORDER BY DESC(?population)\nLIMIT 10"
      },
      {
        "title": "Pattern 3: Person Information",
        "body": "User: \"Tell me about Albert Einstein - when was he born and where?\"\n\nSPARQL:\n\nPREFIX dbo: <http://dbpedia.org/ontology/>\nPREFIX dbr: <http://dbpedia.org/resource/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\nSELECT ?birthDate ?birthPlace ?placeLabel\nWHERE {\n  dbr:Albert_Einstein dbo:birthDate ?birthDate ;\n                      dbo:birthPlace ?birthPlace .\n  ?birthPlace rdfs:label ?placeLabel .\n  FILTER(LANG(?placeLabel) = 'en')\n}"
      },
      {
        "title": "HTML Template Generation",
        "body": "When generating HTML results:"
      },
      {
        "title": "Required Elements",
        "body": "Title: Question or query description\nStatistics: Number of results, query execution time\nTable: Results with hyperlinked DBpedia URIs\nSPARQL Query Display: Show the executed query\nFooter: Link to DBpedia, data source attribution"
      },
      {
        "title": "Styling Guidelines",
        "body": "Use gradient backgrounds\nResponsive design (mobile-friendly)\nHover effects on table rows\nHyperlink all DBpedia resources\nColor-code different data types\nInclude icons for visual appeal"
      },
      {
        "title": "HTML Template Structure",
        "body": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>[Query Description] - DBpedia</title>\n    <style>\n        /* Modern, responsive styling */\n        /* Gradient backgrounds */\n        /* Hover effects */\n        /* Mobile-first design */\n    </style>\n</head>\n<body>\n    <div class=\"container\">\n        <h1>[Question/Title]</h1>\n        <div class=\"stats\">[Results count]</div>\n        <table>[Results]</table>\n        <div class=\"sparql-query\">[Query code]</div>\n        <div class=\"footer\">[Attribution]</div>\n    </div>\n</body>\n</html>"
      },
      {
        "title": "No Results",
        "body": "If query returns 0 results:\n\nInform user clearly\nSuggest alternative phrasings\nCheck for typos in entity names"
      },
      {
        "title": "Query Errors",
        "body": "If SPARQL syntax error:\n\nDisplay error message\nShow attempted query\nOffer to reformulate"
      },
      {
        "title": "Timeout",
        "body": "If query times out:\n\nAdd LIMIT clause\nSimplify query complexity\nSuggest narrowing criteria"
      },
      {
        "title": "Output Preferences",
        "body": "Always ask the user:\n\n\"Would you like the results as:\n1. JSON (raw data)\n2. Markdown table (terminal display)\n3. HTML page (interactive visualization)\""
      },
      {
        "title": "Best Practices",
        "body": "Always use DISTINCT: Avoid duplicate results\nFilter by language: Use FILTER(LANG(?label) = 'en')\nAdd LIMIT: Default to LIMIT 100 unless specified\nUse OPTIONAL: For properties that may not exist\nOrder results: Make results meaningful with ORDER BY\nHyperlink in HTML: All DBpedia URIs should be clickable"
      },
      {
        "title": "Example Session",
        "body": "User: \"List books written by J.K. Rowling with publication dates\"\n\nAssistant:\n\"I'll query DBpedia for books authored by J.K. Rowling.\n\nExecuting SPARQL query against DBpedia endpoint...\"\n\n[Constructs and executes query]\n\n\"Found 15 books! Would you like the results as:\n\nJSON\nMarkdown table\nHTML page\"\n\nUser: \"HTML page\"\n\nAssistant:\n[Generates beautiful HTML page with results]\n\n\"✓ HTML page generated and saved to: ./jk_rowling_books.html\n✓ 15 books found with publication dates\""
      },
      {
        "title": "Scope",
        "body": "This skill handles:\n\nQueries about entities in DBpedia\nStructured data extraction\nResult formatting and visualization\n\nThis skill does NOT handle:\n\nText search (use DBpedia Lookup API instead)\nData modification (read-only queries)\nReal-time data (DBpedia updates periodically)\n\nVersion: 1.0.0\nEndpoint: https://dbpedia.org/sparql\nData Source: DBpedia (Wikipedia structured data)"
      }
    ],
    "body": "DBpedia Query Skill\nWhen to Use This Skill\n\nUse this skill when users want to:\n\nQuery DBpedia using natural language\nAsk questions about people, places, movies, books, organizations, etc.\nGet structured data from Wikipedia via DBpedia\nCreate visualizations of DBpedia query results\nGenerate HTML reports from SPARQL queries\nCore Capabilities\n\n✅ 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\n\nDBpedia Endpoint\n\nSPARQL Endpoint: https://dbpedia.org/sparql Format: JSON results (format=json) Method: HTTP GET with URL-encoded query\n\nCommon DBpedia Prefixes\nPREFIX dbo: <http://dbpedia.org/ontology/>\nPREFIX dbr: <http://dbpedia.org/resource/>\nPREFIX dbp: <http://dbpedia.org/property/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX foaf: <http://xmlns.com/foaf/0.1/>\nPREFIX dct: <http://purl.org/dc/terms/>\n\nQuery Conversion Workflow\n\nWhen a user provides a natural language prompt:\n\n1. Analyze the Question\nIdentify the subject (who/what is being asked about)\nIdentify the predicate (what information is requested)\nDetermine if filtering, sorting, or limiting is needed\n2. Map to DBpedia Properties\n\nCommon mappings:\n\n\"directed by\" → dbo:director\n\"release date\" → dbp:date or dbo:releaseDate\n\"budget\" → dbo:budget\n\"born in\" → dbo:birthPlace\n\"population\" → dbo:populationTotal\n\"capital of\" → dbo:capital\n\"written by\" → dbo:author\n\"starring\" → dbo:starring\n3. Construct SPARQL Query\n\nTemplate:\n\nPREFIX dbo: <http://dbpedia.org/ontology/>\nPREFIX dbr: <http://dbpedia.org/resource/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\nSELECT DISTINCT ?variable ?label\nWHERE {\n  ?variable <predicate> <object> ;\n           rdfs:label ?label .\n  FILTER(LANG(?label) = 'en')\n}\nORDER BY <sort_criteria>\nLIMIT <number>\n\n4. Execute Query\n\nUse curl to execute against DBpedia:\n\ncurl -s -G \"https://dbpedia.org/sparql\" \\\n  --data-urlencode \"query=<SPARQL_QUERY>\" \\\n  --data-urlencode \"format=json\"\n\n5. Generate Output\n\nOptions:\n\nJSON: Raw query results\nMarkdown Table: Formatted for terminal display\nHTML Page: Interactive, styled results page\nExample Query Patterns\nPattern 1: Films by Director\n\nUser: \"Show me movies directed by Christopher Nolan\"\n\nSPARQL:\n\nPREFIX dbo: <http://dbpedia.org/ontology/>\nPREFIX dbr: <http://dbpedia.org/resource/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\nSELECT DISTINCT ?film ?title ?releaseDate\nWHERE {\n  ?film dbo:director dbr:Christopher_Nolan ;\n        a dbo:Film ;\n        rdfs:label ?title .\n  OPTIONAL { ?film dbo:releaseDate ?releaseDate }\n  FILTER(LANG(?title) = 'en')\n}\nORDER BY DESC(?releaseDate)\n\nPattern 2: Population Queries\n\nUser: \"What are the 10 most populous cities in France?\"\n\nSPARQL:\n\nPREFIX dbo: <http://dbpedia.org/ontology/>\nPREFIX dbr: <http://dbpedia.org/resource/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\nSELECT ?city ?name ?population\nWHERE {\n  ?city dbo:country dbr:France ;\n        a dbo:City ;\n        rdfs:label ?name ;\n        dbo:populationTotal ?population .\n  FILTER(LANG(?name) = 'en')\n}\nORDER BY DESC(?population)\nLIMIT 10\n\nPattern 3: Person Information\n\nUser: \"Tell me about Albert Einstein - when was he born and where?\"\n\nSPARQL:\n\nPREFIX dbo: <http://dbpedia.org/ontology/>\nPREFIX dbr: <http://dbpedia.org/resource/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\nSELECT ?birthDate ?birthPlace ?placeLabel\nWHERE {\n  dbr:Albert_Einstein dbo:birthDate ?birthDate ;\n                      dbo:birthPlace ?birthPlace .\n  ?birthPlace rdfs:label ?placeLabel .\n  FILTER(LANG(?placeLabel) = 'en')\n}\n\nHTML Template Generation\n\nWhen generating HTML results:\n\nRequired Elements\nTitle: Question or query description\nStatistics: Number of results, query execution time\nTable: Results with hyperlinked DBpedia URIs\nSPARQL Query Display: Show the executed query\nFooter: Link to DBpedia, data source attribution\nStyling Guidelines\nUse gradient backgrounds\nResponsive design (mobile-friendly)\nHover effects on table rows\nHyperlink all DBpedia resources\nColor-code different data types\nInclude icons for visual appeal\nHTML Template Structure\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>[Query Description] - DBpedia</title>\n    <style>\n        /* Modern, responsive styling */\n        /* Gradient backgrounds */\n        /* Hover effects */\n        /* Mobile-first design */\n    </style>\n</head>\n<body>\n    <div class=\"container\">\n        <h1>[Question/Title]</h1>\n        <div class=\"stats\">[Results count]</div>\n        <table>[Results]</table>\n        <div class=\"sparql-query\">[Query code]</div>\n        <div class=\"footer\">[Attribution]</div>\n    </div>\n</body>\n</html>\n\nError Handling\nNo Results\n\nIf query returns 0 results:\n\nInform user clearly\nSuggest alternative phrasings\nCheck for typos in entity names\nQuery Errors\n\nIf SPARQL syntax error:\n\nDisplay error message\nShow attempted query\nOffer to reformulate\nTimeout\n\nIf query times out:\n\nAdd LIMIT clause\nSimplify query complexity\nSuggest narrowing criteria\nOutput Preferences\n\nAlways ask the user:\n\n\"Would you like the results as:\n1. JSON (raw data)\n2. Markdown table (terminal display)\n3. HTML page (interactive visualization)\"\n\nBest Practices\nAlways use DISTINCT: Avoid duplicate results\nFilter by language: Use FILTER(LANG(?label) = 'en')\nAdd LIMIT: Default to LIMIT 100 unless specified\nUse OPTIONAL: For properties that may not exist\nOrder results: Make results meaningful with ORDER BY\nHyperlink in HTML: All DBpedia URIs should be clickable\nExample Session\n\nUser: \"List books written by J.K. Rowling with publication dates\"\n\nAssistant: \"I'll query DBpedia for books authored by J.K. Rowling.\n\nExecuting SPARQL query against DBpedia endpoint...\"\n\n[Constructs and executes query]\n\n\"Found 15 books! Would you like the results as:\n\nJSON\nMarkdown table\nHTML page\"\n\nUser: \"HTML page\"\n\nAssistant: [Generates beautiful HTML page with results]\n\n\"✓ HTML page generated and saved to: ./jk_rowling_books.html ✓ 15 books found with publication dates\"\n\nScope\n\nThis skill handles:\n\nQueries about entities in DBpedia\nStructured data extraction\nResult formatting and visualization\n\nThis skill does NOT handle:\n\nText search (use DBpedia Lookup API instead)\nData modification (read-only queries)\nReal-time data (DBpedia updates periodically)\n\nVersion: 1.0.0 Endpoint: https://dbpedia.org/sparql Data Source: DBpedia (Wikipedia structured data)"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/kidehen/query-dbpedia",
    "publisherUrl": "https://clawhub.ai/kidehen/query-dbpedia",
    "owner": "kidehen",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/query-dbpedia",
    "downloadUrl": "https://openagent3.xyz/downloads/query-dbpedia",
    "agentUrl": "https://openagent3.xyz/skills/query-dbpedia/agent",
    "manifestUrl": "https://openagent3.xyz/skills/query-dbpedia/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/query-dbpedia/agent.md"
  }
}