[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DGSGARTSGPV040MK5CKSG1":3,"skill-same:01M7DGSGARTSGPV040MK5CKSG1":44},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7DGSGARTSGPV040MK5CKSG1","cli-software",null,"Use for any task whose prompt is a multi-part specification for a CLI tool or program (numbered requirements, commands, options, output formats, error handling, examples), especially when built incrementally across several checkpoints and graded by hidden tests. Load before reading the spec in detail.","jemdiggity\u002Fkojo","jemdiggity","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1940552?v=4","01M7DGK797SRB0B74KVSKQ44GZ","Jeremy Hale","01M7DGK7ABQPV6AA6CPDC2NNP7",0,"MIT","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dbm\u002Fround1\u002Fs1c-state-errors\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cli-software\ndescription: Use for any task whose prompt is a multi-part specification for a CLI tool or program (numbered requirements, commands, options, output formats, error handling, examples), especially when built incrementally across several checkpoints and graded by hidden tests. Load before reading the spec in detail.\n---\n\n# CLI software: state, guarantees, errors\n\nRead the spec, keep short notes in `NOTES.md`, verify by running real commands. On top of\nthat base, three disciplines cover where hidden tests actually probe: persisted state,\nguaranteed properties, and error behaviour.\n\n## 1. Persisted state is an external interface\n\nAnything your tool writes to disk or a database and reads back later (a history table, a\nmanifest, a lock file, a config record) will be pre-seeded, inspected, and hand-edited by\nthe tests. Treat it like a wire protocol, not a private cache.\n\n- **Write exactly the schema the spec gives.** Same names, same types, same nesting, no\n  extra columns or keys \"for convenience\". Tests compare against the spec's shape.\n- **Read liberally.** Tolerate records you did not write: missing optional keys, extra\n  keys, an object wrapper where you expected a list (or vice versa), a string where you\n  expected a structure (or vice versa), older or hand-authored encodings. Normalize on\n  load into one internal form, then operate on that.\n- **Prove it once per checkpoint.** Hand-craft a state record *literally* from the spec's\n  description (not from your own tool's output), place it where the tool expects it, and\n  run the commands that consume it. Then run the writer and diff the result against the\n  spec's shape.\n- **Unparseable state is an error, not a crash.** If a record cannot be understood, print\n  `Error: \u003Cwhat and where>` to stderr and exit non-zero. Never let a traceback escape.\n\n## 2. No silent degradation\n\nWhen the spec guarantees a property (a constraint survives, ordering is preserved, an\nundo restores the previous definition exactly, a value round-trips), and your fast path\ncannot deliver it in some case, do **not** quietly fall through to a weaker result.\n\n- Prefer the heavier existing path that does preserve the property (a full rebuild, a\n  copy-and-swap, a re-derivation from the recorded original).\n- If no path can preserve it, fail with an explicit `Error:` rather than succeeding\n  with less than promised.\n- After any reverse\u002Fundo operation, inspect the resulting state directly (list the\n  definitions, query the metadata) and compare it to the state before the forward\n  operation. \"It printed success\" is not verification.\n\n## 3. Error discipline\n\n- **Usage errors come only from the argument parser.** Invalid or missing arguments,\n  unknown options, wrong arity. Nothing else may produce a usage message.\n- **Every other failure** (bad input file, missing target, conflicting state, failed\n  validation, unexpected data) prints `Error: \u003Cspecific reason>` on stderr and exits with\n  the non-zero code the spec assigns, with no traceback and no partial output on stdout.\n- **No broad `except` around the command entry point.** A catch-all that reports every\n  exception as a usage error hides data bugs and fails the tests that check the specific\n  message. Catch specific exceptions at the point where you can name the cause.\n- **Missing target means error, not create.** If an operation refers to something that\n  does not exist (a column, a file, an entry), report it. Do not helpfully auto-create it\n  unless the spec says so.\n- **Validation before mutation.** Check every precondition, then apply. Half-applied\n  changes with an error afterwards fail more tests than a clean refusal.\n- **Trigger each error bullet in the spec before finishing.** Craft the input, run it,\n  check the message text, the stream, and the exit code.\n\n## Checkpoint routine\n\n1. List, in `NOTES.md`, every state shape, guaranteed property, and error bullet this\n   checkpoint touches (one line each).\n2. Implement.\n3. Run every spec example verbatim, then: one hand-crafted state record, one\n   reverse\u002Fundo followed by direct inspection, and every error bullet on purpose.\n4. Re-read the list; anything not exercised by a real run gets a run now.\n\n## Do not\n\n- Do not add extra metadata fields to persisted records \"to be safe\".\n- Do not reject records merely because they are shaped differently from what you emit.\n- Do not stop to ask about an ambiguity; the run is non-interactive. Accept every\n  plausible reading on input, emit the spec's exact shape on output.\n","# CLI software: state, guarantees, errors\n\nRead the spec, keep short notes in `NOTES.md`, verify by running real commands. On top of\nthat base, three disciplines cover where hidden tests actually probe: persisted state,\nguaranteed properties, and error behaviour.\n\n## 1. Persisted state is an external interface\n\nAnything your tool writes to disk or a database and reads back later (a history table, a\nmanifest, a lock file, a config record) will be pre-seeded, inspected, and hand-edited by\nthe tests. Treat it like a wire protocol, not a private cache.\n\n- **Write exactly the schema the spec gives.** Same names, same types, same nesting, no\n  extra columns or keys \"for convenience\". Tests compare against the spec's shape.\n- **Read liberally.** Tolerate records you did not write: missing optional keys, extra\n  keys, an object wrapper where you expected a list (or vice versa), a string where you\n  expected a structure (or vice versa), older or hand-authored encodings. Normalize on\n  load into one internal form, then operate on that.\n- **Prove it once per checkpoint.** Hand-craft a state record *literally* from the spec's\n  description (not from your own tool's output), place it where the tool expects it, and\n  run the commands that consume it. Then run the writer and diff the result against the\n  spec's shape.\n- **Unparseable state is an error, not a crash.** If a record cannot be understood, print\n  `Error: \u003Cwhat and where>` to stderr and exit non-zero. Never let a traceback escape.\n\n## 2. No silent degradation\n\nWhen the spec guarantees a property (a constraint survives, ordering is preserved, an\nundo restores the previous definition exactly, a value round-trips), and your fast path\ncannot deliver it in some case, do **not** quietly fall through to a weaker result.\n\n- Prefer the heavier existing path that does preserve the property (a full rebuild, a\n  copy-and-swap, a re-derivation from the recorded original).\n- If no path can preserve it, fail with an explicit `Error:` rather than succeeding\n  with less than promised.\n- After any reverse\u002Fundo operation, inspect the resulting state directly (list the\n  definitions, query the metadata) and compare it to the state before the forward\n  operation. \"It printed success\" is not verification.\n\n## 3. Error discipline\n\n- **Usage errors come only from the argument parser.** Invalid or missing arguments,\n  unknown options, wrong arity. Nothing else may produce a usage message.\n- **Every other failure** (bad input file, missing target, conflicting state, failed\n  validation, unexpected data) prints `Error: \u003Cspecific reason>` on stderr and exits with\n  the non-zero code the spec assigns, with no traceback and no partial output on stdout.\n- **No broad `except` around the command entry point.** A catch-all that reports every\n  exception as a usage error hides data bugs and fails the tests that check the specific\n  message. Catch specific exceptions at the point where you can name the cause.\n- **Missing target means error, not create.** If an operation refers to something that\n  does not exist (a column, a file, an entry), report it. Do not helpfully auto-create it\n  unless the spec says so.\n- **Validation before mutation.** Check every precondition, then apply. Half-applied\n  changes with an error afterwards fail more tests than a clean refusal.\n- **Trigger each error bullet in the spec before finishing.** Craft the input, run it,\n  check the message text, the stream, and the exit code.\n\n## Checkpoint routine\n\n1. List, in `NOTES.md`, every state shape, guaranteed property, and error bullet this\n   checkpoint touches (one line each).\n2. Implement.\n3. Run every spec example verbatim, then: one hand-crafted state record, one\n   reverse\u002Fundo followed by direct inspection, and every error bullet on purpose.\n4. Re-read the list; anything not exercised by a real run gets a run now.\n\n## Do not\n\n- Do not add extra metadata fields to persisted records \"to be safe\".\n- Do not reject records merely because they are shaped differently from what you emit.\n- Do not stop to ask about an ambiguity; the run is non-interactive. Accept every\n  plausible reading on input, emit the spec's exact shape on output.\n",{"name":5,"description":7},"main","90c4e234b13d749b2f69ddcb1c759e5f667f6413","skills\u002Fsonnet-dbm\u002Fround1\u002Fs1c-state-errors","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo","https:\u002F\u002Fgithub.com\u002Fjemdiggity","2026-11-01 06:04:44",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add jemdiggity\u002Fkojo --skill cli-software",{"tool":36,"command":37},"bunx","bunx skills add jemdiggity\u002Fkojo --skill cli-software",{"tool":39,"command":40},"pnpm","pnpm dlx skills add jemdiggity\u002Fkojo --skill cli-software","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dbm\u002Fround1\u002Fs1c-state-errors\u002FSKILL.md",true,[],[45,52,57,62,67,72],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":19},"01M7DGWAMS2Z08G9S6KYEBM4YG","service-spec","Invoke before reading any code, for any task whose prompt is a multi-part spec for a service, API or CLI built up over successive parts (part 1, part 2, ... each adding or changing behavior). Apply its rules while reading the spec literally and while choosing behavior where the spec is silent.","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dcs\u002Fround3\u002Fd3e-accept\u002FSKILL.md",[],[],{"skillNo":53,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7DGW5T9M4EXVHNTNW1NY6MR","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dcs\u002Fround3\u002Fd3d-exact-words\u002FSKILL.md",[],[],{"skillNo":58,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7DGW1S560QM0M72BSYP42XB","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dcs\u002Fround3\u002Fd3c-omit\u002FSKILL.md",[],[],{"skillNo":63,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7DGVXQS07PEJQBS7VJC9B7R","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dcs\u002Fround3\u002Fd3b-inherit\u002FSKILL.md",[],[],{"skillNo":68,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7DGVSEXFX35NZPSPBN9833Q","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dcs\u002Fround3\u002Fd3a-gate-lean\u002FSKILL.md",[],[],{"skillNo":73,"name":47,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7DGVNNTDB3EGQHJXTNM986H","Use for any task whose prompt is a multi-part spec for a service, API, or CLI built up over successive parts (part 1, part 2, ... each adding or changing behavior). Guides literal reading of the spec and the choices to make where it is silent.","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dcs\u002Fround2\u002Fd2e-lean\u002FSKILL.md",[],[]]