ai-friendly-cli
Installation
SKILL.md
AI-Friendly CLI
Overview
Human DX optimizes for discoverability and forgiveness. Agent DX optimizes for predictability and defense-in-depth. These require fundamentally different design approaches.
This skill provides 8 principles for building or refactoring command-line interfaces so that AI agents can invoke them reliably, safely, and efficiently. The core insight: agents hallucinate inputs, pay per token, and can't read interactive prompts. Your CLI must defend against all three.
When to Use
Use this skill when:
- Adding AI/agent support to an existing CLI tool
- Building a new CLI that agents will invoke
- Wrapping an API as a CLI tool (REST, GraphQL, gRPC)
- Designing MCP servers alongside CLI interfaces
- Hardening inputs against hallucinated or malformed agent inputs
- Reducing token cost by limiting response sizes
- Adding structured output (JSON, NDJSON) to human-oriented CLIs