[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F7S7FJRDSH68C99XDMQTBX":3,"skill-same:01M7F7S7FJRDSH68C99XDMQTBX":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":14,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":47,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M7F7S7FJRDSH68C99XDMQTBX","prompt-contract-maintenance",null,"Use when editing multi-pass LLM prompt contracts.","chaorenex1\u002Fhermes-home-content","chaorenex1","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F23194925?v=4","01M7F5NA1D1D02R2MEMYQN2NZT","chan chan","01M7F5NA20KTHMTY2015CYM1TZ",0,"MIT","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Fprompt-contract-maintenance\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\r\nname: prompt-contract-maintenance\r\ndescription: \"Use when editing multi-pass LLM prompt contracts.\"\r\nversion: 1.0.0\r\nauthor: Hermes Agent\r\nlicense: MIT\r\nplatforms: [linux, macos, windows]\r\nmetadata:\r\n  hermes:\r\n    tags: [prompts, llm-pipelines, structured-output, schema, prompt-audit]\r\n    related_skills: [test-driven-development, systematic-debugging, prompt-engineer]\r\n---\r\n\r\n# Prompt Contract Maintenance\r\n\r\nIn a multi-pass LLM pipeline a prompt is an API: the system prompt states a shape, the parser\r\nenforces a shape, and the store persists it. Changing one without the others ships a model reply\r\nnothing accepts, or a rule the guard makes unreachable.\r\n\r\n## When to use\r\n\r\n- Adding or reworking sections of a layer \u002F reviewer \u002F adviser prompt.\r\n- Unifying vocabulary across passes (entity or marker types, advice targets, severity levels).\r\n- Changing an output contract: allowing empty values, renaming keys, new count or length caps.\r\n- Auditing why a prompt's stated rule never takes effect in stored artifacts.\r\n- Explaining another project's prompt architecture (usually: file:line map + structure read-out,\r\n  verbatim text only on request). For a shipped agent whose prompts travel inside a binary or an\r\n  installed package, follow `references\u002Fforeign-prompt-architecture.md` — version-pinned extraction,\r\n  provenance hash, composition map before any text dump.\r\n\r\n## Workflow\r\n\r\n1. **Inventory before editing.** Grep the prompt constants, then for each one find: the call that\r\n   passes it as the system message, the user-message builder that supplies its input blocks, the\r\n   parse\u002Fnormalize function that consumes the reply, and the store writer. Write the\r\n   prompt → parser → store triple per pass. A section cannot be judged without its consumer.\r\n\r\n2. **Section skeleton**, in this order:\r\n   - `ROLE` — what the pass owns, plus an explicit \"what you are not\" line (not the assistant, not\r\n     the implementer, not a second writer).\r\n   - `INPUTS` + `TRUST ORDER` — the blocks that actually arrive, ranked.\r\n   - `WORKFLOW` — numbered steps naming those blocks in the order the builder emits them.\r\n   - JSON shape, `OUTPUT CONTRACT`, per-topic rules, then `DEFINITIONS` last.\r\n   - Definitions go last so the body reads top-down while the reference block stays self-contained\r\n     even though its text is generated once and shared.\r\n\r\n3. **Single-source every shared vocabulary.** Put the table in the lightest shared module (prompt\r\n   formatting module, not the store), expose `glossary()` \u002F `section()` string builders, and\r\n   compose every prompt that mentions the vocabulary from them. Four hand-written copies of the\r\n   same five type definitions drift within one release. Attach the generated sections to the\r\n   shared contract constant itself when several prompts compose it (cold start, audit, reconcile,\r\n   retry): a section appended only in the primary system-prompt composer silently disappears\r\n   from every variant.\r\n\r\n4. **Compose, never f-string a prompt that embeds JSON.** Braces in the example object collide with\r\n   replacement fields, and doubling every brace is silent-corruption risk. Attach generated\r\n   sections by concatenation: `\"\"\"static body\"\"\" + \"\\n\\n\" + marker_section()`. The same rule kills\r\n   placeholder-then-`replace()` schemes.\r\n\r\n5. **Audit prompt ↔ parser symmetry** before declaring the edit done — see\r\n   `references\u002Fprompt-audit-checklist.md` for the check matrix and commands. The recurring misses:\r\n   a count or character limit stated in the prompt but enforced wider (or narrower) by the parser;\r\n   a \"you are given X\" claim the builder does not supply; a section order claim that does not\r\n   match the built message.\r\n\r\n6. **Move behaviour end-to-end when the rule is semantic.** A rule like \"an empty listed field\r\n   clears the card\" needs four edits in one change: prompt text, parser\u002Fguard, store write, and\r\n   README. Keep the neighbouring negative path (placeholder or unlisted empty = not a correction)\r\n   and test both.\r\n\r\n7. **Verify with the repo's own suite.** Prove pre-existing failures with a clean tree instead of\r\n   guessing (`git worktree add \u003Cdir> HEAD`), and treat full-suite-only failures as flakes after one\r\n   isolated rerun. Report the failing test name, its real cause, and whether it predates the change.\r\n\r\n## Pitfalls\r\n\r\n- **Section text contradicts the builder.** A ROLE line claiming \"the window is the only evidence\"\r\n  while the builder also supplies a first-message anchor and operator files teaches the model to\r\n  ignore evidence you feed it. Read the builder before writing any inputs\u002Ftrust claim.\r\n- **The guard makes the new rule dead on arrival.** A review that rejects empty cards can never\r\n  clear one; a parser that drops `[unknown]` items cannot accept a placeholder rule. Change guard\r\n  and prompt together and keep both branches tested.\r\n- **Placeholders leak into artifacts.** `[unknown]`-style fillers are only safe when write-back\r\n  filters them; check the store writer before adding such a rule, and never let a placeholder\r\n  reach a persisted card.\r\n- **Test builders swallow empty values.** Helpers written as `value or default` cannot express\r\n  `[]`; switch to `value if value is not None else default` before writing an empty-state test.\r\n- **Normalization erases empty vs missing.** A `_json_items`\u002F`_string_list` helper returns `[]`\r\n  for an omitted key, a malformed value and an explicit empty list, so an \"`[]` clears this\r\n  field\" rule cannot be read after normalization. Decide clears from the raw reply object\r\n  (`payload.get(field) == []`), require the field in the change list, and keep a non-list value\r\n  from counting as a clear.\r\n- **Snapshot vs live row.** Revision\u002Faudit tables usually store the pre-change snapshot while the\r\n  live row carries the change. Assert the old value on the snapshot and the new value on the live\r\n  row; asserting both on the same row fails for the wrong reason.\r\n- **Prompt growth is real cost.** A generated glossary section costs roughly 400-900 characters per\r\n  prompt per run; prefer one shared table over per-prompt prose and state the delta when reporting.\r\n- **Duplicated vocabulary already in flight.** Before adding a definition, search the pipeline for\r\n  an existing one (store constants, tool descriptions, provider system block). Extend that source\r\n  instead of creating a second.\r\n\r\n## Reporting\r\n\r\nLead with the file:line map of what changed (prompt constant, parser, store, tests) and the\r\nstructural findings; keep verbatim prompt text out of the summary unless requested. When the\r\nrequest *is* \"show me the system prompt\", the reply carries the full text and the composition map;\r\na file path is a supplement, never the answer. Separate\r\n\"fixed\" from \"found but needs a decision\" — contract asymmetries are often intentional.\r\n","# Prompt Contract Maintenance\r\n\r\nIn a multi-pass LLM pipeline a prompt is an API: the system prompt states a shape, the parser\r\nenforces a shape, and the store persists it. Changing one without the others ships a model reply\r\nnothing accepts, or a rule the guard makes unreachable.\r\n\r\n## When to use\r\n\r\n- Adding or reworking sections of a layer \u002F reviewer \u002F adviser prompt.\r\n- Unifying vocabulary across passes (entity or marker types, advice targets, severity levels).\r\n- Changing an output contract: allowing empty values, renaming keys, new count or length caps.\r\n- Auditing why a prompt's stated rule never takes effect in stored artifacts.\r\n- Explaining another project's prompt architecture (usually: file:line map + structure read-out,\r\n  verbatim text only on request). For a shipped agent whose prompts travel inside a binary or an\r\n  installed package, follow `references\u002Fforeign-prompt-architecture.md` — version-pinned extraction,\r\n  provenance hash, composition map before any text dump.\r\n\r\n## Workflow\r\n\r\n1. **Inventory before editing.** Grep the prompt constants, then for each one find: the call that\r\n   passes it as the system message, the user-message builder that supplies its input blocks, the\r\n   parse\u002Fnormalize function that consumes the reply, and the store writer. Write the\r\n   prompt → parser → store triple per pass. A section cannot be judged without its consumer.\r\n\r\n2. **Section skeleton**, in this order:\r\n   - `ROLE` — what the pass owns, plus an explicit \"what you are not\" line (not the assistant, not\r\n     the implementer, not a second writer).\r\n   - `INPUTS` + `TRUST ORDER` — the blocks that actually arrive, ranked.\r\n   - `WORKFLOW` — numbered steps naming those blocks in the order the builder emits them.\r\n   - JSON shape, `OUTPUT CONTRACT`, per-topic rules, then `DEFINITIONS` last.\r\n   - Definitions go last so the body reads top-down while the reference block stays self-contained\r\n     even though its text is generated once and shared.\r\n\r\n3. **Single-source every shared vocabulary.** Put the table in the lightest shared module (prompt\r\n   formatting module, not the store), expose `glossary()` \u002F `section()` string builders, and\r\n   compose every prompt that mentions the vocabulary from them. Four hand-written copies of the\r\n   same five type definitions drift within one release. Attach the generated sections to the\r\n   shared contract constant itself when several prompts compose it (cold start, audit, reconcile,\r\n   retry): a section appended only in the primary system-prompt composer silently disappears\r\n   from every variant.\r\n\r\n4. **Compose, never f-string a prompt that embeds JSON.** Braces in the example object collide with\r\n   replacement fields, and doubling every brace is silent-corruption risk. Attach generated\r\n   sections by concatenation: `\"\"\"static body\"\"\" + \"\\n\\n\" + marker_section()`. The same rule kills\r\n   placeholder-then-`replace()` schemes.\r\n\r\n5. **Audit prompt ↔ parser symmetry** before declaring the edit done — see\r\n   `references\u002Fprompt-audit-checklist.md` for the check matrix and commands. The recurring misses:\r\n   a count or character limit stated in the prompt but enforced wider (or narrower) by the parser;\r\n   a \"you are given X\" claim the builder does not supply; a section order claim that does not\r\n   match the built message.\r\n\r\n6. **Move behaviour end-to-end when the rule is semantic.** A rule like \"an empty listed field\r\n   clears the card\" needs four edits in one change: prompt text, parser\u002Fguard, store write, and\r\n   README. Keep the neighbouring negative path (placeholder or unlisted empty = not a correction)\r\n   and test both.\r\n\r\n7. **Verify with the repo's own suite.** Prove pre-existing failures with a clean tree instead of\r\n   guessing (`git worktree add \u003Cdir> HEAD`), and treat full-suite-only failures as flakes after one\r\n   isolated rerun. Report the failing test name, its real cause, and whether it predates the change.\r\n\r\n## Pitfalls\r\n\r\n- **Section text contradicts the builder.** A ROLE line claiming \"the window is the only evidence\"\r\n  while the builder also supplies a first-message anchor and operator files teaches the model to\r\n  ignore evidence you feed it. Read the builder before writing any inputs\u002Ftrust claim.\r\n- **The guard makes the new rule dead on arrival.** A review that rejects empty cards can never\r\n  clear one; a parser that drops `[unknown]` items cannot accept a placeholder rule. Change guard\r\n  and prompt together and keep both branches tested.\r\n- **Placeholders leak into artifacts.** `[unknown]`-style fillers are only safe when write-back\r\n  filters them; check the store writer before adding such a rule, and never let a placeholder\r\n  reach a persisted card.\r\n- **Test builders swallow empty values.** Helpers written as `value or default` cannot express\r\n  `[]`; switch to `value if value is not None else default` before writing an empty-state test.\r\n- **Normalization erases empty vs missing.** A `_json_items`\u002F`_string_list` helper returns `[]`\r\n  for an omitted key, a malformed value and an explicit empty list, so an \"`[]` clears this\r\n  field\" rule cannot be read after normalization. Decide clears from the raw reply object\r\n  (`payload.get(field) == []`), require the field in the change list, and keep a non-list value\r\n  from counting as a clear.\r\n- **Snapshot vs live row.** Revision\u002Faudit tables usually store the pre-change snapshot while the\r\n  live row carries the change. Assert the old value on the snapshot and the new value on the live\r\n  row; asserting both on the same row fails for the wrong reason.\r\n- **Prompt growth is real cost.** A generated glossary section costs roughly 400-900 characters per\r\n  prompt per run; prefer one shared table over per-prompt prose and state the delta when reporting.\r\n- **Duplicated vocabulary already in flight.** Before adding a definition, search the pipeline for\r\n  an existing one (store constants, tool descriptions, provider system block). Extend that source\r\n  instead of creating a second.\r\n\r\n## Reporting\r\n\r\nLead with the file:line map of what changed (prompt constant, parser, store, tests) and the\r\nstructural findings; keep verbatim prompt text out of the summary unless requested. When the\r\nrequest *is* \"show me the system prompt\", the reply carries the full text and the composition map;\r\na file path is a supplement, never the answer. Separate\r\n\"fixed\" from \"found but needs a decision\" — contract asymmetries are often intentional.\r\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"platforms":38,"description":7},"Hermes Agent","1.0.0",{"hermes":27},{"tags":28,"related_skills":34},[29,30,31,32,33],"prompts","llm-pipelines","structured-output","schema","prompt-audit",[35,36,37],"test-driven-development","systematic-debugging","prompt-engineer",[39,40,41],"linux","macos","windows","main","a3f3199bb87ec3c91248f68a39d88527e1847ae9","skills\u002Fsoftware-development\u002Fprompt-contract-maintenance","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content","https:\u002F\u002Fgithub.com\u002Fchaorenex1","https:\u002F\u002Fblog.aduib.com","A programmer whose only hobby in life is coding","2026-10-20 00:34:32",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add chaorenex1\u002Fhermes-home-content --skill prompt-contract-maintenance",{"tool":56,"command":57},"bunx","bunx skills add chaorenex1\u002Fhermes-home-content --skill prompt-contract-maintenance",{"tool":59,"command":60},"pnpm","pnpm dlx skills add chaorenex1\u002Fhermes-home-content --skill prompt-contract-maintenance","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Fprompt-contract-maintenance\u002FSKILL.md",true,[64,70],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fforeign-prompt-architecture.md","REFERENCE","参考文档",5421,"https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Fprompt-contract-maintenance\u002Freferences\u002Fforeign-prompt-architecture.md",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fprompt-audit-checklist.md",4000,"https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Fprompt-contract-maintenance\u002Freferences\u002Fprompt-audit-checklist.md",[75,82,89,96,103,110],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7F8GF32YD5MBQW2TGSRH1YP","web-retrieval-resilience","Web tools fail or search rules break: repair or fall back.","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fweb-retrieval-resilience\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7F8FP46QESQMCZ1KBT3TW3R","blocked-page-recovery","Use when a fetch fails: 403\u002F429, paywall, WAF, bot wall.","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fblocked-page-recovery\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7F8ER6VXHBNVRQBZS7X08SE","verification-loop","Run a six-phase verification of a Claude Code session's work — build, type check, lint, tests with coverage, security grep, and diff review — then produce a PASS\u002FFAIL verification report. Use when verifying work after completing a feature or refactor, before creating a PR, or when quality gates must pass.","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fverification-loop\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7F8E4BQJ38KVQVM3MT20PYV","unreal-world-builder","开放世界与环境专家——精通 UE5 World Partition、Landscape、程序化植被、HLOD 和大规模关卡流式加载，打造无缝开放世界体验","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Funreal-engine\u002Funreal-world-builder\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7F8D747SQW2FTP7GBSX38BR","unreal-technical-artist","Unreal Engine 视觉管线专家——精通材质编辑器、Niagara 特效、程序化内容生成和 UE5 项目的美术到引擎管线","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Funreal-engine\u002Funreal-technical-artist\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M7F8CKHYJVZVBTN0321J88T2","unreal-systems-engineer","性能与混合架构专家——精通 C++\u002FBlueprint 边界、Nanite 几何体、Lumen GI 和 Gameplay Ability System，面向 AAA 级 Unreal Engine 项目","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Funreal-engine\u002Funreal-systems-engineer\u002FSKILL.md",[],[]]