cli-development-guidelines

Audit command-line interfaces for help, flag, and ANSI conventions.

6|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/archibate/archibate-skills --skill cli-development-guidelines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-development-guidelines
Source: https://github.com/archibate/archibate-skills/tree/main/old-skills/trash-skills/cli-development-guidelines
Command: npx skills add https://github.com/archibate/archibate-skills --skill cli-development-guidelines

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Provides a practical methodology and toolset to design, review, and audit command-line interfaces so they are discoverable, safe, and composable in Unix pipelines.

Core Features & Use Cases

  • CLI contract and patterns: Clear rules for exit codes, stdout/stderr separation, help structure, color handling, and interactivity that make CLIs reliable for humans and automation.
  • Templates and examples: JSON spec templates, help text skeletons, and error message patterns to speed implementation and documentation.
  • Automated auditing: A Python audit script that runs heuristic checks against a CLI to surface help, flag, and ANSI/color issues useful for CI gating and design reviews.
  • Use case: Use the skill to design a new tool with a stable --json output mode, or to audit an existing CLI before release to ensure scripting friendliness and safe defaults.

Quick Start

Run the included audit by asking the agent to execute the Python audit script on your CLI (for example, run python scripts/cli_audit.py -- ./mycli).

Frequently Asked Questions about cli-development-guidelines

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

FAQPage Schema
How do I audit command-line interfaces for scripting friendliness and safe defaults?

To audit command-line interfaces, run the included Python audit script to execute heuristic checks against your CLI. This surfaces help behavior, flag conventions, ANSI color handling, and common scripting faults to ensure safe defaults and scripting friendliness.

What makes a CLI human-first and composable in Unix pipelines?

A human-first CLI composable in Unix pipelines follows clear rules for exit codes, stdout/stderr separation, help structure, color handling, and interactivity. This ensures discoverability and safety for both humans and automation.

How do I design a new command-line tool with a stable JSON output mode?

To design a command-line tool with a stable JSON output mode, apply the provided JSON spec templates and help text skeletons. These templates speed implementation and documentation while ensuring reliable automation.

Can I use an automated Python script to check CLI help behavior and flag conventions in CI?

Yes, you can use the automated Python audit script to check CLI help behavior and flag conventions in CI. The script runs heuristic checks against your CLI and surfaces issues, making it useful for CI gating and design reviews.

What are the common scripting faults to check when reviewing a command-line interface?

Common scripting faults to check when reviewing a command-line interface include improper help behavior, incorrect flag conventions, and poor ANSI handling. The audit script identifies these faults to ensure Unix composability and safe defaults.

When do I need to review exit codes and stdout/stderr separation for command-line usability?

You need to review exit codes and stdout/stderr separation for command-line usability when designing or releasing a CLI. Applying checklist-driven guidance ensures reliable interactivity, safe defaults, and proper Unix pipeline integration.