cli-design

cli-design is a skill for Claude Code from tenstorrent/tt-studio. It costs 199 tokens per session (3,579 once invoked), scanned B, original, Apache-2.0.

A reusable design guide and reference implementation for command-line tools, which are programs controlled by typed terminal commands. It defines how one entry point starts itself, shows help, runs phases, reports failures, and displays status.

In plain words
What is it for?
Use it to design or add a terminal interface, organize grouped help, show progress through fixed phases, handle failures, and provide a working CLI skeleton.
Why use it?
It keeps command-line output understandable when the underlying work involves noisy tools such as Docker, package installers, downloads, or background services. It also gives the command surface and output style a consistent structure.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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/tenstorrent/tt-studio/cli-design
Any agent
npx skills add tenstorrent/tt-studio --skill cli-design
Clone the repo
git clone --depth 1 https://github.com/tenstorrent/tt-studio

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/tenstorrent/tt-studio/cli-design.svg)](https://agentmods.dev/skills/tenstorrent/tt-studio/cli-design)
Your own site
<a href="https://agentmods.dev/skills/tenstorrent/tt-studio/cli-design"><img src="https://agentmods.dev/badge/skills/tenstorrent/tt-studio/cli-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 199 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,579 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.1 $0.00199 $0.03579
Opus 5 $0.00100 $0.01790
Sonnet 5 $0.00040 $0.00716
Haiku 4.5 $0.00020 $0.00358

Measured 6d ago against content hash 98b7103debc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

cli-design scanned grade B with 1 finding 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 6d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (install.py, reference/cli_skeleton.py, reference/console.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- **Link docs; don't offer to fix the user's machine.** No `sudo service docker start`
.claude/skills/cli-design/SKILL.md · 263 lines

How it starts

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

CLI design

How to build a CLI that orchestrates messy tools (Docker/compose, package installs, downloads, background services) and still reads like something a person designed. The tools emit thousands of lines; the user needs about twelve. This is the whole design — command surface, run structure, output, failures, checks, testing — and nothing in it is specific to one repo.

Install into another repo

python3 install.py ../other-repo                        # skill + reference files
python3 install.py ../other-repo --module-dest mycli/console.py   # …and wire the module in
python3 install.py --user                               # available in every repo on this machine

Then see the design run before adopting it:

python3 reference/demo.py            # the output language, ~15s   (--fail for failure paths, -v for verbose)
python3 reference/cli_skeleton.py --help   # the command surface  (then: no flags, --info, --stop)
File What it gives you
reference/cli_skeleton.py a working CLI in this design: bootstrap → parse → early dispatch → phases → ready card
reference/console.py the output layer (Rich only): theme, step(), phases, activity row, cards
reference/demo.py runnable tour of every output element; doubles as a smoke test
reference/patterns.md the four failure/progress patterns, with before/after and tests
reference/test_cli_output.py copy into tests/: pure helpers, stream parsing, PTY + non-TTY render checks

Reference implementation in the wild: TT-Studio's tt_setup/ (+ its house-rules doc dev-docs/launcher-terminal-design.md).


1. The shape of the CLI

One entrypoint. python run.py (or mycli) does everything: setup, start, stop, purge, logs, status, bug reports. Not a script per task, not a Makefile the user has to read. One name to remember, discoverable from --help.

It bootstraps itself. First run creates the managed venv, installs deps, and re-execs. The user needs a python3, nothing else. That bootstrap code runs before your dependencies exist — stdlib only, and it must never import your pretty layer. Mimic the style by hand there (a plain stdlib spinner is ~15 lines).

Read the full file on GitHub · 263 lines

Files

What ships with it

6 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. 6d ago First seen · 263 lines · 199 tokens per session scan B 98b7103debc3

Subscribe to this mod's changes

cli-design is a skill published in the GitHub repository tenstorrent/tt-studio (49 stars, last pushed today), licensed Apache-2.0. It adds 199 tokens to every session and 3,579 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). 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

compiler-orchestrator

Orchestrate the Rust compiler port end-to-end. Discovers the current frontier, fixes failing passes, ports new passes, reviews, and commits in a loop.

react/react · 38 tokens

client-setup

Create a vanilla tRPC client with createTRPCClient (), configure link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.

trpc/trpc · 63 tokens

adapter-express

Mount tRPC as Express middleware with createExpressMiddleware() from @trpc/server/adapters/express. Access Express req/res in createContext via CreateExpressContextOptions. Mount at a path prefix like app.use('/trpc', ...). Avoid global express.json() conflicting with tRPC body parsing for FormData.

trpc/trpc · 67 tokens

trpc-router

Entry point for all tRPC skills. Decision tree routing by task: initTRPC.create(), t.router(), t.procedure, createTRPCClient, adapters, subscriptions, React Query, Next.js, links, middleware, validators, error handling, caching, FormData.

trpc/trpc · 59 tokens

review-pending-pr-reviews

Review, grill, edit, and post pending PR review drafts saved by /review-pr (or its batch/cron runners). Lists drafts that have not yet been posted, walks the maintainer through each finding, then posts, closes, or discards. Use when the user says "post my pending reviews", "what reviews are waiting", "go through the…

nrwl/nx · 93 tokens

compiler-port

Port a compiler pass from TypeScript to Rust. Gathers context, plans the port, implements in a subagent with test-fix loop, then reviews.

react/react · 35 tokens