Best for
- Use when a spec touches a command surface, an interactive flow, config precedence, exit codes, or output modes.
agents-inc/skills/src/skills/meta-planning-cli-planning/SKILL.md
CLI specification planning frameworks. Use when a spec touches a command surface, an interactive flow, config precedence, exit codes, or output modes. Covers flag contracts, prompt flow design, precedence tables, exit-code taxonomy, TTY/piped/JSON output, error text, signals, and cross-platform concerns.
Decision brief
Quick Guide: Specify each contract the feature actually touches — the full flag table for a new surface, the per-step prompt table for an interactive flow, a precedence table per config key, an exit code for every terminating path, and output behaviour per context (TTY, piped, -…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/agents-inc/skills --skill "src/skills/meta-planning-cli-planning"Inspect the Agent Skill "meta-planning-cli-planning" from https://github.com/agents-inc/skills/blob/81d43a51211aca12c85dcc16085fa99014ec548e/src/skills/meta-planning-cli-planning/SKILL.md at commit 81d43a51211aca12c85dcc16085fa99014ec548e. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
All specifications must be grounded in the codebase's real commands, prompts, resolvers, and constants — reference specific files with line numbers
A CLI's public API is bigger than its code. Flags, exit codes, output streams, and config keys are contracts that humans, scripts, and CI all branch on. A spec that leaves one of them implicit forces the developer to invent it — and an invented contract is one nobody documented.
Argument, flag, subcommand, or prompt — decided by role, not preference.
Argument, flag, subcommand, or prompt — decided by role, not preference.
Prompt only what cannot be derived, and give every step a complete contract.
Permission review
The documentation asks the agent to read local files, directories, or repositories.
Read the codebase's existing exit-code constants first and reuse them. Propose a new code only when no existing class fits, and say what it means.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 95/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 23 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Quick Guide: Specify each contract the feature actually touches — the full flag table for a new surface, the per-step prompt table for an interactive flow, a precedence table per config key, an exit code for every terminating path, and output behaviour per context (TTY, piped,
--json, quiet, verbose). Apply a framework only when the spec touches its artifact class; a config-only change needs no prompt-flow section.
<critical_requirements>
All specifications must be grounded in the codebase's real commands, prompts, resolvers, and constants — reference specific files with line numbers
(You MUST give every prompted value a non-interactive twin — a flag or config key — and state what happens with no TTY and no flag)
(You MUST give every terminating path an exit code named as a constant, with cancellation distinct from failure)
(You MUST specify output per context — TTY, piped, --json, quiet, verbose — and state which stream carries payload versus diagnostics)
(You MUST state config precedence per key as a table with merge semantics — "merged" without a rule is not a rule)
(You MUST apply each framework only when the spec touches its artifact class — an unused section is omitted, never filled with placeholders)
</critical_requirements>
Auto-detection: CLI spec, command surface design, flag contract, subcommand, interactive wizard spec, prompt flow, config precedence, exit codes, JSON output mode, help text spec, signal handling spec
When to use:
--json, quiet, verbose)When NOT to use:
Key patterns covered:
--json shapeDetailed Resources:
A CLI's public API is bigger than its code. Flags, exit codes, output streams, and config keys are contracts that humans, scripts, and CI all branch on. A spec that leaves one of them implicit forces the developer to invent it — and an invented contract is one nobody documented.
When specifying CLI work:
.tmp files remain and exit code is 130")When NOT to specify:
Core principles:
Argument, flag, subcommand, or prompt — decided by role, not preference.
Is the value the thing the command acts ON, and required in almost every call?
├─ YES -> positional argument (app deploy <environment>)
└─ NO -> Does it modify HOW the command behaves?
├─ YES -> flag (--dry-run, --force, --concurrency=4)
└─ NO -> Does it select a fundamentally different operation?
├─ YES -> subcommand (app config get | app config set)
└─ NO -> Is it only knowable by asking the human?
├─ YES -> prompt, with a flag that supplies the same value non-interactively
└─ NO -> derive it from config or the filesystem; do not ask
Naming rules to specify:
| Rule | Specify as |
|---|---|
| Command names | Lowercase verb or noun-verb, matching the vocabulary already in use |
| Subcommand depth | Two levels maximum unless the codebase already goes deeper |
| Long flags | --kebab-case, spelled out, no abbreviations |
| Short flags | Only for flags used constantly; never invent a new one-letter conflict |
| Boolean flags | Default false; provide --no-<flag> only when the default is true |
| Value flags | Name the type and unit (--timeout <seconds>, not --timeout) |
| Repeatable flags | State explicitly that repetition accumulates (--tag a --tag b) |
| Aliases | List them, and state which name is canonical in help output |
Per-flag contract the spec must carry:
| Field | Why the developer needs it |
|---|---|
| Long name | The parser declaration |
| Short name | Conflict checking against sibling commands |
| Type | Parser coercion and validation |
| Default | Whether the value is optional downstream |
| Required | Whether a missing value is a usage error |
| Env var | Which layer of precedence it participates in |
| Conflicts | Which combinations are a usage error rather than a silent winner |
| Requires | Which flags imply other flags |
| Hidden | Whether it appears in help |
Backward compatibility. When changing an existing surface, state for every removed or renamed flag: what old invocations do now, whether a deprecation warning is emitted on stderr, which release removes the alias, and whether the exit code changes. A silently changed flag breaks scripts that nobody will report.
Why this matters: an undefined flag contract makes the developer invent a parser declaration, and every invention is a convention the CLI does not have.
Prompt only what cannot be derived, and give every step a complete contract.
Can the value be derived from config, a flag, or the filesystem?
├─ YES -> derive it; do not prompt
└─ NO -> Is stdin a TTY?
├─ NO -> fail with a usage error naming the flag that supplies it
└─ YES -> Is the action destructive or expensive?
├─ YES -> prompt for confirmation, skippable with --yes
└─ NO -> prompt for the value, pre-filled with the best default
Per-step specification:
| Element | Specify |
|---|---|
| Step name and order | Where it sits in the sequence and what makes it reachable |
| Prompt type | Text, select, multi-select, confirm, path, password |
| Message text | The exact string shown |
| Initial value | Default, and where the default comes from |
| Options | For selects: the option list, labels, hints, and ordering rule |
| Validation | The rule, when it fires (per keystroke or on submit), and the exact error text |
| Empty state | What renders when there is nothing to choose |
| Keybindings | Any key beyond the framework defaults, and what it does |
| Back and forward | Whether the step is revisitable and what is preserved on return |
| Cancellation | What Ctrl+C at this step leaves behind on disk |
| Non-interactive twin | The flag or config key that supplies the same value |
Keyboard interactions to specify explicitly when a step adds any beyond the defaults: arrow keys, Space, Enter, Tab, Escape, Ctrl+C, and any single-letter accelerator. State whether accelerators are case sensitive, and whether they are inert when a filter or text input has focus. An accelerator that swallows a keystroke a text field needed is the classic wizard bug.
Terminal-size constraints: state the minimum usable width and what degrades first (truncate labels, drop hint column, stack instead of columns). State whether the flow redraws on resize. If the flow renders a grid or table, give the column priority order for narrow terminals.
Resumability: state whether partial progress is persisted, where, and what a re-run does with it — resume silently, prompt to resume, or discard. If nothing is persisted, say so; that is a decision, not an omission.
Specify config as a table per key, never as prose. The resolution order is the contract:
| Layer | Source | Example |
|---|---|---|
| 1 (highest) | Command-line flag | --region eu-west-1 |
| 2 | Environment variable | APP_REGION=eu-west-1 |
| 3 | Project config file | ./app.config.ts |
| 4 | User config file | ~/.config/app/config.json |
| 5 (lowest) | Built-in default | us-east-1 |
Rules the spec must state:
--tag "", tags: []) overrides a lower layer or is treated as unset.Every terminating path gets a code, and every code gets a documented meaning. Scripts branch on these; they are as much a public API as the flags.
| Code | Conventional meaning |
|---|---|
| 0 | Success |
| 1 | Generic runtime failure |
| 2 | Usage error (bad flag, missing argument) |
| 130 | Terminated by SIGINT (Ctrl+C) |
| 143 | Terminated by SIGTERM |
| Project | Domain-specific classes defined by the codebase |
Rules the spec must state:
--dry-run exits 0 when the plan is valid, and the same failure code as a real run when it is not.Stream split: stdout carries the data the caller asked for. stderr carries everything else — progress, warnings, diagnostics, prompts. A command whose output is piped must still show its progress, and must not pollute the pipe with it.
Mode matrix to fill in per command:
| Context | Progress | Colour and symbols | Payload |
|---|---|---|---|
| TTY, default | Spinner or progress | Yes | Human-readable summary, stdout |
| Piped (non-TTY) | Plain lines, stderr | No ANSI | Same payload, no decoration |
--json | None | None | One JSON document, stdout |
--quiet | None | Suppressed | Payload only, errors only |
--verbose | Per-step detail | Yes on TTY | Payload plus diagnostics |
Rules the spec must state:
--json schema. Give the exact object shape, including the error shape. --json must emit valid JSON on failure too, and must never interleave log lines into stdout.NO_COLOR and FORCE_COLOR and the TTY check. State the fallback glyphs when Unicode is unavailable.--json and which wins.Message anatomy — specify all four parts, verbatim:
BAD: Error: ENOENT
GOOD: Error: config file not found at ./app.config.ts.
Run 'app init' to create one, or pass --config <path>.
Rules the spec must state:
Help text to specify per command: one-line summary, usage line with argument arity, argument descriptions, flags grouped and ordered, at least two worked examples of real invocations, and any related commands. State whether the command's help is reachable as --help, -h, and help <command>.
Specify for every command that runs longer than an instant, or writes anything:
| Concern | Specify |
|---|---|
| SIGINT (Ctrl+C) | The message shown, the exit code, and how quickly it returns |
| SIGTERM | Whether it is handled distinctly from SIGINT |
| In-flight work | Whether the current step finishes, is abandoned, or is rolled back |
| Partial writes | Which files may be half-written and how a re-run recovers (atomic write, or lock) |
| Terminal restoration | Cursor visibility, raw mode, alternate screen, and colour reset on exit |
| Cleanup | Temp files, lock files, child processes, and open handles |
| Second Ctrl+C | Whether it forces an immediate exit while cleanup is running |
| Prompt cancellation | What a cancelled prompt does — same path as SIGINT, or a distinct message |
State cleanup as an invariant the tester can assert: "after SIGINT during upload, no .tmp files remain under the target directory and exit code is 130."
Include the ones that apply; state explicitly when a concern is out of scope:
$HOME. State the config location per platform when they differ.<decision_framework>
Apply a framework only when the spec touches its artifact class. The per-artifact section templates live in examples/core.md.
Does the spec add or change a command, argument, or flag?
├─ YES → Command Surface section (Pattern 1) + Exit Codes (Pattern 4) + Output Contract (Pattern 5)
└─ Does it add or change prompts or a wizard step?
├─ YES → Interactive Flow section (Pattern 2), each prompt with its flag twin
└─ Does it add or change config keys?
├─ YES → Configuration Resolution section (Pattern 3), one table per key
└─ Does it only change messages, help, or diagnostics?
├─ YES → Error Messages / Help Text section (Pattern 6) with verbatim text
└─ NO → None of these frameworks applies; do not force one in
Always applicable when the command runs long or writes: Signal Handling (Pattern 7). Always worth a pass when files or paths are involved: Cross-Platform (Pattern 8).
| Failure | Consequence |
|---|---|
| Prompt with no flag twin | Command is unusable in CI; discovered only after release |
| Undefined exit code for a path | The developer invents one; scripts branch on a number nobody documented |
| Output specified for TTY only | Piped output carries ANSI escapes and spinner frames into the consumer |
| Config precedence left as "merged" | Arrays merge in one place and replace in another |
| Paraphrased error text | Every command words the same failure differently |
| No cancellation requirement | Ctrl+C leaves half-written files and a hidden cursor |
| Flag renamed without a plan | Existing scripts break silently |
| "Follows existing patterns" | No file reference means no pattern was verified to exist |
</decision_framework>
<red_flags>
High Priority Issues (a spec with one of these is incomplete):
Medium Priority Issues:
--json mode with no error shapeCommon Mistakes:
Gotchas & Edge Cases:
--dry-run must share the real run's failure codes or CI cannot trust it--tag "") and an absent one are different inputs; decide which wins</red_flags>
<critical_reminders>
All specifications must be grounded in the codebase's real commands, prompts, resolvers, and constants
(You MUST give every prompted value a non-interactive twin — a flag or config key — and state what happens with no TTY and no flag)
(You MUST give every terminating path an exit code named as a constant, with cancellation distinct from failure)
(You MUST specify output per context — TTY, piped, --json, quiet, verbose — and state which stream carries payload versus diagnostics)
(You MUST state config precedence per key as a table with merge semantics)
(You MUST apply each framework only when the spec touches its artifact class — an unused section is omitted, never filled)
Failure to specify these contracts produces CLIs whose developers invent flags, guess exit codes, break piped and CI callers, and leave half-written files behind on Ctrl+C.
</critical_reminders>
Frequently asked questions
Quick Guide: Specify each contract the feature actually touches — the full flag table for a new surface, the per-step prompt table for an interactive flow, a precedence table per config key, an exit code for every terminating path, and output behaviour per context (TTY, piped, -…
The source record exposes this install command: npx skills add https://github.com/agents-inc/skills --skill "src/skills/meta-planning-cli-planning". Inspect the command and pinned source before running it.
Static rules flagged read-files in the source; the page lists the matching lines and excerpts.
Alternatives
coreyhaines31/marketingskills
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
oaustegard/claude-skills
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre
event4u-app/agent-config
Use BEFORE writing or editing any non-trivial UI — inventories components, design tokens, shadcn primitives, and reusable patterns into state.ui_audit. Hard gate for the ui directive set.
event4u-app/agent-config
Frontend design heuristics — and, outside the ticket engine, the loop that applies them: audit, brief, inventory, build, review. Use when building or changing any UI, not only when planning one.