[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C2NJMVV9G825BHT5ZEEQX6":3,"skill-same:01M6C2NJMVV9G825BHT5ZEEQX6":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":13,"ownerHtmlUrl":54,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":55,"install":56,"resources":69},"01M6C2NJMVV9G825BHT5ZEEQX6","llm-json-schema-documentation","LLM功能JSON Schema文档编写","Document both INPUT and OUTPUT JSON schemas for LLM-driven features to prevent data flow confusion","为 LLM 驱动的功能同时记录输入（INPUT）和输出（OUTPUT）JSON schema，以防止数据流混乱。","jleechanorg\u002Fjleechan-skills","jleechanorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F221404966?v=4","01M6C1VJ99XG950X1DWPEBCBGX",null,"01M6C1VJDK5YVDNT3362RT5WSB",6,"MIT","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-08-27-historical-zero-use\u002Fllm-json-schema-documentation\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发","SCENARIO","使用场景",[30,31,32,33,34,35,36,37,38,39,40,41,42,43],"documentation","json schema","json","schema","llm json schema documentation","flow","data","document","driven","input","output","for","features","data flow","2026-11-10 10:12:30",false,"---\nname: llm-json-schema-documentation\ndescription: Document both INPUT and OUTPUT JSON schemas for LLM-driven features to prevent data flow confusion\n---\n\n# LLM JSON Schema Documentation\n\n**Purpose:** Ensure LLM-driven features have complete schema documentation covering both input (what LLM receives) and output (what LLM returns).\n\n## The Core Principle\n\n**JSON Schema Over Text Instructions** - Tell the LLM what data structures exist, not how to write the content.\n\n## Critical Requirements\n\n### 1. Document BOTH Input and Output Schemas\n\n**Common Mistake:** Documenting only OUTPUT schema while assuming LLM \"just knows\" what INPUT fields are available.\n\n**✅ CORRECT Approach:**\n```markdown\n### Input Schema\nWhen `npc_data` is present in your input, each NPC entry contains:\n- `tier`: (string) Social HP tier - commoner | merchant | noble | god\n- `name`: (string) NPC display name\n- `role`: (string) NPC role\u002Ftitle\n\n### Output Schema\nWhen Social HP is active, populate:\n- `social_hp_challenge.npc_tier`: (string) **Extract from npc_data.tier**\n- `social_hp_challenge.npc_name`: (string) **Extract from npc_data.name**\n```\n\n**❌ WRONG Approach:**\n```markdown\n### Output Schema\n- `social_hp_challenge.npc_tier`: (string) NPC tier\n- `social_hp_challenge.npc_name`: (string) NPC name\n# Missing: Where does the LLM get this data from?\n```\n\n### 2. Link Input to Output with Extraction Notes\n\n**Pattern:**\n- **Input field:** `npc_data.tier`\n- **Output field:** `social_hp_challenge.npc_tier`\n- **Extraction note:** \"Extract from npc_data.tier\"\n\nThis prevents \"where does this data come from?\" confusion.\n\n### 3. Show Examples, Not Templates\n\n**✅ Examples** (Reference - show good patterns):\n```markdown\n**Example Output:**\n```\n[SOCIAL SKILL CHALLENGE: Lady Ashwood]\nObjective: Access family archives\nSocial HP: 5\u002F5 | Status: RESISTING\n```\n```\n\n**❌ Templates** (Prescription - constrains LLM):\n```markdown\n**Required Format:**\n[SOCIAL SKILL CHALLENGE: {npc_name}]\nObjective: {objective}\nSocial HP: {hp}\u002F{max} | Status: {status}\n# This tells LLM HOW to write, reducing autonomy\n```\n\n### 4. Server-Side Validation\n\n**Pattern:** LLM Decides, Server Executes\n```python\ndef validate_output(self):\n    \"\"\"Server validates LLM output structure.\"\"\"\n    # Check required fields exist\n    if not self.social_hp_challenge.get(\"npc_name\"):\n        logging_util.warning(\"Missing required field: npc_name\")\n\n    # Cross-validate JSON with narrative\n    if self.social_hp_challenge and not self.narrative_contains_box():\n        logging_util.warning(\"JSON exists but narrative missing box\")\n```\n\n## Implementation Checklist\n\nWhen adding LLM-driven features:\n\n- [ ] **Document INPUT schema** - What data does the LLM receive?\n  - [ ] List all available input fields\n  - [ ] Document field types and valid values\n  - [ ] Show example input data structure\n\n- [ ] **Document OUTPUT schema** - What data must the LLM return?\n  - [ ] List all required output fields\n  - [ ] Document field types and constraints\n  - [ ] Show example output data structure\n\n- [ ] **Link Input to Output** - How does data flow?\n  - [ ] Add extraction notes: \"Extract from input_field.name\"\n  - [ ] Show mapping between input and output fields\n  - [ ] Document any transformations or calculations\n\n- [ ] **Provide Examples** - Show good patterns (not templates)\n  - [ ] Include narrative examples demonstrating natural integration\n  - [ ] Show JSON alongside narrative (both required)\n  - [ ] Avoid prescriptive templates that constrain LLM\n\n- [ ] **Server Validation** - Enforce structure post-generation\n  - [ ] Validate required fields exist\n  - [ ] Type coercion for numeric\u002Fboolean fields\n  - [ ] Cross-validation between JSON and narrative\n  - [ ] Log warnings for missing\u002Finconsistent data\n\n## Example: Social HP System\n\n**Problem:** LLM didn't know where to get `npc_tier` for output.\n\n**Solution:**\n1. **INPUT schema:** Documented `npc_data.tier` field exists\n2. **OUTPUT schema:** Added `social_hp_challenge.npc_tier` field\n3. **Link:** \"Extract from npc_data.tier\"\n4. **Validation:** Server validates both JSON and narrative exist\n\n**Files Updated:**\n- `$PROJECT_ROOT\u002Fprompts\u002Fgame_state_instruction.md`: INPUT\u002FOUTPUT schemas\n- `$PROJECT_ROOT\u002Fnarrative_response_schema.py`: Server validation\n- `CLAUDE.md`: Architectural principle documentation\n\n## Why This Matters\n\n**Prevents Confusion:**\n- LLM knows what input fields are available to read\n- LLM knows what output fields are expected\n- Clear data flow from input → LLM → output\n\n**Preserves Autonomy:**\n- Schema defines WHAT data exists, not HOW to write content\n- LLM decides narrative format based on context\n- Examples show patterns, not rigid templates\n\n**Enables Validation:**\n- Server can validate structure post-generation\n- Type coercion handles edge cases\n- Cross-validation catches inconsistencies\n\n## Anti-Patterns to Avoid\n\n**❌ Template-Based Instructions**\n```markdown\nWrite exactly this format:\n[SOCIAL SKILL CHALLENGE: {npc_name}]\n```\n*Problem: Reduces LLM autonomy, constrains creativity*\n\n**❌ Undocumented Input Fields**\n```markdown\nReturn npc_tier in your output.\n```\n*Problem: LLM doesn't know where to get this data*\n\n**❌ Missing Extraction Notes**\n```markdown\n- `output.tier`: (string) NPC tier\n```\n*Problem: No link to input field source*\n\n**❌ Pure Text Instructions**\n```markdown\nWhen an NPC resists persuasion, describe their resistance narratively.\n```\n*Problem: No schema - server can't validate or track state*\n\n## Related Documentation\n\n- **CLAUDE.md**: \"JSON Schema Over Text Instructions\" principle\n- **LLM Architecture Principles**: \"LLM Decides, Server Executes\"\n- **Example Implementation**: Social HP PR #2915\n\n---\n\n**Last Updated:** 2025-01-07 (Social HP all-tiers PR)\n","# LLM JSON Schema Documentation\n\n**Purpose:** Ensure LLM-driven features have complete schema documentation covering both input (what LLM receives) and output (what LLM returns).\n\n## The Core Principle\n\n**JSON Schema Over Text Instructions** - Tell the LLM what data structures exist, not how to write the content.\n\n## Critical Requirements\n\n### 1. Document BOTH Input and Output Schemas\n\n**Common Mistake:** Documenting only OUTPUT schema while assuming LLM \"just knows\" what INPUT fields are available.\n\n**✅ CORRECT Approach:**\n```markdown\n### Input Schema\nWhen `npc_data` is present in your input, each NPC entry contains:\n- `tier`: (string) Social HP tier - commoner | merchant | noble | god\n- `name`: (string) NPC display name\n- `role`: (string) NPC role\u002Ftitle\n\n### Output Schema\nWhen Social HP is active, populate:\n- `social_hp_challenge.npc_tier`: (string) **Extract from npc_data.tier**\n- `social_hp_challenge.npc_name`: (string) **Extract from npc_data.name**\n```\n\n**❌ WRONG Approach:**\n```markdown\n### Output Schema\n- `social_hp_challenge.npc_tier`: (string) NPC tier\n- `social_hp_challenge.npc_name`: (string) NPC name\n# Missing: Where does the LLM get this data from?\n```\n\n### 2. Link Input to Output with Extraction Notes\n\n**Pattern:**\n- **Input field:** `npc_data.tier`\n- **Output field:** `social_hp_challenge.npc_tier`\n- **Extraction note:** \"Extract from npc_data.tier\"\n\nThis prevents \"where does this data come from?\" confusion.\n\n### 3. Show Examples, Not Templates\n\n**✅ Examples** (Reference - show good patterns):\n```markdown\n**Example Output:**\n```\n[SOCIAL SKILL CHALLENGE: Lady Ashwood]\nObjective: Access family archives\nSocial HP: 5\u002F5 | Status: RESISTING\n```\n```\n\n**❌ Templates** (Prescription - constrains LLM):\n```markdown\n**Required Format:**\n[SOCIAL SKILL CHALLENGE: {npc_name}]\nObjective: {objective}\nSocial HP: {hp}\u002F{max} | Status: {status}\n# This tells LLM HOW to write, reducing autonomy\n```\n\n### 4. Server-Side Validation\n\n**Pattern:** LLM Decides, Server Executes\n```python\ndef validate_output(self):\n    \"\"\"Server validates LLM output structure.\"\"\"\n    # Check required fields exist\n    if not self.social_hp_challenge.get(\"npc_name\"):\n        logging_util.warning(\"Missing required field: npc_name\")\n\n    # Cross-validate JSON with narrative\n    if self.social_hp_challenge and not self.narrative_contains_box():\n        logging_util.warning(\"JSON exists but narrative missing box\")\n```\n\n## Implementation Checklist\n\nWhen adding LLM-driven features:\n\n- [ ] **Document INPUT schema** - What data does the LLM receive?\n  - [ ] List all available input fields\n  - [ ] Document field types and valid values\n  - [ ] Show example input data structure\n\n- [ ] **Document OUTPUT schema** - What data must the LLM return?\n  - [ ] List all required output fields\n  - [ ] Document field types and constraints\n  - [ ] Show example output data structure\n\n- [ ] **Link Input to Output** - How does data flow?\n  - [ ] Add extraction notes: \"Extract from input_field.name\"\n  - [ ] Show mapping between input and output fields\n  - [ ] Document any transformations or calculations\n\n- [ ] **Provide Examples** - Show good patterns (not templates)\n  - [ ] Include narrative examples demonstrating natural integration\n  - [ ] Show JSON alongside narrative (both required)\n  - [ ] Avoid prescriptive templates that constrain LLM\n\n- [ ] **Server Validation** - Enforce structure post-generation\n  - [ ] Validate required fields exist\n  - [ ] Type coercion for numeric\u002Fboolean fields\n  - [ ] Cross-validation between JSON and narrative\n  - [ ] Log warnings for missing\u002Finconsistent data\n\n## Example: Social HP System\n\n**Problem:** LLM didn't know where to get `npc_tier` for output.\n\n**Solution:**\n1. **INPUT schema:** Documented `npc_data.tier` field exists\n2. **OUTPUT schema:** Added `social_hp_challenge.npc_tier` field\n3. **Link:** \"Extract from npc_data.tier\"\n4. **Validation:** Server validates both JSON and narrative exist\n\n**Files Updated:**\n- `$PROJECT_ROOT\u002Fprompts\u002Fgame_state_instruction.md`: INPUT\u002FOUTPUT schemas\n- `$PROJECT_ROOT\u002Fnarrative_response_schema.py`: Server validation\n- `CLAUDE.md`: Architectural principle documentation\n\n## Why This Matters\n\n**Prevents Confusion:**\n- LLM knows what input fields are available to read\n- LLM knows what output fields are expected\n- Clear data flow from input → LLM → output\n\n**Preserves Autonomy:**\n- Schema defines WHAT data exists, not HOW to write content\n- LLM decides narrative format based on context\n- Examples show patterns, not rigid templates\n\n**Enables Validation:**\n- Server can validate structure post-generation\n- Type coercion handles edge cases\n- Cross-validation catches inconsistencies\n\n## Anti-Patterns to Avoid\n\n**❌ Template-Based Instructions**\n```markdown\nWrite exactly this format:\n[SOCIAL SKILL CHALLENGE: {npc_name}]\n```\n*Problem: Reduces LLM autonomy, constrains creativity*\n\n**❌ Undocumented Input Fields**\n```markdown\nReturn npc_tier in your output.\n```\n*Problem: LLM doesn't know where to get this data*\n\n**❌ Missing Extraction Notes**\n```markdown\n- `output.tier`: (string) NPC tier\n```\n*Problem: No link to input field source*\n\n**❌ Pure Text Instructions**\n```markdown\nWhen an NPC resists persuasion, describe their resistance narratively.\n```\n*Problem: No schema - server can't validate or track state*\n\n## Related Documentation\n\n- **CLAUDE.md**: \"JSON Schema Over Text Instructions\" principle\n- **LLM Architecture Principles**: \"LLM Decides, Server Executes\"\n- **Example Implementation**: Social HP PR #2915\n\n---\n\n**Last Updated:** 2025-01-07 (Social HP all-tiers PR)\n",{"name":5,"description":7},"main","42ccd02cbf5e8e47839dc3eab6fc754dc6b339cf",".claude\u002Fskills_archive\u002F2026-08-27-historical-zero-use\u002Fllm-json-schema-documentation",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-14 14:55:35",{"source":9,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill llm-json-schema-documentation",{"tool":62,"command":63},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill llm-json-schema-documentation",{"tool":65,"command":66},"pnpm","pnpm dlx skills add jleechanorg\u002Fjleechan-skills --skill llm-json-schema-documentation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-08-27-historical-zero-use\u002Fllm-json-schema-documentation\u002FSKILL.md",true,[70],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"ingest.py","SCRIPT","脚本",14027,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-ingest-youtube\u002Fingest.py",[77,85,92,100,108,117],{"skillNo":78,"name":79,"nameZh":13,"description":80,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":84},"01M7DRVZXXMGY4G81K5GVF4V20","disk-reclaim-playbook","Use Disk Magician to diagnose disk growth or qualify cleanup on macOS or Linux.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdisk-reclaim-playbook\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":86,"name":87,"nameZh":13,"description":88,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":84},"01M7B63PNTT2TY78RFKHD8SP3X","claudea-bench","Compare `claudea` and normal `claude` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fclaudea-bench\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":13,"description":95,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":99},"01M7622KQJ32AV4K5BXEMVSSEB","pr","Alias for the canonical pr-lifecycle PR workflow skill (\u002Fpr-workflow, \u002Fprw).","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpr\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":101,"name":102,"nameZh":13,"description":103,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":107},"01M7432W92AKC4D1TKJ00VCMMT","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwhisper\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":109,"name":110,"nameZh":13,"description":111,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":112,"licenseFileUrl":113,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":107},"01M7432T6BN1A9SHB8RBQR5EMP","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":13,"description":120,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":107},"01M7432NDC7S6C6MX7M6RW8CTT","pr-report","This skill should be used when the user asks for a PR report, PR audit, PR delta analysis, \u002Fpr-report, or wants per-PR summary with delta files\u002Flines. Generates a structured report for one or more open PRs covering purpose, files changed, +\u002F− line counts, \u002Fcode-standards + \u002Fthermo review findings, \u002Fponytail simplification opportunities, file-overlap combination candidates, and \u002Fgreen status per pr-green-definition. Output: machine-readable JSONL + human-readable markdown. Read-only by default; can apply simplifications if user opts in.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fpr-report\u002FSKILL.md",[],[]]