[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DGPMHRNYCHR8GD0NFMVHKC":3,"skill-same:01M7DGPMHRNYCHR8GD0NFMVHKC":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},"01M7DGPMHRNYCHR8GD0NFMVHKC","cli-software",null,"Working rules for implementing or extending a command-line program from a written specification (subcommands, flags, exit codes, text and JSON output, error types). Use for every task whose prompt is a CLI spec; it shows how to turn the spec into a checklist, implement it, and prove each item by running the program before finishing.","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\u002Fluna-hc\u002Fround2\u002Fr2a-persistent-suite\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cli-software\ndescription: Working rules for implementing or extending a command-line program from a written specification (subcommands, flags, exit codes, text and JSON output, error types). Use for every task whose prompt is a CLI spec; it shows how to turn the spec into a checklist, implement it, and prove each item by running the program before finishing.\n---\n# CLI from spec: checklist plus a suite that outlives the session\n\nThe spec is the test suite written in prose: every table row, bullet, and example is checked by a hidden test, and every earlier part stays tested. The workspace persists between parts; your memory does not. Work in four passes.\n\n## Pass 0: run the suite you inherited\n\nIf `regress\u002F` exists, run it before touching code: `sh regress\u002Fcases.sh > regress\u002Factual.txt; diff regress\u002Fexpected.txt regress\u002Factual.txt`. A difference is a leftover bug in the program; fix it first. Those are the cheapest points available.\n\n## Pass 1: extract the checklist (before writing code)\n\nWrite a numbered list into `scratch\u002FCHECKLIST.md`, one line per item copied from the spec:\n\n1. Each command and flag, with its default and where it is allowed.\n2. Each error type: exit code, exact trigger, and where the bad input comes from (command-line value, file contents, semantic check). Take the exit code from the row naming the type; category prose never overrides an explicit number.\n3. Each output shape: field names, order, value formatting (prefixes, widths, sorting), text versus JSON, stdout versus file.\n4. Each sentence containing \"must\", \"never\", \"only\", \"exactly\", \"sorted\", \"still\", \"unchanged\", or \"from this part onward\".\n5. Each example invocation with its printed output and exit code.\n6. Each value syntax accepted on the command line, separately from what files may contain.\n\nExpect 20 to 60 items. Fewer means you skipped part of the spec; reread it.\n\n## Pass 2: implement against the list\n\n- Read all existing code first. Grep every enumeration of commands, flags, operators, error types, and formats (usage, dispatch, the error emitter's idea of the current command, tables) and extend each one.\n- One error emitter with one exit-code table; the command field is the subcommand typed, even when a global flag or option value was bad.\n- One value parser, one value formatter, one data model shared by all commands; add a parameter, never a copy. A new input format must fill the same structures (names, ranges, expressions) as the old one.\n- Command-line values and file contents map the same bad text to different error types; if the runtime parser delegates to the file parser, catch and re-raise the command-line type. A token an earlier part forbids in files stays a parse error there, even after this part allows it on the command line or in a new mode.\n- Any uncaught exception is a bug. Translate missing files, bad JSON, failed int conversions, KeyError or IndexError on user names into the spec's types where the input origin is known.\n- Never name variables or classes after builtins or helpers you call (`format`, `type`, `input`, `id`, `hash`, builtin exception names).\n\n## Pass 3: prove each item by running (mandatory)\n\nRunning the spec's examples is part of implementing; no framework or dependency is needed. Invoke `python3 \u003Centry> ...` or `.venv\u002Fbin\u002Fpython \u003Centry> ...`; cache warnings on stderr are noise. Double-quote values containing shell-special characters.\n\n- Every example: fixture exactly as given; compare stdout and `echo $?` byte for byte (key order, prefixes, sorting, blank lines).\n- Every error row: with `--json` and without; type, exit code, command field, nothing on stdout in text mode.\n- Every new value syntax: one success. Every new format, mode, or command: run with the richest existing features (wide values, nested expressions with a literal operand, several outputs), not only the simplest example.\n- Tick an item only after its run passed. Fix and rerun until all are ticked. Spend at least a third of your effort here.\n\n## The regression suite: every proven case becomes permanent\n\nCreate `regress\u002F` in part 1 and grow it every part. Never delete it, never put it under `scratch\u002F`, and add nothing else at the workspace root. Layout: `regress\u002Ffixtures\u002F`, `regress\u002Fcases.sh`, `regress\u002Fexpected.txt`:\n\n```sh\ncd \"$(dirname \"$0\")\u002F..\"\nP=\"python3 \u003Centry>\"\nrun() { echo \"## $*\"; $P \"$@\" 2>&1; echo \"exit=$?\"; }\nrun \u003Ccommand> regress\u002Ffixtures\u002F\u003Cfile> ...\n```\n\n- The moment a checklist item is ticked, append its command as a `run` line: successes, every error row, every value syntax, every input that must stay rejected, every bug you fixed. This is how the next part remembers this one.\n- Rerun the diff after every edit to a shared parser, formatter, dispatcher, or data model, and once more before finishing. A changed earlier-part line is a regression in the program; edit `expected.txt` only when the current spec explicitly changes that behaviour, and say which item does.\n- When everything is green: `sh regress\u002Fcases.sh > regress\u002Fexpected.txt`. Relative paths only. The program must never read or import anything under `regress\u002F`.\n\n## Finish\n\nDelete `scratch\u002F`; keep `regress\u002F`. List the commands you ran and the suite size; name anything unverified. Never finish with \"did not run\", and never finish while a spec example crashes.\n","# CLI from spec: checklist plus a suite that outlives the session\n\nThe spec is the test suite written in prose: every table row, bullet, and example is checked by a hidden test, and every earlier part stays tested. The workspace persists between parts; your memory does not. Work in four passes.\n\n## Pass 0: run the suite you inherited\n\nIf `regress\u002F` exists, run it before touching code: `sh regress\u002Fcases.sh > regress\u002Factual.txt; diff regress\u002Fexpected.txt regress\u002Factual.txt`. A difference is a leftover bug in the program; fix it first. Those are the cheapest points available.\n\n## Pass 1: extract the checklist (before writing code)\n\nWrite a numbered list into `scratch\u002FCHECKLIST.md`, one line per item copied from the spec:\n\n1. Each command and flag, with its default and where it is allowed.\n2. Each error type: exit code, exact trigger, and where the bad input comes from (command-line value, file contents, semantic check). Take the exit code from the row naming the type; category prose never overrides an explicit number.\n3. Each output shape: field names, order, value formatting (prefixes, widths, sorting), text versus JSON, stdout versus file.\n4. Each sentence containing \"must\", \"never\", \"only\", \"exactly\", \"sorted\", \"still\", \"unchanged\", or \"from this part onward\".\n5. Each example invocation with its printed output and exit code.\n6. Each value syntax accepted on the command line, separately from what files may contain.\n\nExpect 20 to 60 items. Fewer means you skipped part of the spec; reread it.\n\n## Pass 2: implement against the list\n\n- Read all existing code first. Grep every enumeration of commands, flags, operators, error types, and formats (usage, dispatch, the error emitter's idea of the current command, tables) and extend each one.\n- One error emitter with one exit-code table; the command field is the subcommand typed, even when a global flag or option value was bad.\n- One value parser, one value formatter, one data model shared by all commands; add a parameter, never a copy. A new input format must fill the same structures (names, ranges, expressions) as the old one.\n- Command-line values and file contents map the same bad text to different error types; if the runtime parser delegates to the file parser, catch and re-raise the command-line type. A token an earlier part forbids in files stays a parse error there, even after this part allows it on the command line or in a new mode.\n- Any uncaught exception is a bug. Translate missing files, bad JSON, failed int conversions, KeyError or IndexError on user names into the spec's types where the input origin is known.\n- Never name variables or classes after builtins or helpers you call (`format`, `type`, `input`, `id`, `hash`, builtin exception names).\n\n## Pass 3: prove each item by running (mandatory)\n\nRunning the spec's examples is part of implementing; no framework or dependency is needed. Invoke `python3 \u003Centry> ...` or `.venv\u002Fbin\u002Fpython \u003Centry> ...`; cache warnings on stderr are noise. Double-quote values containing shell-special characters.\n\n- Every example: fixture exactly as given; compare stdout and `echo $?` byte for byte (key order, prefixes, sorting, blank lines).\n- Every error row: with `--json` and without; type, exit code, command field, nothing on stdout in text mode.\n- Every new value syntax: one success. Every new format, mode, or command: run with the richest existing features (wide values, nested expressions with a literal operand, several outputs), not only the simplest example.\n- Tick an item only after its run passed. Fix and rerun until all are ticked. Spend at least a third of your effort here.\n\n## The regression suite: every proven case becomes permanent\n\nCreate `regress\u002F` in part 1 and grow it every part. Never delete it, never put it under `scratch\u002F`, and add nothing else at the workspace root. Layout: `regress\u002Ffixtures\u002F`, `regress\u002Fcases.sh`, `regress\u002Fexpected.txt`:\n\n```sh\ncd \"$(dirname \"$0\")\u002F..\"\nP=\"python3 \u003Centry>\"\nrun() { echo \"## $*\"; $P \"$@\" 2>&1; echo \"exit=$?\"; }\nrun \u003Ccommand> regress\u002Ffixtures\u002F\u003Cfile> ...\n```\n\n- The moment a checklist item is ticked, append its command as a `run` line: successes, every error row, every value syntax, every input that must stay rejected, every bug you fixed. This is how the next part remembers this one.\n- Rerun the diff after every edit to a shared parser, formatter, dispatcher, or data model, and once more before finishing. A changed earlier-part line is a regression in the program; edit `expected.txt` only when the current spec explicitly changes that behaviour, and say which item does.\n- When everything is green: `sh regress\u002Fcases.sh > regress\u002Fexpected.txt`. Relative paths only. The program must never read or import anything under `regress\u002F`.\n\n## Finish\n\nDelete `scratch\u002F`; keep `regress\u002F`. List the commands you ran and the suite size; name anything unverified. Never finish with \"did not run\", and never finish while a spec example crashes.\n",{"name":5,"description":7},"main","90c4e234b13d749b2f69ddcb1c759e5f667f6413","skills\u002Fluna-hc\u002Fround2\u002Fr2a-persistent-suite","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\u002Fluna-hc\u002Fround2\u002Fr2a-persistent-suite\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",[],[]]