arch-cli-contract

Generate and maintain CLI surface contracts as Markdown documents.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/VictorHueni/homemade-claude-kit --skill arch-cli-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: arch-cli-contract
Source: https://github.com/VictorHueni/homemade-claude-kit/tree/main/skills/arch-cli-contract
Command: npx skills add https://github.com/VictorHueni/homemade-claude-kit --skill arch-cli-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps define, document, and maintain the external CLI surface contract for a command-line tool, ensuring consistency and clarity in its usage.

Core Features & Use Cases

  • CLI Contract Definition: Automates the creation of a Markdown document outlining the CLI's command tree, flags, arguments, output format, exit codes, and error contract.
  • Design Modes: Supports Scaffold, Design (contract-first), Document-existing, and Refresh modes to cater to different stages of CLI development.
  • Quality Checks: Provides a comprehensive checklist to ensure the contract meets quality standards, including proper flag usage, output separation, and exit code documentation.
  • Output Contract: Generates a Markdown document that serves as a stable contract between the tool and its users, specifying what is expected from the CLI.

Quick Start

Use the arch-cli-contract skill to generate a CLI contract for your tool 'mytool' in Scaffold mode.

Frequently Asked Questions about arch-cli-contract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is a CLI surface contract and why do I need one for my command-line tool?

A CLI surface contract defines the external interface of a command-line tool, stabilizing the command tree, flags, arguments, and exit codes. You need one to ensure usage consistency and clear documentation between the tool and its users.

How do I document an existing command-line tool's flags and exit codes?

To document an existing command-line tool, use the Design or Document-existing mode to parse the tool and generate a Markdown contract. This output specifies the command tree, output formats, and error contracts automatically.

Can I use this to design a CLI contract before writing any tool code?

Yes, you can use the contract-first Design mode to define the CLI surface before implementation. This approach establishes a stable Markdown contract outlining expected commands, flags, and output formats early in development.

Do I need Python to generate and maintain command-line interface documentation?

Yes, Python is required to run the scripts for parsing and formatting the CLI contract. The scripts automate the generation and maintenance of the Markdown documentation for your command-line tool.

What's the best way to scaffold a new command-line tool's command tree and arguments?

The best way to scaffold a new command-line tool is using the Scaffold mode to generate the initial CLI contract. This establishes the foundational command tree, flag usage, and error contract before detailed development begins.

How does this approach compare to manually writing CLI documentation?

Automated CLI contract generation ensures comprehensive quality checks for flag usage and output separation, unlike manual documentation. It provides a stable, validated Markdown contract that stays consistent with the tool's actual surface.