agent-cli-builder
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Pass
- Code scan — Scanned 1 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Build, retrofit, and score agent-native CLIs. An Agent Skill with a 12-step workflow, an 11-axis weighted rubric, and a Python+Typer scaffold.
agent-cli-builder
An Agent Skill for designing, refactoring, and reviewing agent-native CLIs from first principles — grounded in how AI agents actually perceive, reason, fail, and compose tools in the shell.
Most CLIs are built for human eyes and fingers, then "made agent-compatible" by bolting on --json. An agent-native CLI flips the order: the contract is shaped around an AI agent's real cognitive profile — context-window cost, lack of visual scanning, confident hallucinations, retry loops, and turn-based timeouts — while humans get a clean interactive text mode on top of the same core.
Rather than locking you into rigid language templates or boilerplate generators (which coding agents already write effortlessly and which go stale against real systems), agent-cli-builder teaches the lens, the universal contracts, the domain-shaped architectural trade-offs, and a curated index of production open-source exemplars.
Core Ideas
1. Think Like an Agent (Human Friction != Agent Friction)
Before adding any command, flag, or wrapper, ask: "What friction does this address, and does an AI agent actually have that friction?"
- Piggyback on pretrained priors (
git,SQL,gh): Map stateful remote editing ontogit(pull→ edit local files →diff→push, or even agit-remote-*helper) and structured filtering ontoSQL. Saying "it works likegit" activates billions of tokens of pretrained working-tree and conflict-safety intuition in one sentence. - Do not wrap what agents already speak fluently: SQL, declarative query DSLs (OData, KQL, JQL), JSON, shell pipes, and local file edits. Wrapping
WHERE status = 'open'into twenty narrow filter subcommands imports human typing friction as pure context tax. - Wrap aggressively where agent friction is severe: progressive slicing over 500-page documents (
search → outline → section), multi-endpoint triage fan-out (+investigate), hidden frontend validation/encoding rules, optimistic-concurrency read-modify-write, and blast-radius safety gates.
2. Universal Invariants vs. Domain-Shaped Choices
| Layer | What belongs here |
|---|---|
| Universal Invariants (hold in every CLI) | Pure stdout JSON envelopes ({ok, data, metadata}) when piped; branchable error taxonomy (type / subtype / details, 401 separated from 403, partial failure & _partial section reporting); >10 KB disk spill receipts; one declarative command spec (defineCommand) driving --help, schema, previews, gates, and tests; --explain revealing preset queries; orthogonal 3-layer write safety (--yes consent + <CLI>_MAX_RISK session ceiling + read/write auth lanes); mechanical CI drift gates (verify). |
| Domain-Shaped Choices (depend on substrate physics) | Thin backend + rich web UI → choose TypeScript (when JS/TS frontend source or packages exist) to import/vendor the UI's rule engine, models, and codecs directly so behavior matches by construction; complete OpenAPI/Discovery backend → Go or Rust single static binaries shine. Write surface → --field k=v for scalars, --json/@file:// for clean API objects, Local File Workspaces (init / pull / diff / push) for multi-field rich-text/stateful records. Read & offline → progressive compilers + optional local sqlite cache lane for sandboxed/sub-10ms queries. |
3. Curated Exemplar Index (Good Examples to Study)
| Exemplar | Stack & domain shape | What to study |
|---|---|---|
lark-cli (Feishu / Lark) |
Go · 200+ commands across 11+ collaboration domains + shipped skills | Gold-standard typed error taxonomy (type/subtype + lint-enforced registry + missing_scopes); +shortcut helpers (drive +sync, markdown +patch, calendar +agenda); turn-aware split-flow login; --as user|bot identity pinning; _notice skill-drift channel |
gws (Google Workspace) |
Rust · Discovery-driven multi-service platform | Runtime gws schema <method> introspection; +triage / +send workflow helpers alongside raw REST verbs; layered shared / service / helper / recipe skills; NDJSON --page-all; structured --dry-run |
olcli (Overleaf CLI) |
TypeScript · Web-editor backed CLI + Git remote + MCP | git-like workflow (pull, diff --exit-code, push --dry-run, sync) + git-remote-overleaf (git clone overleaf::...) leveraging pretrained git priors; single TS library backing CLI, Git helper, and MCP |
gh (GitHub CLI) |
Go · Developer workflow baseline | Ecosystem vocabulary muscle memory (<noun> <verb>, gh api escape hatch, --json <fields> --jq, auth status) |
cf (Cloudflare) |
Schema-generated (~3,000 operations) | One canonical schema generating CLI, SDKs, Terraform, and MCP without vocabulary drift |
ant (Anthropic) |
OpenAPI-generated API CLI | Separate --format / --format-error (json, jsonl, raw, yaml), built-in GJSON --transform, recursive @file:// substitution, 4-tier auth precedence warning |
heygen-cli |
Single-product async media CLI | Offline --request-schema / --response-schema, {path, size_bytes} binary download receipts, --async + --wait |
Repository Structure
Everything installs under skills/agent-cli-builder/. SKILL.md stays lean (<= 1.5k tokens) and routes on demand into focused reference guides:
agent-cli-builder/
├── README.md
├── CHANGELOG.md
├── LICENSE
└── skills/
└── agent-cli-builder/
├── SKILL.md # Lean entry point: agent-native thesis, lens, invariants vs choices, router
├── evals/
│ └── evals.json # Skill evaluation suite across 6 architectural & review scenarios
└── references/
├── think-like-an-agent.md # Cognitive profile, 3 friction classes, loading-model eras, 7 self-checks
├── domain-archetypes.md # Thin-backend TS frontend reuse, doc compilers, SQLite lanes, stack matrix
├── command-and-io-contracts.md # <noun> <verb>, the 4-part +helper test, defineCommand, envelopes & errors
├── writes-workspaces-and-safety.md # init/pull/diff/push workspaces, --explain/--dry-run/--validate, 3-layer safety
├── skills-and-enforcement.md # Research-first discovery, 4-surface docs, anti-slop SKILL.md, verify & 4-tier evals
├── exemplars.md # Problem -> exemplar lookup matrix + caveats on what NOT to copy blindly
└── audit-and-retrofit.md # Evidence-first review checklist, Step 0 retrofit sequence & share-core MCP
Installation
Vercel skills CLI (skills.sh)
npx skills add Zekai-Zhao-321/agent-cli-builder
GitHub CLI (gh skill)
gh skill install Zekai-Zhao-321/agent-cli-builder agent-cli-builder
Manual clone
git clone https://github.com/Zekai-Zhao-321/agent-cli-builder.git /tmp/_acb \
&& cp -R /tmp/_acb/skills/agent-cli-builder ~/.agents/skills/agent-cli-builder \
&& rm -rf /tmp/_acb
| Harness | Typical skills path |
|---|---|
Universal (Codex, Antigravity, etc.) |
~/.agents/skills/agent-cli-builder or .agents/skills/agent-cli-builder |
| Claude Code | ~/.claude/skills/agent-cli-builder or .claude/skills/agent-cli-builder |
| Cursor | .cursor/rules/ or ~/.cursor/rules/ |
| Gemini CLI | gemini skills install https://github.com/Zekai-Zhao-321/agent-cli-builder.git --path skills/agent-cli-builder |
| OpenCode | ~/.opencode/skills/agent-cli-builder |
When This Skill Triggers
- "Help me design an agent-native CLI for our ticket / docs / deployment platform."
- "Our backend is just a generic record store and all the validation rules live in our Angular/React frontend — how should we build an agent CLI?"
- "Refactor our existing Click / Cobra / Commander CLI so Claude Code and Codex stop failing on prompts and tracebacks."
- "Should we build an MCP server, a CLI + Skill, or both?"
- "Write a companion
SKILL.mdand drift-check suite for our CLI." - "Review our CLI's
--helpand JSON envelopes for agent readiness."
License
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found