Files
magnus919_agent-skills/cli-builder
Magnus Hedemarkandfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> a6db4c9645 docs(catalog): clarify mutation and CLI contracts
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-09-01 17:47:41 -04:00
..

CLI Builder — Design Agent-Friendly CLI Tools

A comprehensive design guide and scaffold for building CLI tools that AI agents can actually use. 10 universal design patterns grounded in real failures from building 15+ agent-facing CLIs.

Why Install This Skill

When your agent loads this skill, it can design, build, and refactor CLI tools that agents can discover and use without human help. That means:

  • Every --help output becomes a contract the agent parses to understand your tool
  • Design --json as a documented contract for machine-readable output agents can consume
  • Establish or review idempotency so safe reruns are explicit rather than assumed
  • Authentication is lazy — help and dry-run work without credentials
  • Errors are structured — different exit codes for different failure modes

What You Get

Directory Purpose
SKILL.md Concise workflow for discovery, predictable contracts, verification, and maintenance
templates/ Bash CLI scaffold for local wrappers
references/ Python API clients, advanced patterns, readiness checklist, wrapper example, MCP decisions, and improvement cycle

Triggers

Load this when building a new CLI tool, refactoring an existing tool that causes agent friction, or debugging why your agent keeps failing to use a CLI properly.

Requirements

Bash, Python 3.8+, jq, and a standard Unix CLI environment.

Quick Start

Start with the setup and first workflow in SKILL.md, then use the linked resources for the specific task you need to complete.