Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add tmj-90/gaffer --skill add-cli-commandgit clone --depth 1 https://github.com/tmj-90/gafferWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tmj-90/gaffer/add-cli-command)<a href="https://agentmods.dev/skills/tmj-90/gaffer/add-cli-command"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/add-cli-command/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tmj-90/gaffer/add-cli-command"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/add-cli-command.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00095 | $0.01304 |
| Opus 5.5 | $0.00038 | $0.00522 |
| Sonnet 5.5 | $0.00019 | $0.00261 |
| Haiku 4.5 | $0.00010 | $0.00130 |
Grade A, and why
add-cli-command scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 16d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add a CLI command
A CLI is an API whose consumers are humans at a terminal and scripts in a pipeline. Scripts depend on the exit code, the stdout format and the flag names; humans depend on the help text and error messages. Follow the tool's existing conventions first and the Command Line Interface Guidelines (clig.dev) where the tool is silent.
Steps
- Read a sibling command. Find the entry point and command registry (Commander,
yargs, Click, Typer, Cobra, clap, picocli, System.CommandLine) and copy an existing
command's parsing, validation, output and exit handling. Call
search_lorefor the CLI's JSON envelope, error format and exit-code table. - Design the surface and write
--helpfirst. Match the tool's naming (ticket create, notcreateTicket). Positional arguments only for the one thing the command acts on; everything else is a long flag, with a short alias only where siblings use one. Reuse standard names:-h/--help,--version,--json,-q/--quiet,-f/--force,-n/--dry-run,--no-input,--no-color. Help leads with a usage line and one or two examples. If the help is hard to write, the surface is wrong. - Validate before doing any work. Parse and validate every argument, reject
unknown flags, and fail with a one-line message naming the bad input and the fix.
Exit codes:
0success, non-zero on any failure, and the tool's usage-error code (commonly2) for bad arguments. Never exit 0 after printing an error. - Separate output streams. stdout carries the result only; errors, warnings,
progress and logs go to stderr.
--jsonprints exactly one JSON document (or the tool's documented NDJSON) on stdout and nothing else, including on failure if the envelope defines an error shape. Disable colour and spinners when stdout is not a TTY, whenNO_COLORis set, or with--no-color. - Be safe to script. Prompt only when stdin is a TTY and
--no-inputis absent; otherwise fail with the flag that supplies the answer. Destructive or remote-changing actions confirm interactively or require--force; offer--dry-runwhen siblings do. Make re-runs safe (idempotent where possible) and give network calls a timeout. On Ctrl-C, stop promptly and exit non-zero (130 by convention). - Keep the command thin. Parse, call the same service or core the API uses, render.
Business logic in the handler cannot be reused or unit-tested without a process.
If the command writes shared files or state that another invocation, the server or
a worker may write concurrently, follow the
concurrency-and-asyncskill (atomic temp-and-rename, a real lock). - Handle configuration and secrets. Read config through the repo's config spine
(the
add-config-optionskill), never raw env reads, and honour the siblings'--config/--dboverrides. Never accept a secret as a flag value (it lands in shell history andps); read it from a file, stdin or the configured secret source. Never print secrets. - Test at both levels. Unit-test the core logic. Spawn the real binary for the
contract, one test per AC that exercises the AC's own behaviour, and assert:
- exit code for success, a usage error and an operational failure;
--jsonstdout parses as JSON with the documented shape, and stderr carries diagnostics without polluting stdout;- the error message for bad input;
--helplists the new command or flag; - non-TTY behaviour: no prompt, no colour; a missing answer fails with a message naming the flag that supplies it.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 16d ago Changed · +22 lines e90f9cbfc8fb
- 19d ago First seen · 61 lines · 95 tokens per session scan A d5c749d21c8f
add-cli-command is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 17d ago), licensed Apache-2.0. It adds 95 tokens to every session and 1,304 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-28.
Other skills, from other repositories
bulwark-brainstorm
Role-based brainstorming with dual modes: --scoped (sequential Task tool, 5 roles) and --exploratory (Agent Teams peer debate, 4 roles). Use for feasibility assessment and idea validation.
plan-creation
Create structured implementation plans via a 4-role scrum team (Product Owner, Architect, Eng/Delivery Lead, QA/Critic) with optional Agent Teams peer debate mode.
anthropic-validator
Validates Claude Code assets (skills, hooks, agents, commands, MCP servers, plugins) against official Anthropic standards. Fetches latest docs dynamically and produces structured validation reports.
create-subagent
Generates single-purpose Claude Code sub-agents for use via the Task tool. Use when creating dedicated sub-agents, scaffolding agent definitions, or generating agents with diagnostics and permissions setup.
test-audit
Audit test suites for T1-T4 violations using AST analysis, mock detection, and multi-stage synthesis. Invoke when user asks to audit tests, check test quality, find mock violations, review test effectiveness, or inspect test suites for over-mocking. Triggers automatic rewrites when quality gates fail.
code-review
Comprehensive code review with distinct aspect based sections. Use when reviewing code, checking for security issues, finding type safety problems, auditing code quality, or when user asks to review code, PRs or changes. Three-phase workflow runs static tools, LLM judgment, and writes diagnostic log.