agent-dx-cli-scale
A scoring scale for evaluating how well a CLI is designed for AI agents, based on the "Rewrite Your CLI for AI Agents" principles.
What this skill does
# Agent DX CLI Scale Use this skill to **evaluate any CLI** against the principles of agent-first design. Score each axis from 0–3, then sum for a total between 0–21. > Human DX optimizes for discoverability and forgiveness. > Agent DX optimizes for predictability and defense-in-depth. > — [You Need to Rewrite Your CLI for AI Agents](/posts/rewrite-your-cli-for-ai-agents) --- ## Scoring Axes ### 1. Machine-Readable Output Can an agent parse the CLI's output without heuristics? | Score | Criteria | | ----- | ----------------------------------------------------------------------------------------------------- | | 0 | Human-only output (tables, color codes, prose). No structured format available. | | 1 | `--output json` or equivalent exists but is incomplete or inconsistent across commands. | | 2 | Consistent JSON output across all commands. Errors also return structured JSON. | | 3 | NDJSON streaming for paginated results. Structured output is the default in non-TTY (piped) contexts. | ### 2. Raw Payload Input Can an agent send the full API payload without translation through bespoke flags? | Score | Criteria | | ----- | ------------------------------------------------------------------------------------------------------------------------------------- | | 0 | Only bespoke flags. No way to pass structured input. | | 1 | Accepts `--json` or stdin JSON for some commands, but most require flags. | | 2 | All mutating commands accept a raw JSON payload that maps directly to the underlying API schema. | | 3 | Raw payload is first-class alongside convenience flags. The agent can use the API schema as documentation with zero translation loss. | ### 3. Schema Introspection Can an agent discover what the CLI accepts at runtime without pre-stuffed documentation? | Score | Criteria | | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | 0 | Only `--help` text. No machine-readable schema. | | 1 | `--help --json` or a `describe` command for some surfaces, but incomplete. | | 2 | Full schema introspection for all commands — params, types, required fields — as JSON. | | 3 | Live, runtime-resolved schemas (e.g., from a discovery document) that always reflect the current API version. Includes scopes, enums, and nested types. | ### 4. Context Window Discipline Does the CLI help agents control response size to protect their context window? | Score | Criteria | | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | 0 | Returns full API responses with no way to limit fields or paginate. | | 1 | Supports `--fields` or field masks on some commands. | | 2 | Field masks on all read commands. Pagination with `--page-all` or equivalent. | | 3 | Streaming pagination (NDJSON per page). Explicit guidance in context/skill files on field mask usage. The CLI actively protects the agent from token waste. | ### 5. Input Hardening Does the CLI defend against the specific ways agents fail (hallucinations, not typos)? | Score | Criteria | | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 0 | No input validation beyond basic type checks. | | 1 | Validates some inputs, but does not cover agent-specific hallucination patterns (path traversals, embedded query params, double encoding). | | 2 | Rejects control characters, path traversals (`../`), percent-encoded segments (`%2e`), and embedded query params (`?`, `#`) in resource IDs. | | 3 | Comprehensive hardening: all of the above, plus output path sandboxing to CWD, HTTP-layer percent-encoding, and an explicit security posture — _"The agent is not a trusted operator."_ | ### 6. Safety Rails Can agents validate before acting, and are responses sanitized against prompt injection? | Score | Criteria | | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 0 | No dry-run mode. No response sanitization. | | 1 | `--dry-run` exists for some mutating commands. | | 2 | `--dry-run` for all mutating commands. Agent can validate requests without side effects. | | 3 | Dry-run plus response sanitization (e.g., via Model Armor) to defend against prompt injection embedded in API data. The full request→response loop is defended. | ### 7. Agent Knowledge Packaging Does the CLI ship knowledge in formats agents can consume at conversation start? | Score | Criteria | | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 0 | Only `--help` and a docs site. No agent-specific context files. | | 1 | A `CONTEXT.md` or `AGENTS.md` with basic usage guidance. | | 2 | Structured skill files (YAML frontmatter + Markdown) covering per-command or per-API-surface workflows and invariants. | | 3 | Comprehensive skill library encoding agent-spec
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.