agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when building command-line tools. Covers argument design, exit codes, streams and piping, progress output, configuration precedence, and behavior that respects the shell.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill cli-development --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/cli-developmentContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when building command-line tools. Covers argument design, exit codes, streams and piping, progress output, configuration precedence, and behavior that respects the shell.
name: cli-development description: Use when building command-line tools. Covers argument design, exit codes, streams and piping, progress output, configuration precedence, and behavior that respects the shell. metadata: category: development version: 1.0.0 tags: [cli, terminal, ux, tooling, unix]
Build command-line tools that behave the way the shell expects: composable, scriptable, quiet by default, and honest about failure.
1. **Design the verbs** — Subcommands are verbs on nouns: `tool deploy service`, not `tool --deploy --service`. Group related operations. 2. **Separate the streams** — Results go to stdout. Everything else — progress, warnings, logs — goes to stderr. This is what makes `tool list | grep x` work. 3. **Define the exit codes** — 0 for success, 1 for a general failure, 2 for a usage error. Document any others. 4. **Set the configuration precedence** — Command-line flag beats environment variable beats config file beats default. Never surprise the user by reversing this. 5. **Detect the TTY** — Colour, spinners, and prompts only when stdout is a terminal. When piped, output is plain and non-interactive. 6. **Make destruction opt-in** — Anything irreversible requires confirmation, or `--yes` when non-interactive. `--dry-run` on anything with side effects.
**Stream and exit-code discipline:**
import json, sys
def main(argv: list[str]) -> int:
args = parse_args(argv)
try:
results = search(args.query, limit=args.limit)
except ConfigError as e:
print(f"error: {e}\nhint: run `tool config init` to create a config file", file=sys.stderr)
return 2
except UpstreamError as e:
print(f"error: search backend unavailable: {e}", file=sys.stderr)
return 1
if args.json:
json.dump([r.to_dict() for r in results], sys.stdout)
sys.stdout.write("\n")
else:
for r in results:
print(f"{r.id}\t{r.title}") # stdout: the result
if not results:
print("no matches", file=sys.stderr) # stderr: the commentary
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))`tool search foo | head -5` works. `tool search foo --json | jq .` works. `tool search foo > /dev/null` prints nothing but the commentary. All three are the point.
A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…