Cli guideline

From archibate/dotfiles-opencode · View interactive version

Cli guideline is an AI agent skill from the GitHub repository archibate/dotfiles-opencode. Implement CLI tools in Python, JS/TS, Bash, or Go following clig.dev standards. Use when writing or reviewing CLI code.

How to use this skill

Skill file

Skill: CLI Guideline

Modern CLI design principles based on clig.dev — human-first design while maintaining composability.

Core Philosophy

  1. Human-first design — CLIs are for humans, not just scripts
  2. Simple parts that work together — Composable via pipes, stdin/stdout, exit codes
  3. Consistency — Follow established conventions (flags, env vars, behavior)
  4. Say just enough — Not too verbose, not too silent
  5. Ease of discovery — Help, examples, suggestions
  6. Conversation as norm — Trial-and-error is expected; guide the user
  7. Robustness — Handle errors gracefully, feel solid
  8. Empathy — Delight users, exceed expectations

Essential Rules

I/O Streams

| Stream | Purpose | Example |

| --------- | -------------------------------------- | -------------------------- |

| stdout | Primary output, data, machine-readable | Results, JSON, piped data |

| stderr | Messages, logs, progress, errors | Status, warnings, spinners |

| Exit 0 | Success | |

| Exit ≠0 | Failure (map codes to failure modes) | |

Help

Output

Errors

Arguments & Flags

Interactivity

Subcommands

Robustness

Future-Proofing

Signals

Configuration

Environment Variables

Naming

Distribution

Analytics

Quick Reference

For detailed stress-testing checklist, see references/checklist.md.

For complete guidelines with examples, see references/full-guidelines.md.

Language-Specific Notes

Python

TypeScript/Node

Bash

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.