packages/sc-ai-cli/skills/creating-ai-clis/SKILL.md
Create or harden CLIs intended primarily for AI or system consumption and secondarily for humans. Use when designing or implementing a JSON-first CLI with an MCP-ready contract seam, where every command supports machine output, errors are typed and actionable, mutating commands are auditable via corresponding read commands, and external integrations need simulator-backed testing. Do not use for human-first shell utilities, one-off scripts, or text-only CLIs.
npx skillsauth add randlee/synaptic-canvas creating-ai-clisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the machine contract is the primary product and the human CLI is a secondary interface. The CLI should be directly usable by agents and should be structured so a future MCP wrapper can reuse the same request and response models without reshaping business JSON. This package does not currently ship MCP templates.
Use this skill for:
Do not use this skill for:
Keep these top-level rules in mind:
--json, stable envelopes, typed actionable errors, and stable codes are mandatoryThe detailed contract lives in the reference files below.
references/core-contract.md — language-agnostic contract for JSON-first CLI designreferences/error-contracts.md — typed, actionable error modeling for AI-facing CLIsreferences/mcp-compatibility.md — how to keep CLI and MCP behavior identical without JSON reshapingreferences/simulation-and-auditability.md — simulator, auditability, and mutation/read-pair guidancereferences/template-generation.md — sc-compose/MiniJinja template patterns for repeatable CLI scaffoldingreferences/example-repos.md — extracted patterns and non-patterns from the example CLIsreferences/dotnet.md — .NET implementation patternsreferences/dotnet-examples.md — .NET command, adapter, and JSON contract examplesreferences/rust.md — Rust implementation patternsreferences/rust-examples.md — Rust command, trait, and JSON contract examplesreferences/go.md — Go implementation patternsreferences/go-examples.md — Go command, interface, and JSON contract examplesRead core-contract.md first. Then read error-contracts.md, mcp-compatibility.md, simulation-and-auditability.md, template-generation.md, and example-repos.md. Load only the language reference and language example file that match the implementation language. If the work requires deep simulator design, load the separate designing-cli-simulators skill as well.
This skill operates directly in the main session on CLI design and implementation artifacts. It does not delegate to background agents or sub-agents.
When creating or hardening an AI-first CLI:
--json, and define shared request/response models so a future MCP wrapper can reuse the same business contract.get/show/list/status command needed to verify resulting state.designing-cli-simulators.sc-compose-rendered .j2 templates with normalized YAML frontmatter.--jsonWhen using this skill, report:
tools
Set up a repo-local just task runner with a root Justfile, optional .just/ helper scripts, and curated help, build, fmt, lint, test, and ci recipes. Use when a repo needs just, a Justfile, .just helpers, or when the user mentions task automation, "just build", "just lint", "just fmt", or dropping in a just system.
tools
Convert PDF documents to markdown, extract images and tables using the docling CLI. Use when asked to convert a PDF, extract a datasheet, get images from a PDF, or process any document into structured output. Triggers: 'convert pdf', 'pdf to markdown', 'extract images from pdf', 'datasheet', 'get tables from pdf', 'extract diagrams'. No MCP required — uses docling CLI only.
development
Use when another workflow must launch Claude, Codex, or Gemini as a separate background sub-agent without opening a terminal. Spawns the `launchpad` agent with fenced JSON input and `run_in_background: true`.
testing
Run repo startup: prompt load, checklist sync, optional PR triage, worktree hygiene, and CI pull. Best-effort with structured status.