Home
cd ../playbooks
Developer ToolsIntermediate

Agent DX CLI Scale

A 7-axis, 0-21 scoring scale for evaluating how well a CLI is designed for AI agents rather than humans — machine-readable output, raw payload input, schema introspection, context-window discipline, input hardening, safety rails, and agent knowledge packaging.

5 minutes
By Google LabsSource
#cli-design#agent-tooling#developer-experience#mcp#api-design#prompt-injection

Human DX optimizes for discoverability and forgiveness; agent DX optimizes for predictability and defense-in-depth — two different design goals that most CLIs quietly conflate, which is exactly why an agent driving a human-optimized CLI wastes tokens, hallucinates flags, and fails silently.

Who it's for: developers building CLIs that AI agents will drive, platform teams deciding whether to build a dedicated agent-facing mode, engineers debugging why an agent keeps mishandling a specific tool, anyone designing MCP servers or agent tool surfaces on top of an existing CLI

Example

"Score our CLI for agent-readiness" → A 0-21 score across 7 axes with cited evidence per axis (which command, which flag), a clear identification of the lowest-scoring gaps — often safety rails (no dry-run, no response sanitization) — and a rating from Human-only through Agent-first that tells the team exactly what to fix next instead of a vague 'needs work' verdict

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

Or install from your terminal:
npx ccplaybooks add agent-dx-cli-scale
# Agent DX CLI Scale

A scoring scale for evaluating how well a CLI is designed for AI agents rather than humans. Human DX optimizes for discoverability and forgiveness; agent DX optimizes for predictability and defense-in-depth. Use this to evaluate an existing CLI, or as a design checklist when building a new one that agents will drive.

## When to Use

- Auditing whether a CLI your agents rely on is actually agent-ready
- Deciding whether to build a dedicated agent-facing mode for an existing CLI
- Designing a new CLI or tool surface that AI agents will operate
- Diagnosing why an agent keeps hallucinating flags, wasting tokens, or failing silently against a specific tool

## Scoring Axes

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

A concrete, evidence-based scoring scale for whether a CLI is actually designed for AI agents to drive — as distinct from a CLI that's merely usable by one. Seven axes, each scored 0–3: machine-readable output (structured JSON, not tables and color codes), raw payload input (can an agent send the API schema directly instead of translating through bespoke flags?), schema introspection (can it discover what's valid at runtime?), context-window discipline (field masks and pagination that protect the agent's token budget), input hardening against agent-specific failure modes (hallucinated paths, embedded query params — not typos), safety rails (dry-run plus sanitization against prompt injection riding in on API responses), and agent knowledge packaging (does it ship the skill files an agent needs at conversation start?).

The total (0–21) maps to four ratings — Human-only, Agent-tolerant, Agent-ready, Agent-first — but the real value is per-axis: a CLI that scores well on structured output and poorly on safety rails has a specific, fixable gap, not a general "needs work" verdict. A non-scored bonus section flags multi-surface readiness (MCP support, plugin install, headless auth) as a separate capability multiplier worth noting even though it doesn't count toward the total.


Quick Start

Step 1: Create a Project Folder

mkdir cli-scale && cd cli-scale

Step 2: Download the Template

Click Download above, then:

mv ~/Downloads/CLAUDE.md ./

Step 3: Score a CLI

claude

Point Claude at a CLI's --help output, its documentation, or its source, and ask it to score the CLI against the 7 axes. For a new CLI, ask it to use the scale as a design checklist instead.


Tips & Best Practices

  • The safety-rails axis is the one teams most often skip entirely — it's easy to add structured output and call a CLI "agent-ready" while leaving it wide open to prompt injection riding in on API responses.
  • A CLI that scores well on raw payload input but poorly on schema introspection creates a specific, painful failure mode: an agent that can send anything but has no reliable way to know what's valid, so it guesses and gets it wrong just often enough to be expensive.
  • Treat agent knowledge packaging as cheap, high-leverage effort — a well-written skill file describing invariants ("always dry-run before a delete") often closes gaps that would otherwise require actual code changes on the other axes.

Limitations

  • A scoring framework for CLI design, not a security audit tool — a CLI can score well here and still have vulnerabilities this scale doesn't probe for.
  • Assumes the CLI's primary consumer is an autonomous or semi-autonomous agent; a CLI built purely for human interactive use isn't failing by scoring low here, it's serving a different audience.
  • The bonus multi-surface criteria are intentionally non-scored — don't let a high MCP or plugin score paper over a low score on the seven core axes.

$Related Playbooks

Developer Tools

Agent Design Philosophy

A mental model for designing AI agents in any domain — the model already knows how to be an agent, so design is about capabilities, knowledge, and context, added only as far as a Progressive Complexity ladder (basic → planning → subagents → skills) that real usage actually demands.

10 minutes
Intermediate
Developer Tools

Agent Prompt Architect

A compact seven-field skeleton (Role, Goal, Inputs, Constraints, Process, Output, Verification, Fallback) and a fast refinement loop for turning vague intent into a prompt an agent can execute reliably every time.

5 minutes
Beginner
Developer Tools

Agent SDK App Builder

Scaffold new Claude Agent SDK applications in TypeScript or Python, and verify existing ones against official SDK patterns before you ship.

10 minutes
Intermediate
Developer Tools

Brandkit Generator: Premium Identity Board Creator

An image-direction rule set that produces a complete brand-guidelines board in one image: logo concept, color system, typography, and applications, grounded in brand strategy instead of random logo generation

5 minutes
Beginner
Developer Tools

Brutalist UI Skill: Industrial & Tactical Interface Design

A design language that forces Claude to build raw, mechanical interfaces — Swiss industrial print or CRT terminal telemetry, with rigid grids and zero rounded corners

5 minutes
Intermediate
Developer Tools

Programmatic Screen Capture

Capture screenshots programmatically on macOS — find window IDs, control application windows via AppleScript, and capture specific windows for documentation and visual workflows.

10 minutes
Intermediate
Developer Tools

Continue Claude Work

Recover actionable context from local .claude session artifacts and continue interrupted work — without running claude --resume — by inspecting history first.

10 minutes
Intermediate
Developer Tools

AI Agent Builder

Build AI agents with tools, memory, and multi-step reasoning - ChatGPT, Claude, Gemini integration patterns

10 minutes
Advanced
Developer Tools

Browser Automation Assistant

Automate web browser interactions, scraping, testing, and workflow automation with Puppeteer/Playwright

10 minutes
Advanced
Developer Tools

Composio SDK with Claude Code: Connect 250+ APIs in Minutes

Connect Claude Code to 250+ APIs using Composio SDK. Build AI agents that send emails, create GitHub issues, and post to Slack — not just generate text.

15 minutes
Advanced
Developer Tools

Auth & Authorization Patterns

A battle-tested checklist for implementing authentication and authorization correctly — password hashing, short-lived JWTs with refresh tokens, OAuth2 Authorization Code + PKCE, the four token claims to always validate, RBAC/ABAC at the service layer, and session-fixation and cookie-flag defenses, each with the why behind it.

5 minutes
Intermediate
Developer Tools

Android Restore Credentials

Implement Android's Restore Credentials feature with androidx.credentials — the two-tier background/foreground restoration architecture, the createCredential fallback for devices without end-to-end encryption, sign-in and deletion flows with real Kotlin code, and the backend guidelines a client-side implementation must hand off to the developer, not implement itself.

10 minutes
Intermediate

Browse all Developer Tools playbooks →