tooling-dev
Skill2 starsChanged 5 days agoMITView on GitHub
Build and maintain command-line tools, developer automation, and code generators. Use for CLI arguments, exit codes, non-interactive execution, config discovery, signals, structured output, packaging, and integration tests. Trigger on 'build a CLI', 'write a script to automate this', 'scaffold a generator', 'wrong exit code'.
- Reads credentials
In this repository40 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- .agents/CLAUDE.mdCLAUDE.md
- 3d-modelsSkill
- agent-engineeringSkill
- agent-orchestrationSkill
- agy-image-babysitterSkill
- backend-systemsSkill
- bot-engineeringSkill
- cloud-devopsSkill
- code-reviewSkill
- data-engineeringSkill
- documentationSkill
- finishing-devSkill
- frontend-engineeringSkill
- git-branch-cleanupSkill
- git-workflowSkill
- goldsrc-moddingSkill
- ios-engineeringSkill
- local-dubbingSkill
- mobile-engineeringSkill
- motion-videoSkill
- observabilitySkill
- package-managementSkill
- performance-engineeringSkill
- portkillSkill
- radar-iaSkill
- readme-standardSkill
- reaSkill
- release-autoupdateSkill
- requirements-planningSkill
- security-opsSkill
- skill-authoringSkill
- software-architectureSkill
- stack-selectionSkill
- starting-devSkill
- test-engineeringSkill
- threejsSkill
- web-researchSkill
- x-post-readingSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Write the invocation examples first — including the one inside a CI job and the one inside a pipe.
- Distinctive: line 21
Write the invocation examples first — including the one inside a CI job and the one inside a pipe.
- Distinctive: line 25
Test invalid flags, missing config, partial files, interruption, and cross-platform paths — not just the happy invocation.
- Distinctive: line 84
Only the source entry point was smoked.
- Distinctive: line 89
Never prompt in CI. Provide explicit flags for confirmation and for quiet mode.
- Distinctive: line 90
Avoid regex parsing when a structured parser exists — the regex works until the first quoted comma.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tooling Development
Not this skill: a user-facing service or endpoint (backend-systems), or CI pipeline steps (cloud-devops).
Preflight
cat package.json | jq '{bin, files, engines}' # what actually ships
command -v <tool> && <tool> --help | head -20 # the current contract, if it existsWrite the invocation examples first — including the one inside a CI job and the one inside a pipe. They define the contract more honestly than a design document.
Workflow
- Write the invocation examples first — including the one inside a CI job and the one inside a pipe. They define the contract more honestly than any design doc.
- Inspect the repository's runtime, packaging, config, logging, and distribution conventions before adding a fourth way to do any of them.
- Separate command parsing from domain logic. The core must be callable without a terminal, or it can never be tested or reused.
- Support
--help, non-interactive execution, machine-readable output, and bounded cancellation. - Test invalid flags, missing config, partial files, interruption, and cross-platform paths — not just the happy invocation.
- Smoke the installed or packaged command, never only the source entry point. Packaging is where tools break.
The Stream Contract
This split is the entire reason a tool composes.
| Stream | Carries | Rule |
| stdout | the result — the thing a pipe consumes | machine-readable when not a TTY |
| stderr | progress, warnings, diagnostic output | never part of the result |
| exit code | success or the class of failure | 0 only when the work actually happened |
| Code | Means |
| 0 | success |
| 1 | generic runtime failure |
| 2 | usage error — bad flag, missing argument |
| 3–63 | tool-specific, documented in --help |
| 64–78 | borrow sysexits.h meanings when they fit: 64 usage, 65 data error, 66 missing input, 69 unavailable, 70 internal error, 78 bad config |
| 130 | interrupted (SIGINT, 128+2) |
A single exit code 1 for everything makes automation impossible: the caller cannot tell "you typed it wrong" from "the network died". Argument parsing has its own edge cases (--, negative numbers, repeated flags, clustering) and exit codes need a versioning and deprecation story of their own — see argument and exit conventions.
Adapt to the Terminal, Then Get Out of the Way
const isTTY = process.stdout.isTTY;
const color = isTTY && !process.env.NO_COLOR && !argv.noColor;
// JSON when piped, human table when interactive
isTTY ? renderTable(rows) : process.stdout.write(JSON.stringify(rows) + '\n');Honor NO_COLOR and an explicit --no-color regardless of TTY detection. Never emit a spinner or a progress bar into a redirected stream — it becomes megabytes of escape codes in a CI log.
Failure Paths People Skip
| Event | Correct behavior |
SIGINT / SIGTERM | stop, delete the partial output file, exit non-zero |
Downstream pipe closes (head) | catch EPIPE, exit quietly — never a stack trace |
| Running in CI with no TTY | never prompt; require an explicit --yes |
| Output file already exists | preview, back up, or demand --force |
| Config found in several places | documented precedence, and --print-config to show what won |
Config precedence, highest first: command flag → environment variable → project file → user file → built-in default. Print the resolved source on request; "why is it using that value" is the most common support question a tool generates — see argument and exit conventions for the diagnostic technique when precedence itself is the bug.
Reference Routing
- Practical tooling cases: real-world-cases.md
- CLI behavior and operational standards: tooling-best-practices.md
- Implementation patterns: tooling-examples.md
- Argument parsing, exit codes, and config precedence diagnosis: argument-and-exit-conventions.md
- Signals, atomic writes, TTY/piping, packaging, and flag deprecation: packaging-and-compatibility.md
- Reference docs generated from code or schemas: use the
documentationskill.
See Reference Map for specialized references and sub-domain guides.
Stop
- The tool would prompt in a non-TTY context. Never prompt in CI; require an explicit flag.
- A partial output file would survive an interruption. Write to a temp path and rename atomically instead.
- Only the source entry point was smoked. Test the packaged command — packaging is where tools break.
Rules
- Hand off deployment pipelines to
cloud-devops, testing totest-engineering, and agent tools toagent-engineering. - A truncated artifact that looks complete is worse than no artifact. Write to a temp path and rename atomically on success.
- Never prompt in CI. Provide explicit flags for confirmation and for quiet mode.
- Avoid regex parsing when a structured parser exists — the regex works until the first quoted comma.
- Version the output format. A tool whose JSON shape drifts silently breaks every script built on it;
--format-versionor aschemafield costs nothing now and everything later. --helpis the primary documentation. If a behavior is not in it, the behavior does not exist for most users.- Deprecate a flag by keeping it working, warning on stderr with the replacement, and removing it only after a documented version window — never a silent break; Hunt & Thomas's The Pragmatic Programmer frames this as treating your own CLI contract with the same reversibility discipline as an external API.
- Name commands and flags for what they do, not how they are implemented — Robert C. Martin's Clean Code naming rules apply as much to a
--flagas to a function. - Shell scripts and one-off command safety belong to
cloud-devops; publishing and versioning the tool togit-workflow.
Checklist
- Invocation examples written first, including the CI and piped cases.
- Core logic callable without a terminal.
- stdout carries only the result; diagnostic output on stderr; exit codes distinguish usage from runtime failure.
- TTY detection,
NO_COLOR, signals, andEPIPEall handled. - Config precedence documented and inspectable.
- Partial output never left behind; the packaged command smoke-tested.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

