Files
api-duneawa/SKILL.md
2026-05-11 00:37:54 +02:00

3.2 KiB

Dune API Skill For OpenClaw Agents

Use https://dune.api.coppnic.cc as the API base URL.

Prefer detailed singular datasets for OpenClaw because they contain complete Questlog single-record payloads in raw:

GET /api/item/{id}
GET /api/skill/{id}
GET /api/recipe/{id}
GET /api/placeable/{id}
GET /api/npc/{id}

Examples:

GET /api/item/LongRifle_Unique_Poison_03?language=en
GET /api/item/Bloodsack_02?language=en
GET /api/skill/skills_ability_poisonmine?language=en
GET /api/recipe/Bloodsack_2_Recipe?language=en
GET /api/placeable/Atre_Banner_Placeable?language=en
GET /api/npc/bs43q?language=en
GET /api/search?q=poison&datasets=item,skill,recipe&language=en

Supported languages are en and de.

Detailed public datasets:

item, skill, recipe, placeable, npc

Plural summary datasets:

items, skills, recipes, placeables, npcs

Use singular datasets for complete stats and relationships. Use plural datasets only when a compact Questlog page-summary record is enough.

Discord Output Contract

When OpenClaw asks for an answer intended for Discord, return Discord embed JSON instead of plain text. The bot should be able to send the returned payload directly.

Use this shape:

{
	"embeds": [
		{
			"title": "Assassin's Rifle",
			"url": "https://dune.api.coppnic.cc/api/item/LongRifle_Unique_Poison_03?language=en",
			"description": "Short useful summary for Discord.",
			"color": 15198183,
			"fields": [
				{ "name": "Dataset", "value": "item", "inline": true },
				{ "name": "Language", "value": "en", "inline": true },
				{ "name": "Source ID", "value": "LongRifle_Unique_Poison_03", "inline": false }
			],
			"footer": { "text": "Dune API" }
		}
	]
}

Embed rules:

  • Use name or raw.name as the embed title.
  • Use the matching Dune API URL as the embed URL.
  • Keep descriptions short; do not dump the full raw object.
  • Put compact facts in fields and omit empty fields.
  • Return at most 5 embeds for search results.
  • Keep field values below Discord limits.
  • Use decimal colors: item 15198183, skill 3447003, recipe 5763719, placeable 15844367, npc 10181046.

Dataset field ideas:

  • item: grade, category, subcategory, weapon stats, armor stats, fillable stats.
  • skill: category, subcategory, max skill level, level bonuses.
  • recipe: output items, input items, crafting time, required stations.
  • placeable: category, power, water, supported production types.
  • npc: category, tags, description.

Repository guide:

src/datasets.js                 Dataset keys, collections, Questlog methods, API allowlists.
src/importer/questlogClient.js   Questlog URL building and TRPC response extraction.
src/importer/importer.js         Import orchestration, detail fetches, Mongo upserts.
src/db/indexes.js                Mongo indexes for summary and singular collections.
src/routes/api.js                REST API routes, search, dataset lookup behavior.
src/swagger/openapi.js           OpenAPI/Swagger documentation.
src/app.js                       Express middleware and public top-level routes.
scripts/import.js                CLI import entry point.

Useful checks:

GET /health
GET /api/datasets
GET /SKILL.md