cli-software
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.
- License 许可
- MIT
- 所属仓库
- jemdiggity/kojo
- 最近更新
- 2026-11-01
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- cli-software
- description
- 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.
03 SKILL.md 正文
CLI software: liberal in, exact out
One rule: accept every plausible reading on input, emit the spec's exact shape on output. Read the spec, implement, verify by running real commands. Never stop to ask; the run is non-interactive.
Emitted records are compared by exact equality
Every record your tool emits (an event, a JSON object, a log line, a table row) is checked against the spec's example for that record type with whole-record equality. One extra key fails the test as surely as one missing key.
- Per record type, emit exactly the key set the spec example shows: same names, same nesting, same value types, same ordering where a list is shown. Nothing added, however useful it looks.
- A record type with no example: copy the key set of its nearest sibling (the closest operation of the same family), keep only the identifier keys that apply to this type, add nothing else.
- One serializer per record type, fed only the fields the spec names. Do not pass a generic "everything I know" dict through.
- Before finishing, key-set diff: for each record type, load one emitted instance and the spec's example, sort their keys, and compare. A one-liner per type. Any difference is a bug on your side, not the spec's.
Persisted state is a wire protocol
Anything written to disk or a database and read back later will be pre-seeded and hand-edited by the tests.
- Write exactly the spec's schema: same names, types, nesting. No extra columns or keys, not "for convenience", not "to be safe".
- Read liberally: tolerate missing optional keys, extra keys, an object wrapper where you expected a list (or the reverse), a string where you expected a structure (or the reverse), older encodings. Normalize on load into one internal form.
- Unparseable state is an error with a specific message, never a traceback.
No silent degradation
When the spec guarantees a property (a constraint survives, order holds, an undo restores the original exactly, a value round-trips) and the fast path cannot deliver it, do not fall through to a weaker result. Take the heavier existing path (full rebuild, copy-and-swap, re-derive from the recorded original). If nothing can preserve it, fail with an explicit error. After an undo, inspect the resulting state directly and compare it with the state before.
Error discipline
- Usage errors come only from the argument parser. Nothing else prints usage.
- Every other failure prints
Error: <specific reason>to stderr and exits with the code the spec assigns; no traceback, no partial stdout. - No broad
exceptaround the entry point; catch specific exceptions where you can name the cause. - Missing target means error, not auto-create, unless the spec says otherwise.
- Validate every precondition, then mutate. A clean refusal beats a half-applied change.
- Trigger each error bullet once before finishing: check message, stream, exit code.
Do not
- Do not add fields to emitted records or stored rows beyond what the spec shows.
- Do not reject records merely because they differ in shape from what you emit.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
service-spec
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.