cli-architecture

cli-architecture is a skill for Claude Code, Codex from ryo-ebata/cc-audit. It costs 41 tokens per session (2,747 once invoked), scanned A, original, MIT.

A set of design guidelines for command-line tools, including sensible defaults, separate components, and a shared core engine. Command-line tools are programs operated by typing commands in a terminal.

In plain words
What is it for?
Use it when designing features, restructuring a CLI's internal parts, or reviewing its architecture.
Why use it?
It helps keep a CLI easy to use without setup while allowing its parts to work independently or together.

Skill for Claude CodeCodex

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/ryo-ebata/cc-audit/cli-architecture
Any agent
npx skills add ryo-ebata/cc-audit --skill cli-architecture
Clone the repo
git clone --depth 1 https://github.com/ryo-ebata/cc-audit

Made for: Claude Code, Codex.

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-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/ryo-ebata/cc-audit/cli-architecture.svg)](https://agentmods.dev/skills/ryo-ebata/cc-audit/cli-architecture)
Your own site
<a href="https://agentmods.dev/skills/ryo-ebata/cc-audit/cli-architecture"><img src="https://agentmods.dev/badge/skills/ryo-ebata/cc-audit/cli-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,747 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.00041 $0.02747
Opus 5 $0.00020 $0.01373
Sonnet 5 $0.00008 $0.00549
Haiku 4.5 $0.00004 $0.00275

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

Security

Grade A, and why

cli-architecture 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 5d 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.

.claude/skills/cli-architecture/SKILL.md · 457 lines

How it starts

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

CLI Architecture Best Practices

Reference tools: Biome, OxcLint, ripgrep, fd

Core Design Principles

1. Zero-Config by Default

User experience priority:
1. Works out of the box with sensible defaults
2. Configuration is optional enhancement
3. Explicit overrides when needed
// BAD: Requires configuration to work
let config = Config::load("config.yaml")?; // Fails if missing

// GOOD: Sensible defaults, optional config
let config = Config::load_or_default("config.yaml");

2. Modular Composability (Oxc Pattern)

Each component works independently or together:

┌─────────────────────────────────────────────┐
│                    CLI                       │
├─────────────────────────────────────────────┤
│  ┌─────────┐ ┌─────────┐ ┌─────────────┐   │
│  │ Scanner │ │ Reporter│ │ Config      │   │
│  └────┬────┘ └────┬────┘ └──────┬──────┘   │
│       │           │             │           │
├───────┴───────────┴─────────────┴───────────┤
│              Core Engine                     │
├─────────────────────────────────────────────┤
│  ┌────────┐ ┌────────┐ ┌────────┐          │
│  │ Parser │ │ Rules  │ │ Types  │          │
│  └────────┘ └────────┘ └────────┘          │
└─────────────────────────────────────────────┘

3. Performance First

  • Parallel by default: Use rayon for file processing
  • Streaming output: Don't buffer entire results
  • Lazy evaluation: Load resources on demand
  • Memory efficiency: Process files without loading all into memory

Crate Organization (Workspace Pattern)

Recommended Structure

my-tool/
├── Cargo.toml              # Workspace root
├── crates/
│   ├── my_tool/            # Main library (pub API)
│   ├── my_tool_cli/        # CLI binary (thin wrapper)
│   ├── my_tool_parser/     # Parser implementation
│   ├── my_tool_rules/      # Rule definitions
│   ├── my_tool_config/     # Configuration handling
│   └── my_tool_reporter/   # Output formatters
├── xtask/                  # Development tasks
└── tests/                  # Integration tests

Read the full file on GitHub · 457 lines

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. 5d ago First seen · 457 lines · 41 tokens per session scan A 9042121cb475

Subscribe to this mod's changes

cli-architecture is a skill published in the GitHub repository ryo-ebata/cc-audit (24 stars, last pushed yesterday), licensed MIT. It adds 41 tokens to every session and 2,747 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-08-30.

Related

Other skills, from other repositories

rust-code-style

Write idiomatic, well-structured Rust for Wassette — single-responsibility design, anyhow error handling, Arc/Mutex for shared state, and the required formatting and linting with cargo +nightly fmt, cargo clippy, and cargo machete. Use when adding or refactoring Rust code in this repository.

microsoft/wassette · 68 tokens

update-keyboard-shortcuts

Audits and synchronizes keyboard shortcuts across docs/keyboardshortcuts.md, crates/regenerator2000-tui/src/ui/dialogkeyboardshortcut.rs, crates/regenerator2000-tui/src/ui/menu.rs, and the view files (viewdisassembly.rs, viewhexdump.rs, viewcharset.rs, viewbitmap.rs, viewblocks.rs, viewsprites.rs).

ricardoquesada/regenerator2000 · 81 tokens

coding

Skill "coding" from ricardoquesada/regenerator2000, covering 6502 disassembler expert skills, core context, technical requirements, 1. 6502 logic and 2. rust performance & safety.

ricardoquesada/regenerator2000 · 0 tokens

rust-modern-style

Apply rag-rat's Rust style when writing or reviewing Rust: current stable idioms, module-qualified free functions and constants, explicit persistence contracts, and narrow APIs.

cq27-dev/rag-rat · 37 tokens

add-module

Add a new crate to the bioprism workspace implementing a blueprint section, including registering it, choosing dependencies without creating cycles, and the honesty conventions every crate must follow. Use when starting a new module, when asked to cover an uncovered blueprint section, or when setting up work for a…

AURORA-NEURO/aurora-agent · 66 tokens

verify-crate

Verify a bioprism crate is genuinely green — tests passing and clippy at zero warnings — and recognise the environment failures that masquerade as test failures. Use before claiming a crate is done, after landing an agent's work, when a test count looks wrong or lower than expected, or when cargo test reports a…

AURORA-NEURO/aurora-agent · 76 tokens