/godmode:clifrom godmode
Guides CLI tool development across languages, covering argument parsing, TUI frameworks, shell completions, config management, and cross-platform distribution.
Ships in godmode. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
/godmode:cliDetermine the CLI development approach:
CLI PROJECT ASSESSMENT:
Project type: <new CLI | adding CLI to existing project | TUI application>
Language: <Node.js/TypeScript | Rust | Go | Python | other>
Complexity: <simple (few commands) | medium (subcommands) | complex (TUI/interactive)>
Argument parsing:
Node.js: <Commander | yargs | meow | oclif>
Rust: <Clap (derive) | Clap (builder) | argh>
Go: <Cobra | urfave/cli | kong>
Python: <Click | Typer | argparse | Fire>
Interactive features:
Prompts: <yes (inquirer/dialoguer/survey/questionary) | no>
Progress bars: <yes | no>
Spinners: <yes | no>
TYPESCRIPT CLI STRUCTURE:
├── src/
│ ├── index.ts # Entry point, argument parsing setup
│ ├── commands/ # Subcommand implementations
│ │ ├── init.ts # `tool init` command
│ │ ├── build.ts # `tool build` command
│ │ └── deploy.ts # `tool deploy` command
│ ├── lib/ # Core business logic
│ │ ├── config.ts # Configuration loading/saving
│ │ ├── api.ts # API client (if needed)
│ │ └── utils.ts # Shared utilities
│ ├── ui/ # Terminal UI components
│ │ ├── spinner.ts # Loading spinner
│ │ ├── prompt.ts # Interactive prompts
│ │ └── table.ts # Table formatting
RUST CLI STRUCTURE:
├── src/
│ ├── main.rs # Entry point, clap setup
│ ├── cli.rs # CLI argument definitions (Clap derive)
│ ├── commands/ # Subcommand implementations
│ │ ├── mod.rs
│ │ ├── init.rs # `tool init` handler
│ │ ├── build.rs # `tool build` handler
│ │ └── deploy.rs # `tool deploy` handler
│ ├── config.rs # Configuration (serde + toml/yaml)
│ ├── error.rs # Error types (thiserror)
│ └── ui.rs # Terminal output (indicatif, console)
├── tests/ # Integration tests
│ └── cli_tests.rs # CLI invocation tests (assert_cmd)
├── completions/ # Generated shell completions
GO CLI STRUCTURE:
├── cmd/
│ ├── root.go # Root command (Cobra)
│ ├── init.go # `tool init` command
│ ├── build.go # `tool build` command
│ └── deploy.go # `tool deploy` command
├── internal/ # Private packages
│ ├── config/ # Configuration management
│ │ └── config.go
│ ├── ui/ # Terminal UI utilities
│ │ ├── spinner.go
│ │ └── table.go
│ └── client/ # API client (if needed)
│ └── client.go
├── pkg/ # Public library code (if any)
PYTHON CLI STRUCTURE:
├── src/
│ └── tool/
│ ├── __init__.py # Package init
│ ├── __main__.py # python -m tool entry
│ ├── cli.py # Click/Typer app definition
│ ├── commands/ # Subcommand implementations
│ │ ├── __init__.py
│ │ ├── init.py # `tool init` command
│ │ ├── build.py # `tool build` command
│ │ └── deploy.py # `tool deploy` command
│ ├── config.py # Configuration management
│ └── ui.py # Rich console output
├── tests/ # Pytest tests
│ ├── test_cli.py # CLI invocation tests
ARGUMENT DESIGN PRINCIPLES:
Command hierarchy:
tool <command> <subcommand> [options] [arguments]
tool init # Simple command
tool deploy --env production # Command with option
tool config set key value # Subcommand with positional args
Naming conventions:
Commands: verb or noun (init, build, deploy, config, list)
Flags: --long-form with short aliases (-v / --verbose)
Boolean flags: --flag (enable), --no-flag (disable)
Value flags: --output <path>, --format <json|table|csv>
Standard flags (include in every CLI):
INTERACTIVE PROMPT PATTERNS:
Text input:
? Project name: <user types>
Validation: non-empty, valid characters, no conflicts
Select (single choice):
? Framework:
> React
Vue
Svelte
Navigation: arrow keys, type to filter
Multi-select:
? Features:
CONFIGURATION STRATEGY:
File format selection:
TOML: best for human-edited config (Rust ecosystem standard)
YAML: best for structured config (DevOps ecosystem standard)
JSON: best for machine-generated config (universal support)
INI: legacy, avoid for new projects
XDG Base Directory compliance (Linux/macOS):
Config: $XDG_CONFIG_HOME/tool/config.toml (~/.config/tool/config.toml)
Data: $XDG_DATA_HOME/tool/ (~/.local/share/tool/)
Cache: $XDG_CACHE_HOME/tool/ (~/.cache/tool/)
State: $XDG_STATE_HOME/tool/ (~/.local/state/tool/)
Windows paths:
SHELL COMPLETION SETUP:
Bash:
Generate: tool completion bash > /usr/local/etc/bash_completion.d/tool
Or: tool completion bash >> ~/.bashrc
Mechanism: complete -F / complete -C
Zsh:
Generate: tool completion zsh > "${fpath[1]}/_tool"
Or add to .zshrc: eval "$(tool completion zsh)"
Mechanism: compdef / _arguments
Fish:
Generate: tool completion fish > ~/.config/fish/completions/tool.fish
Mechanism: complete -c tool -s <short> -l <long> -d <description>
DISTRIBUTION STRATEGIES:
npm (Node.js):
Publish: npm publish
Install: npm install -g tool / npx tool
Config:
package.json:
"bin": { "tool": "./bin/tool.js" }
"files": ["dist", "bin"]
Users get: automatic dependency resolution, easy updates
Homebrew (macOS/Linux):
Create formula or tap:
brew tap org/tools
brew install org/tools/tool
CLI PROJECT — <tool name>
Language: <TypeScript | Rust | Go | Python>
Parser: <Commander | Clap | Cobra | Click>
Complexity: <simple | subcommands | TUI>
Commands:
<command>: <IMPLEMENTED | TESTED | DOCUMENTED>
<command>: <IMPLEMENTED | TESTED | DOCUMENTED>
Features:
Shell completions: <bash | zsh | fish | powershell | all>
Config file: <TOML | YAML | JSON | none>
Interactive prompts: <YES | NO>
"cli: <language> — <tool> CLI scaffold with <parser>""cli: <command> — implement <description>""cli: distribution — <package manager> packaging"/godmode:ship to publish."/godmode:build to implement commands."# Test CLI tool end-to-end
npm test -- --grep "cli"
node dist/cli.js --help
node dist/cli.js --version
echo '{}' | node dist/cli.js --json # pipe test
IF command execution > 5 seconds: add progress indicator. WHEN exit code != 0: write to stderr, not stdout. IF --json output is invalid JSON: treat as P1 bug.
| Flag | Description |
|---|---|
| (none) | Full CLI project assessment and setup |
--interactive | Focus on interactive prompts and TUI |
--completion | Shell completion generation only |
Never ask to continue. Loop autonomously until all commands pass tests and shell completions are generated.
--help, --version, and --no-color.--yes / --no-input for CI.timestamp command status tests_passing completions distribution
On activation, automatically detect project context without asking:
AUTO-DETECT:
1. Language:
ls package.json 2>/dev/null && echo "node"
ls Cargo.toml 2>/dev/null && echo "rust"
KEEP if: improvement verified. DISCARD if: regression or no change. Revert discards immediately.
Stop when: target reached, budget exhausted, or >5 consecutive discards.
What SKILL.md sets; muted values are Claude Code's defaults
135 skills in this plugin
/a11yAccessibility. WCAG 2.1 AA/AAA, a11y audit, color contrast, keyboard navigation, screen reader, Axe, Pa11y, Lighthouse./agentAI agent development. ReAct/plan-and-execute/multi-agent architectures, tool design, memory systems, guardrails, orchestration (LangChain, LlamaIndex, CrewAI, AutoGen)./analyticsProduct analytics implementation — event tracking, funnel analysis, A/B testing, Segment/Amplitude/Mixpanel/PostHog, privacy-compliant instrumentation./angularAngular architecture. NgRx, Signals, RxJS, standalone components, lazy loading, dependency injection, Jasmine, Jest.Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.
Other plugins' skills for the same job