# domain-cli

Guides AI agents in structuring Rust CLI applications with clap derive macros and strict stdout/stderr stream separation.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3100 installs · ★ 1545
- Author: actionbook
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/actionbook/rust-skills/tree/HEAD/skills/domain-cli/SKILL.md
- Updated: 2026-08-23
- HTML: https://affpapa.org/en/nevibecode/skills/domain-cli

## What it does

This skill enforces domain constraints when building Rust command-line binaries. It guides the coding assistant to rely on `clap` derive macros for type-safe argument parsing and subcommand hierarchies. Output handling follows Unix standards: program data goes to standard output via `println!`, while diagnostics flow to `eprintln!`. Piping output between shell utilities will not break.

Configuration follows a fixed override hierarchy where CLI arguments take precedence over environment variables and configuration files. Long tasks require visual feedback via `indicatif` progress bars rather than silent execution. Because the skill sets `user-invocable: false`, you do not trigger it manually; the agent applies these conventions whenever inspecting a `**/Cargo.toml` file.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill domain-cli -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/domain-cli/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/domain-cli/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill domain-cli -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/domain-cli/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill domain-cli -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/domain-cli/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install actionbook/rust-skills domain-cli
```

2. **Manually: put the files in place**
- File: `.github/skills/domain-cli/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill domain-cli -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/actionbook/rust-skills --path skills/domain-cli
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/domain-cli/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill domain-cli -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/actionbook/rust-skills/tree/HEAD/skills/domain-cli/SKILL.md

## When to use it
- separate data output in stdout from errors in stderr
- parse CLI flags and subcommands using `clap`
- enforce configuration priority from CLI args down to files
- display terminal progress bars with `indicatif`

## Example prompts
- Structure a Rust CLI tool with init and run subcommands using clap.
- Add a progress bar for a long-running console task using indicatif.

## Similar
- [Rust CLI taste](https://affpapa.org/en/nevibecode/prompts/rust-cli-taste.md) — prompt · ★ 174597
- [rattles-terminal-spinners](https://affpapa.org/en/nevibecode/skills/rattles-terminal-spinners.md) — skill · 497 installs
- [ratatui-tui](https://affpapa.org/en/nevibecode/skills/ratatui-tui.md) — skill · 722 installs
- [cli-developer](https://affpapa.org/en/nevibecode/agents/cli-developer.md) — subagent · 312 installs
- [rust-engineer](https://affpapa.org/en/nevibecode/skills/rust-engineer.md) — skill · 6300 installs
- [orca-cli](https://affpapa.org/en/nevibecode/skills/orca-cli.md) — skill · 353600 installs

From the same set: [actionbook/rust-skills](https://affpapa.org/en/nevibecode/by/actionbook/rust-skills.md) — 35 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
