[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6NKA7JKVTNWKT38MYQ20SET":3,"skill-same:01M6NKA7JKVTNWKT38MYQ20SET":56},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":28,"linkOnly":29,"markdownContent":30,"markdownBody":31,"frontMatter":32,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M6NKA7JKVTNWKT38MYQ20SET","audit-prompt-schema-sync",null,"joelbarmettlerUZH\u002Fultrainit.sh","joelbarmettlerUZH","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F24369532?v=4","01M6NK9DS0035TVQP3EQ36E14N","Joel Barmettler","01M6NK9DXBM5D1GYV4414HX06T",8,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FjoelbarmettlerUZH\u002Fultrainit.sh\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Faudit-prompt-schema-sync\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25,26,27],"sync","audit","prompt","schema","audit prompt schema sync","2026-11-10 10:12:30",false,"---\nname: audit-prompt-schema-sync\ndescription: \"\n  Cross-validate that every output field described in prompts\u002F*.md exists\n  in the paired schemas\u002F*.json file and vice versa. Use when prompt and\n  schema diverged, agent returns unexpected fields, updating an agent output\n  contract, adding a new field to an existing agent, or agent findings have\n  null values. Do NOT use for synthesis prompts — their schemas store\n  content as opaque strings.\n---\n\n## Before You Start\n\n- `prompts\u002F` — 14 markdown prompt files; output sections describe field names in prose\n- `schemas\u002F` — 14 JSON schema files; `properties` keys are the actual field names\n- `schemas\u002FCLAUDE.md` — notes on which schema issues are known (MCP shape mismatch, developer-answers has no schema)\n\n## The Problem\n\nPrompts describe output fields in prose (\"For each finding, include: name, category, evidence_files\"). Schemas enforce field types. When they drift, the agent either drops fields (prompt describes them but schema doesn't declare them) or returns unexpected fields (schema has them but prompt doesn't describe them). Neither case errors — both silently produce wrong findings.\n\n## Steps\n\n### 1. Extract prompt-described field names\n\nFor each gather prompt, find the output contract section. Look for patterns like \"For each X, determine: field1, field2\" or \"Returns: { field1, field2 }\":\n\n```bash\n# Manually read the output contract in each prompt\ngrep -n 'determine\\|Returns\\|output\\|For each' prompts\u002Fpatterns.md | head -20\ncat prompts\u002Fpatterns.md | grep -A20 'output'\n```\n\n### 2. Extract schema-declared field names\n\n```bash\n# Top-level properties\njq -r '.properties | keys[]' schemas\u002Fpatterns.json\n\n# Properties of array items\njq -r '.properties.patterns.items.properties | keys[]' schemas\u002Fpatterns.json\n```\n\n### 3. Diff the two sets\n\nFor `patterns.md` → `schemas\u002Fpatterns.json`:\n\n```bash\n# Fields in prompt but not schema: agent may emit them, schema drops them\n# Fields in schema but not prompt: agent may not populate them, findings are empty\n\n# Example manual diff for patterns agent:\nprompt_fields=\"name type evidence_files description is_consistent\"\nschema_fields=$(jq -r '.properties.patterns.items.properties | keys[]' schemas\u002Fpatterns.json)\n\nfor f in $prompt_fields; do\n    echo \"$schema_fields\" | grep -q \"^$f$\" || echo \"IN PROMPT, NOT SCHEMA: $f\"\ndone\n```\n\n### 4. Fix the drift\n\nAlways fix both the prompt and schema in the same commit:\n\n**Adding a missing field to schema**:\n```json\n\u002F\u002F In schemas\u002Fpatterns.json, add to items.properties:\n\"new_field\": {\n  \"type\": \"string\",\n  \"description\": \"...\"\n}\n\u002F\u002F Do NOT add to required[] — add as optional\n```\n\n**Removing a field from prompt that schema doesn't support**:\nEdit the prose in `prompts\u002F\u003Cname>.md` to remove the field description from the output section.\n\n### 5. Update the fixture\n\nAfter any schema change, update `tests\u002Ffixtures\u002Ffindings\u002F\u003Cagent-name>.json` to match. Run `make test-all` to catch breakage.\n\n## Verify\n\n```bash\nbash -n lib\u002Fgather.sh\njq empty schemas\u002F\u003Cagent-name>.json\nmake test-unit\n```\n\n## Common Mistakes\n\n1. **`developer-answers.json` has no schema** — it is hand-assembled by `lib\u002Fask.sh`. Any change to field names requires updating all `jq` expressions in `lib\u002Fsynthesize.sh` that read from it.\n\n2. **Two MCP schema shapes exist** — `schemas\u002Fmcp-recommendations.json` has `relevance` and a nested `configuration` object. `schemas\u002Fsynthesis-tooling.json` flattens `command\u002Fargs\u002Fenv`. The synthesizer must reshape MCP data between passes. When debugging MCP config, check both schemas.\n","## Before You Start\n\n- `prompts\u002F` — 14 markdown prompt files; output sections describe field names in prose\n- `schemas\u002F` — 14 JSON schema files; `properties` keys are the actual field names\n- `schemas\u002FCLAUDE.md` — notes on which schema issues are known (MCP shape mismatch, developer-answers has no schema)\n\n## The Problem\n\nPrompts describe output fields in prose (\"For each finding, include: name, category, evidence_files\"). Schemas enforce field types. When they drift, the agent either drops fields (prompt describes them but schema doesn't declare them) or returns unexpected fields (schema has them but prompt doesn't describe them). Neither case errors — both silently produce wrong findings.\n\n## Steps\n\n### 1. Extract prompt-described field names\n\nFor each gather prompt, find the output contract section. Look for patterns like \"For each X, determine: field1, field2\" or \"Returns: { field1, field2 }\":\n\n```bash\n# Manually read the output contract in each prompt\ngrep -n 'determine\\|Returns\\|output\\|For each' prompts\u002Fpatterns.md | head -20\ncat prompts\u002Fpatterns.md | grep -A20 'output'\n```\n\n### 2. Extract schema-declared field names\n\n```bash\n# Top-level properties\njq -r '.properties | keys[]' schemas\u002Fpatterns.json\n\n# Properties of array items\njq -r '.properties.patterns.items.properties | keys[]' schemas\u002Fpatterns.json\n```\n\n### 3. Diff the two sets\n\nFor `patterns.md` → `schemas\u002Fpatterns.json`:\n\n```bash\n# Fields in prompt but not schema: agent may emit them, schema drops them\n# Fields in schema but not prompt: agent may not populate them, findings are empty\n\n# Example manual diff for patterns agent:\nprompt_fields=\"name type evidence_files description is_consistent\"\nschema_fields=$(jq -r '.properties.patterns.items.properties | keys[]' schemas\u002Fpatterns.json)\n\nfor f in $prompt_fields; do\n    echo \"$schema_fields\" | grep -q \"^$f$\" || echo \"IN PROMPT, NOT SCHEMA: $f\"\ndone\n```\n\n### 4. Fix the drift\n\nAlways fix both the prompt and schema in the same commit:\n\n**Adding a missing field to schema**:\n```json\n\u002F\u002F In schemas\u002Fpatterns.json, add to items.properties:\n\"new_field\": {\n  \"type\": \"string\",\n  \"description\": \"...\"\n}\n\u002F\u002F Do NOT add to required[] — add as optional\n```\n\n**Removing a field from prompt that schema doesn't support**:\nEdit the prose in `prompts\u002F\u003Cname>.md` to remove the field description from the output section.\n\n### 5. Update the fixture\n\nAfter any schema change, update `tests\u002Ffixtures\u002Ffindings\u002F\u003Cagent-name>.json` to match. Run `make test-all` to catch breakage.\n\n## Verify\n\n```bash\nbash -n lib\u002Fgather.sh\njq empty schemas\u002F\u003Cagent-name>.json\nmake test-unit\n```\n\n## Common Mistakes\n\n1. **`developer-answers.json` has no schema** — it is hand-assembled by `lib\u002Fask.sh`. Any change to field names requires updating all `jq` expressions in `lib\u002Fsynthesize.sh` that read from it.\n\n2. **Two MCP schema shapes exist** — `schemas\u002Fmcp-recommendations.json` has `relevance` and a nested `configuration` object. `schemas\u002Fsynthesis-tooling.json` flattens `command\u002Fargs\u002Fenv`. The synthesizer must reshape MCP data between passes. When debugging MCP config, check both schemas.\n",{},"main","197708b955e457c87d304fdf3389621f7e2f202a",".claude\u002Fskills\u002Faudit-prompt-schema-sync",1,"https:\u002F\u002Fgithub.com\u002FjoelbarmettlerUZH\u002Fultrainit.sh","https:\u002F\u002Fgithub.com\u002FjoelbarmettlerUZH","https:\u002F\u002Fjoelbarmettler.xyz","M. Sc. Artificial Intelligence \r\n& Senior A.I. Architect","2026-11-02 02:33:53",{"source":7,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add joelbarmettlerUZH\u002Fultrainit.sh --skill audit-prompt-schema-sync",{"tool":48,"command":49},"bunx","bunx skills add joelbarmettlerUZH\u002Fultrainit.sh --skill audit-prompt-schema-sync",{"tool":51,"command":52},"pnpm","pnpm dlx skills add joelbarmettlerUZH\u002Fultrainit.sh --skill audit-prompt-schema-sync","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FjoelbarmettlerUZH\u002Fultrainit.sh\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Faudit-prompt-schema-sync\u002FSKILL.md",true,[],[57,87,97,112,122,132],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":67,"publishedAt":28},"01M6NKEDBGZBAT592SECRS8E4N","valid-skill","Use when building or modifying API endpoints in src\u002Fapi\u002F. Covers route creation, middleware wiring, and request validation. Do NOT use for frontend components or static pages.","https:\u002F\u002Fgithub.com\u002FjoelbarmettlerUZH\u002Fultrainit.sh\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fvalid-skill\u002FSKILL.md",[63,66],{"categoryNo":64,"categoryName":65,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86],"valid","valid skill","endpoints","request","do","route","creation","pages","middleware","frontend components","for","wiring","static","use","src","api","validation","components","frontend",{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":93,"publishedAt":28},"01M6NKEAC2NAMBFHT0S0PRYQKN","invalid-skill-no-desc","https:\u002F\u002Fgithub.com\u002FjoelbarmettlerUZH\u002Fultrainit.sh\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Finvalid-skill-no-desc\u002FSKILL.md",[92],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[94,95,96],"invalid skill no desc","invalid","invalid skill",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":104,"publishedAt":28},"01M6NKE7MF1YCS3WCQA5AY3ZXP","invalid-skill-angle-brackets","Use when working with \u003Ccomponent> templates. Do NOT use for \u003Cother> things.","https:\u002F\u002Fgithub.com\u002FjoelbarmettlerUZH\u002Fultrainit.sh\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Finvalid-skill-angle-brackets\u002FSKILL.md",[103],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[105,106,107,95,96,108,109,78,110,72,81,111],"invalid skill angle brackets","angle brackets","brackets","component","things","with","templates",{"skillNo":113,"name":114,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":28},"01M6NKE4EJ5EWNN7S5FJ1SFZR5","validate-generated-artifact","https:\u002F\u002Fgithub.com\u002FjoelbarmettlerUZH\u002Fultrainit.sh\u002Fblob\u002Fmain\u002F.ultrainit\u002Fvalidation\u002Fskills\u002Fvalidate-generated-artifact\u002FSKILL.md",[],[118,119,120,121],"validate generated artifact","artifact","generated","validate",{"skillNo":123,"name":124,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":28},"01M6NKE157C519F1W8WHGXPRTK","tune-synthesis-context","https:\u002F\u002Fgithub.com\u002FjoelbarmettlerUZH\u002Fultrainit.sh\u002Fblob\u002Fmain\u002F.ultrainit\u002Fvalidation\u002Fskills\u002Ftune-synthesis-context\u002FSKILL.md",[],[128,129,130,131],"tune synthesis context","tune","Synthesis","context",{"skillNo":133,"name":134,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":28},"01M6NKDT0VD32KKE2HTHT30FWH","run-tests","https:\u002F\u002Fgithub.com\u002FjoelbarmettlerUZH\u002Fultrainit.sh\u002Fblob\u002Fmain\u002F.ultrainit\u002Fvalidation\u002Fskills\u002Frun-tests\u002FSKILL.md",[],[138,139,140],"run","run tests","tests"]