[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JZ511D20VEPBNB2NMMNB8M":3,"skill-same:01M6JZ511D20VEPBNB2NMMNB8M":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":13,"repositoryHtmlUrl":43,"repositoryHomepageUrl":44,"ownerHtmlUrl":45,"ownerBlogUrl":44,"ownerDescription":6,"updatedAt":46,"install":47,"resources":60},"01M6JZ511D20VEPBNB2NMMNB8M","npc-creation",null,"Create and modify NPCs with branching dialogue trees for MUDdown. Covers the JSON format, dialogue node structure, location binding, mood\u002Fnarrative fields, and the talk command flow.","MUDdown\u002FMUDdown","MUDdown","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F271809841?v=4","01M6JZ2ZZ19Z0NRQS2YHZ57AHZ","01M6JZ303FSH41JFNGAAJSQGDN",2,"MIT","https:\u002F\u002Fgithub.com\u002FMUDdown\u002FMUDdown\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fnpc-creation\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"npc creation","creation","structure","for","with","branching","trees","narrative","binding","create","dialogue","location","command","node","format","json","flow","2026-11-10 10:12:30",false,"---\nname: npc-creation\ndescription: Create and modify NPCs with branching dialogue trees for MUDdown. Covers the JSON format, dialogue node structure, location binding, mood\u002Fnarrative fields, and the talk command flow.\n---\n\n# NPC Creation Skill\n\nYou are creating NPC definitions with dialogue trees for the MUDdown game server. NPCs are JSON files that define characters players can interact with via the `talk` command.\n\n## File Location\n\nNPC definitions: `packages\u002Fserver\u002Fworld\u002Fnpcs\u002F\u003Cnpc-id>.json`\n\nThe `npc-id` in the filename must match the `id` field inside the JSON.\n\n## NPC JSON Schema\n\n```json\n{\n  \"id\": \"npc-id\",\n  \"name\": \"Display Name\",\n  \"description\": \"Text shown when player examines the NPC.\",\n  \"location\": \"room-id\",\n  \"dialogue\": {\n    \"start\": {\n      \"text\": \"Greeting text when player talks to the NPC.\",\n      \"mood\": \"friendly\",\n      \"narrative\": \"Action description in third person.\",\n      \"responses\": [\n        { \"text\": \"Player choice text\", \"next\": \"node-id\" },\n        { \"text\": \"Goodbye\", \"next\": null }\n      ]\n    }\n  }\n}\n```\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `id` | string | Yes | Unique identifier, matches filename |\n| `name` | string | Yes | Display name shown to players |\n| `description` | string | Yes | Examination text |\n| `location` | string | Yes | Room ID where this NPC appears |\n| `dialogue` | object | Yes | Map of node IDs to dialogue nodes |\n\n## Dialogue Node Structure\n\nEach dialogue node has:\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `text` | string | Yes | What the NPC says |\n| `mood` | string | No | Emotional tone (e.g., `\"friendly\"`, `\"worried\"`, `\"conspiratorial\"`) |\n| `narrative` | string | No | Third-person action description; supports Markdown (use `*...*` for italics) |\n| `responses` | array | Yes | Player response choices |\n\nEach response has:\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `text` | string | Yes | Text shown as a clickable choice |\n| `next` | string \\| null | Yes | Next dialogue node ID, or `null` to end conversation |\n\n## Required: The \"start\" Node\n\nEvery NPC **must** have a `\"start\"` dialogue node. The loader validates this and skips NPCs without one. The `talk` command begins at the `\"start\"` node.\n\n## MUDdown Output\n\nWhen a player talks to an NPC, the server emits a `:::dialogue` block:\n\n```markdown\n:::dialogue{npc=\"crier\" mood=\"enthusiastic\"}\n> \"Hear ye, hear ye! Welcome to Northkeep, traveller! What news do you seek?\"\n\n*The town crier straightens his cap and peers at you expectantly.*\n\n## Responses\n- [\"What's happening in town?\"](cmd:talk crier news)\n- [\"Where should I go?\"](cmd:talk crier directions)\n- [\"Never mind.\"](cmd:talk crier end)\n:::\n```\n\nResponse links use `cmd:talk \u003Cnpc-id> \u003Cnext-node>` or `cmd:talk \u003Cnpc-id> end` when `next` is `null`.\n\n## Referencing NPCs in Rooms\n\nAdd the NPC to the room's `## Present` section:\n\n```markdown\n## Present\n- A [town crier](npc:crier) stands near the fountain, ringing a bell.\n```\n\nThe NPC's `location` field must match the room's `id`. The `world-integrity.test.ts` suite validates this cross-reference.\n\n## Name Matching\n\nThe `talk` command uses fuzzy matching (via `findNpcInRoom` in `helpers.ts`):\n\n1. **Exact match** — ID or full name matches query exactly\n2. **Partial match** — ID or name contains the query as a substring\n\nAll comparisons are case-insensitive.\n\n## Complete Example\n\n```json\n{\n  \"id\": \"crier\",\n  \"name\": \"Town Crier\",\n  \"description\": \"A stout man in a feathered cap, clutching a brass bell and a scroll of announcements.\",\n  \"location\": \"town-square\",\n  \"dialogue\": {\n    \"start\": {\n      \"text\": \"Hear ye, hear ye! Welcome to Northkeep, traveller! What news do you seek?\",\n      \"mood\": \"enthusiastic\",\n      \"narrative\": \"The town crier straightens his cap and peers at you expectantly.\",\n      \"responses\": [\n        { \"text\": \"What's happening in town?\", \"next\": \"news\" },\n        { \"text\": \"Where should I go?\", \"next\": \"directions\" },\n        { \"text\": \"Never mind.\", \"next\": null }\n      ]\n    },\n    \"news\": {\n      \"text\": \"Strange lights have been seen near the old ruins to the north!\",\n      \"mood\": \"conspiratorial\",\n      \"narrative\": \"He leans in and lowers his voice.\",\n      \"responses\": [\n        { \"text\": \"Tell me more.\", \"next\": \"ruins\" },\n        { \"text\": \"Thanks for the news.\", \"next\": null }\n      ]\n    },\n    \"ruins\": {\n      \"text\": \"Old Eltharan ruins, they are. The priestess at the temple knows more.\",\n      \"mood\": \"worried\",\n      \"narrative\": \"The crier glances nervously northward.\",\n      \"responses\": [\n        { \"text\": \"I'll look into it.\", \"next\": null }\n      ]\n    },\n    \"directions\": {\n      \"text\": \"The market lies to the east. South leads to the docks. North to the Iron Gate.\",\n      \"mood\": \"helpful\",\n      \"narrative\": \"He gestures grandly in each direction.\",\n      \"responses\": [\n        { \"text\": \"Thanks for the directions.\", \"next\": null }\n      ]\n    }\n  }\n}\n```\n\n## Dialogue Tree Design Tips\n\n- Keep trees **shallow** (2-3 levels deep) to avoid player frustration.\n- Always provide a \"goodbye\" or \"never mind\" option with `\"next\": null`.\n- Use `mood` to convey tone — the client can style dialogue differently based on mood.\n- Use `narrative` for action descriptions — these are italicized in the output.\n- Cross-reference other NPCs\u002Flocations in dialogue `text` to build world connections.\n- Node IDs should be short, descriptive kebab-case: `\"news\"`, `\"smugglers\"`, `\"ask-about-ruins\"`.\n\n## Validation\n\nThe world loader checks:\n1. `id`, `name`, `description`, `location` are all strings.\n2. `dialogue` is an object with at least a `\"start\"` node.\n3. Each node has `text` (string) and `responses` (array).\n4. Each response has `text` (string) and `next` (string or null).\n5. The `location` room exists in the loaded world.\n\nNPCs that fail validation are skipped with a console warning.\n\n## Common Pitfalls\n\n1. **Missing `\"start\"` node** — the NPC will be skipped with a console warning.\n2. **`location` points to nonexistent room** — the NPC still loads at runtime, but `world-integrity.test.ts` will catch this as a failing test. Fix before merging.\n3. **Dangling `next` references** — a response pointing to `\"foo\"` but no `\"foo\"` node exists causes a runtime warning when the player selects it.\n4. **Filename\u002FID mismatch** — `crier.json` must contain `\"id\": \"crier\"`.\n5. **Forgetting to add NPC to room's `## Present`** — the NPC exists but won't appear in room descriptions.\n","# NPC Creation Skill\n\nYou are creating NPC definitions with dialogue trees for the MUDdown game server. NPCs are JSON files that define characters players can interact with via the `talk` command.\n\n## File Location\n\nNPC definitions: `packages\u002Fserver\u002Fworld\u002Fnpcs\u002F\u003Cnpc-id>.json`\n\nThe `npc-id` in the filename must match the `id` field inside the JSON.\n\n## NPC JSON Schema\n\n```json\n{\n  \"id\": \"npc-id\",\n  \"name\": \"Display Name\",\n  \"description\": \"Text shown when player examines the NPC.\",\n  \"location\": \"room-id\",\n  \"dialogue\": {\n    \"start\": {\n      \"text\": \"Greeting text when player talks to the NPC.\",\n      \"mood\": \"friendly\",\n      \"narrative\": \"Action description in third person.\",\n      \"responses\": [\n        { \"text\": \"Player choice text\", \"next\": \"node-id\" },\n        { \"text\": \"Goodbye\", \"next\": null }\n      ]\n    }\n  }\n}\n```\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `id` | string | Yes | Unique identifier, matches filename |\n| `name` | string | Yes | Display name shown to players |\n| `description` | string | Yes | Examination text |\n| `location` | string | Yes | Room ID where this NPC appears |\n| `dialogue` | object | Yes | Map of node IDs to dialogue nodes |\n\n## Dialogue Node Structure\n\nEach dialogue node has:\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `text` | string | Yes | What the NPC says |\n| `mood` | string | No | Emotional tone (e.g., `\"friendly\"`, `\"worried\"`, `\"conspiratorial\"`) |\n| `narrative` | string | No | Third-person action description; supports Markdown (use `*...*` for italics) |\n| `responses` | array | Yes | Player response choices |\n\nEach response has:\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `text` | string | Yes | Text shown as a clickable choice |\n| `next` | string \\| null | Yes | Next dialogue node ID, or `null` to end conversation |\n\n## Required: The \"start\" Node\n\nEvery NPC **must** have a `\"start\"` dialogue node. The loader validates this and skips NPCs without one. The `talk` command begins at the `\"start\"` node.\n\n## MUDdown Output\n\nWhen a player talks to an NPC, the server emits a `:::dialogue` block:\n\n```markdown\n:::dialogue{npc=\"crier\" mood=\"enthusiastic\"}\n> \"Hear ye, hear ye! Welcome to Northkeep, traveller! What news do you seek?\"\n\n*The town crier straightens his cap and peers at you expectantly.*\n\n## Responses\n- [\"What's happening in town?\"](cmd:talk crier news)\n- [\"Where should I go?\"](cmd:talk crier directions)\n- [\"Never mind.\"](cmd:talk crier end)\n:::\n```\n\nResponse links use `cmd:talk \u003Cnpc-id> \u003Cnext-node>` or `cmd:talk \u003Cnpc-id> end` when `next` is `null`.\n\n## Referencing NPCs in Rooms\n\nAdd the NPC to the room's `## Present` section:\n\n```markdown\n## Present\n- A [town crier](npc:crier) stands near the fountain, ringing a bell.\n```\n\nThe NPC's `location` field must match the room's `id`. The `world-integrity.test.ts` suite validates this cross-reference.\n\n## Name Matching\n\nThe `talk` command uses fuzzy matching (via `findNpcInRoom` in `helpers.ts`):\n\n1. **Exact match** — ID or full name matches query exactly\n2. **Partial match** — ID or name contains the query as a substring\n\nAll comparisons are case-insensitive.\n\n## Complete Example\n\n```json\n{\n  \"id\": \"crier\",\n  \"name\": \"Town Crier\",\n  \"description\": \"A stout man in a feathered cap, clutching a brass bell and a scroll of announcements.\",\n  \"location\": \"town-square\",\n  \"dialogue\": {\n    \"start\": {\n      \"text\": \"Hear ye, hear ye! Welcome to Northkeep, traveller! What news do you seek?\",\n      \"mood\": \"enthusiastic\",\n      \"narrative\": \"The town crier straightens his cap and peers at you expectantly.\",\n      \"responses\": [\n        { \"text\": \"What's happening in town?\", \"next\": \"news\" },\n        { \"text\": \"Where should I go?\", \"next\": \"directions\" },\n        { \"text\": \"Never mind.\", \"next\": null }\n      ]\n    },\n    \"news\": {\n      \"text\": \"Strange lights have been seen near the old ruins to the north!\",\n      \"mood\": \"conspiratorial\",\n      \"narrative\": \"He leans in and lowers his voice.\",\n      \"responses\": [\n        { \"text\": \"Tell me more.\", \"next\": \"ruins\" },\n        { \"text\": \"Thanks for the news.\", \"next\": null }\n      ]\n    },\n    \"ruins\": {\n      \"text\": \"Old Eltharan ruins, they are. The priestess at the temple knows more.\",\n      \"mood\": \"worried\",\n      \"narrative\": \"The crier glances nervously northward.\",\n      \"responses\": [\n        { \"text\": \"I'll look into it.\", \"next\": null }\n      ]\n    },\n    \"directions\": {\n      \"text\": \"The market lies to the east. South leads to the docks. North to the Iron Gate.\",\n      \"mood\": \"helpful\",\n      \"narrative\": \"He gestures grandly in each direction.\",\n      \"responses\": [\n        { \"text\": \"Thanks for the directions.\", \"next\": null }\n      ]\n    }\n  }\n}\n```\n\n## Dialogue Tree Design Tips\n\n- Keep trees **shallow** (2-3 levels deep) to avoid player frustration.\n- Always provide a \"goodbye\" or \"never mind\" option with `\"next\": null`.\n- Use `mood` to convey tone — the client can style dialogue differently based on mood.\n- Use `narrative` for action descriptions — these are italicized in the output.\n- Cross-reference other NPCs\u002Flocations in dialogue `text` to build world connections.\n- Node IDs should be short, descriptive kebab-case: `\"news\"`, `\"smugglers\"`, `\"ask-about-ruins\"`.\n\n## Validation\n\nThe world loader checks:\n1. `id`, `name`, `description`, `location` are all strings.\n2. `dialogue` is an object with at least a `\"start\"` node.\n3. Each node has `text` (string) and `responses` (array).\n4. Each response has `text` (string) and `next` (string or null).\n5. The `location` room exists in the loaded world.\n\nNPCs that fail validation are skipped with a console warning.\n\n## Common Pitfalls\n\n1. **Missing `\"start\"` node** — the NPC will be skipped with a console warning.\n2. **`location` points to nonexistent room** — the NPC still loads at runtime, but `world-integrity.test.ts` will catch this as a failing test. Fix before merging.\n3. **Dangling `next` references** — a response pointing to `\"foo\"` but no `\"foo\"` node exists causes a runtime warning when the player selects it.\n4. **Filename\u002FID mismatch** — `crier.json` must contain `\"id\": \"crier\"`.\n5. **Forgetting to add NPC to room's `## Present`** — the NPC exists but won't appear in room descriptions.\n",{"name":5,"description":7},"main","003024ca8f1bd677ce1cf158084703aa98867375",".github\u002Fskills\u002Fnpc-creation","https:\u002F\u002Fgithub.com\u002FMUDdown\u002FMUDdown","https:\u002F\u002Fwww.muddown.com","https:\u002F\u002Fgithub.com\u002FMUDdown","2026-08-06 08:37:36",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add MUDdown\u002FMUDdown --skill npc-creation",{"tool":53,"command":54},"bunx","bunx skills add MUDdown\u002FMUDdown --skill npc-creation",{"tool":56,"command":57},"pnpm","pnpm dlx skills add MUDdown\u002FMUDdown --skill npc-creation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMUDdown\u002FMUDdown\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fnpc-creation\u002FSKILL.md",true,[],[62,81,98,114,135,158],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":35},"01M6JZ5NT4RRHMMEDQTJE0BQFK","testing","Write and maintain tests for MUDdown packages. Covers vitest for the server and parser, fixture helpers, world integrity tests, and testing conventions.","https:\u002F\u002Fgithub.com\u002FMUDdown\u002FMUDdown\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftesting\u002FSKILL.md",[],[64,69,21,70,71,72,73,74,75,76,77,78,79,80],"integrity","tests","testing conventions","fixture","conventions","world","maintain","write","parser","vitest","server","packages",{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":35},"01M6JZ5JM4ZZHTZ2S93S00GCKY","room-creation","Create and modify MUDdown room files. Covers the Markdown+YAML structure, frontmatter fields, container blocks, bidirectional exits, item\u002FNPC references, lighting, and region organization.","https:\u002F\u002Fgithub.com\u002FMUDdown\u002FMUDdown\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Froom-creation\u002FSKILL.md",[],[88,19,27,89,90,91,92,93,94,20,95,96,97],"room creation","yaml","markdown","container","frontmatter","blocks","lighting","organization","references","files",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":35},"01M6JZ5FHRMJ7DFRWS3H3TQY6Y","privacy","Audit and maintain privacy compliance for MUDdown. Covers the privacy policy, data collection practices, cookie\u002Fstorage usage, and compliance testing.","https:\u002F\u002Fgithub.com\u002FMUDdown\u002FMUDdown\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fprivacy\u002FSKILL.md",[],[100,105,106,21,107,108,75,109,110,111,112,113,64],"privacy policy","collection","usage","data collection","data","compliance","audit","storage","policy",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":35},"01M6JZ5C6GZ0H6AD33FJY399M3","persistence","Work with the database abstraction layer and account\u002Fcharacter\u002Fworld persistence. Covers the GameDatabase interface, SQLite adapter, save\u002Fload lifecycle, auth sessions, and testing patterns.","https:\u002F\u002Fgithub.com\u002FMUDdown\u002FMUDdown\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpersistence\u002FSKILL.md",[],[116,121,122,123,124,125,126,74,127,128,129,130,131,132,133,22,134,64],"interface","layer","load","patterns","auth","adapter","character","work","save","sqlite","lifecycle","testing patterns","database","sessions",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":35},"01M6JZ5836SXKR67RCMC83VRDJ","osc8-bridge","Add or modify OSC 8 hyperlink capabilities in the telnet bridge — NEW-ENVIRON (RFC 1572) negotiation, Mudlet\u002FFado\u002FMudForge `send:` URIs, and per-scheme tooltip\u002Fmenu metadata. Covers the capability pipeline from telnet negotiation through renderer output, the sanitization contract, and the word-wrap invariant.","https:\u002F\u002Fgithub.com\u002FMUDdown\u002FMUDdown\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fosc8-bridge\u002FSKILL.md",[],[142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157],"osc8 bridge","bridge","Word","RFC","pipeline","negotiation","metadata","capabilities","wrap","renderer","sanitization","scheme","output","add","osc","contract",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":35},"01M6JZ548282CBBAQBAJ8HNPG2","oauth-provider","Add a new OAuth\u002FOIDC identity provider to MUDdown. Covers the shared type, auth switch statements, server config, login page button, env vars, tests, and local verification.","https:\u002F\u002Fgithub.com\u002FMUDdown\u002FMUDdown\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Foauth-provider\u002FSKILL.md",[],[165,166,167,70,168,155,169,170,171,172,173,174,175,176,79,177,178,179,125],"provider","oauth provider","OAuth","login","env","type","shared","local","switch","page","oidc","env vars","verification","identity","config"]