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 agentmods add skills/fmind/dot/cli-contractsnpx skills add fmind/dot --skill cli-contractsgit clone --depth 1 https://github.com/fmind/dotWrote 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/fmind/dot/cli-contracts)<a href="https://agentmods.dev/skills/fmind/dot/cli-contracts"><img src="https://agentmods.dev/badge/skills/fmind/dot/cli-contracts.svg" alt="Measured on agentmods" 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.00033 | $0.00605 |
| Opus 5 | $0.00016 | $0.00302 |
| Sonnet 5 | $0.00007 | $0.00121 |
| Haiku 4.5 | $0.00003 | $0.00060 |
Grade A, and why
cli-contracts 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 2d 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 — 33 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLI Contracts
Define a command-line interface as a stable human and machine contract before implementing it. go-stack and python-stack own the language code; systematic-debugging owns unknown failures.
Workflow
- Name the jobs: one purpose per command, a predictable noun-verb hierarchy, and aliases only when they cannot trigger a different class of action.
- Specify inputs: positional arguments, flags, environment variables, config precedence, defaults, validation, mutual exclusions, and behavior without a TTY.
- Separate streams: requested data to stdout, diagnostics and progress to stderr;
--jsonstays machine-readable, schema-stable, and free of decoration. - Define outcomes: map success, usage errors, authentication failures, remote failures, partial results, and cancellation to documented exit codes; never turn an error into an empty success.
- Make help executable: root and subcommand help, examples, deprecations, and shell completions generate from the same command definition.
- Protect sensitive context: errors show safe command and argument context, never collected values, tokens, provider response bodies, or unredacted stderr.
- Handle process behavior: respect signals, cancellation, timeouts, piping, broken pipes, and cleanup; a destructive command needs a confirmation or an explicit non-interactive opt-in such as
--yes. - Preserve compatibility deliberately: command names, flags, JSON fields, exit codes, and script-consumed stdout are public API; prefer deprecation and migration guidance over silent changes.
- Test the contract: help, parsing, validation, streams, exit codes, JSON schema, cancellation, and representative success and failure paths, then
mise run checkandmise run test. - Exercise the installed binary: from a clean shell, piped and non-TTY; direct function tests alone do not prove the contract.
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.
- 2d ago First seen · 33 lines · 33 tokens per session scan A 8554fb2d56c4
cli-contracts is a skill published in the GitHub repository fmind/dot (4 stars, last pushed yesterday), licensed MIT. It adds 33 tokens to every session and 605 once invoked, about $0.0002 per session on Opus 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-03.
Other skills, from other repositories
go-stack
Build Go projects, libraries, CLIs, TUIs, web apps, or ADK agents with the standard package layout and pinned tooling.
python-stack
Build typed Python projects with uv, Ruff, ty, pytest, Litestar, and Typer. Use for packages, CLIs, web apps, tests, typing, or API verification.
k8s-local
Create and manage local Kubernetes clusters (k3d or kind) and deploy to them with kubectl, helm, helmfile, and skaffold. Use for local k8s cluster setup, dev loops, and debugging.
release
Cut or verify a versioned release — bump semver, generate the changelog with git-cliff, tag and publish on GitHub, or reconcile an already-published tag and assets.
chezmoi
Manage chezmoi dotfiles: source naming, Go templates, age-encrypted secrets, and the edit-source then apply/diff workflow.
cloud-run
Deploy container services to Google Cloud Run with Artifact Registry, keyless CI identity, Secret Manager, ko, or Dockerfiles.