cli-ops

cli-ops is a skill for Claude Code, Codex from 0xDarkMatter/claude-mods. It costs 53 tokens per session (4,095 once invoked), scanned A, original, MIT.

A set of design patterns for command-line programs, which are tools operated by typing commands in a terminal. It covers help text, consistent commands, machine-readable JSON output, errors, and exit codes.

In plain words
What is it for?
Use it when building or reviewing CLI tools intended for scripts, AI assistants, or power users.
Why use it?
It helps make command-line tools predictable for both people and software that chains commands together, avoiding output and failure behavior that is hard to interpret.

Skill for Claude CodeCodex

Part of the claude-mods plugin — 50 skills, 3 commands, 3 agents, 4 hooks shipped together

Install

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.

agentmods
npx agentmods add skills/0xdarkmatter/claude-mods/cli-ops
Any agent
npx skills add 0xDarkMatter/claude-mods --skill cli-ops
Clone the repo
git clone --depth 1 https://github.com/0xDarkMatter/claude-mods

Made for: Claude Code, Codex.

Or install claude-mods, the plugin that ships this one along with the rest of its 50 skills, 3 commands, 3 agents, 4 hooks.

Wrote 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.

agentmods badge for cli-ops

README.md
[![agentmods](https://agentmods.dev/badge/skills/0xdarkmatter/claude-mods/cli-ops.svg)](https://agentmods.dev/skills/0xdarkmatter/claude-mods/cli-ops)
Your own site
<a href="https://agentmods.dev/skills/0xdarkmatter/claude-mods/cli-ops"><img src="https://agentmods.dev/badge/skills/0xdarkmatter/claude-mods/cli-ops.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,095 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00053 $0.04095
Opus 5 $0.00026 $0.02048
Sonnet 5 $0.00011 $0.00819
Haiku 4.5 $0.00005 $0.00409

Measured 4d ago against content hash 95f8337f871f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli-ops 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 4d 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.

skills/cli-ops/SKILL.md · 635 lines

How it starts

The opening of the file, as written. The whole thing — 635 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLI Patterns for Agentic Workflows

Patterns for building CLI tools that AI assistants and power users can chain, parse, and rely on.

Philosophy

Build CLIs for agentic workflows - AI assistants and power users who chain commands, parse output programmatically, and expect predictable behavior.

Core Principles

Principle Meaning Why It Matters
Self-documenting --help is comprehensive and always current LLMs discover capabilities without external docs
Predictable Same patterns across all commands Learn once, use everywhere
Composable Unix philosophy - do one thing well Tools chain together naturally
Parseable --json always available, always valid Machine consumption without parsing hacks
Quiet by default Data only, no decoration unless requested Scripts don't break on unexpected output
Fail fast Invalid input = immediate error No silent failures or partial results

Design Axioms

  1. stdout is sacred - Only data. Never progress, never logging, never decoration.
  2. stderr is for humans - Progress bars, colors, tables, warnings live here.
  3. Exit codes have meaning - Scripts can branch on failure mode.
  4. Help includes examples - The fastest path to understanding.
  5. JSON shape is predictable - Same structure across all commands.

Command Architecture

Structural Pattern

<tool> [global-options] <resource> <action> [options] [arguments]

Every CLI follows this hierarchy:

<tool>
├── --version, --help              # Global flags
├── auth                           # Authentication (if required)
│   ├── login
│   ├── status
│   └── logout
└── <resource>                     # Domain resources (plural nouns)
    ├── list                       # Get many
    ├── get <id>                   # Get one by ID
    ├── create                     # Make new (if supported)
    ├── update <id>                # Modify existing (if supported)
    ├── delete <id>                # Remove (if supported)
    └── <custom-action>            # Domain-specific verbs

Read the full file on GitHub · 635 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 4d ago First seen · 635 lines · 53 tokens per session scan A 95f8337f871f

Subscribe to this mod's changes

cli-ops is a skill published in the GitHub repository 0xDarkMatter/claude-mods (32 stars, last pushed 11d ago), licensed MIT. It adds 53 tokens to every session and 4,095 once invoked, about $0.0003 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-08-30.