cli-developer
Use when building a command-line tool — subcommands, flags, prompts, progress bars, shell completions, cross-platform distribution. Triggers on: "CLI 도구 만들어줘", "서브커맨드 설계", "build a CLI". Not for web UIs or REST APIs.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- cli-developer
- license
- MIT
- metadata
- { "role": "specialist", "scope": "implementation", "domain": "devops", "version": "1.1.0", "triggers": "CLI, command-line tool, terminal app, subcommands, flags, shell completion, interactive prompt, progress bar, oclif, argparse, bubbletea", "output-format": "code", "related-skills": "sre-engineer, documentation-strategy" }
- scenarios
- [ "Build a CLI tool that manages deployment configurations across environments", "I need to create a command-line interface for our internal developer tools", "Help me design a CLI with subcommands, flags, and interactive prompts", "CLI 도구를 만들어줘 — 배포 설정을 관리하는 커맨드라인 앱", "개발자용 내부 CLI 툴 설계를 도와줘" ]
- description
- Use when building a command-line tool — subcommands, flags, prompts, progress bars, shell completions, cross-platform distribution. Triggers on: "CLI 도구 만들어줘", "서브커맨드 설계", "build a CLI". Not for web UIs or REST APIs.
- compatibility
- { "optional": [ "think-tool" ], "recommended": [], "remote_mcp_note": "think-tool이 있으면 커맨드 계층 구조와 UX 설계를 더 체계적으로 검토할 수 있습니다. Claude 설정 → MCP Servers에서 remote SSE 엔드포인트를 추가하세요." }
02 资源文件 10
- 参考文档agents/openai.yaml119 B
- 参考文档references/codex-tools.md2.4 KB
- 参考文档references/copilot-tools.md1.8 KB
- 参考文档references/design-patterns.md3.7 KB
- 参考文档references/gemini-tools.md2.9 KB
- 参考文档references/go-cli.md3.5 KB
- 参考文档references/go-tui.md1.9 KB
- 参考文档references/node-cli.md3.2 KB
- 参考文档references/python-cli.md3.5 KB
- 参考文档references/ux-patterns.md3.1 KB
03 SKILL.md 正文
Standing Mandates
- NEVER write code before the expected
--helpof every command is written down. The command surface is the public API: scripts and muscle memory depend on it, so it is cheaper to argue about on paper than after release. - NEVER change a shipped command's name, flag or exit code in place; a rename is a breaking change. Add the new form, keep the old as an alias, and say so.
- NEVER call the tool done from reading the code. Run
<cli> --help,<cli> --version, one failing input, and one piped run (<cli> ... | cat, stdin not a TTY), and quote the output and exit codes; a run you could not do isnot run: <what>. Prompts that block in CI and colour codes in a pipe show only in those runs. - NEVER write diagnostics or progress to stdout; stdout is data that may be piped, so logs and errors go to stderr.
- NEVER hardcode a platform path (
~,/tmp,C:\); useos.homedir()/Path.home()/ the platform's config dir. - Missing facts (target OSes, shells, who runs it, startup budget, config sources) are
[확인 필요: ○○]; do not pick them silently. Startup time is measured and reported against the user's budget; a fixed number such as 50 ms is realistic for a Go binary and not for a Node or Python one. - Goal: every command has help text, an exit-code contract and a non-interactive path, and the closing tally recounts to the command list.
CLI Developer
Not for web UIs or REST APIs, SRE pipeline integration alone (develop:sre-engineer), or the written docs around
the tool (develop:documentation-strategy).
Process
- Analyze UX — who runs it, for what; sketch the command hierarchy; write each command's expected
--help. - Design commands — subcommands, flags, arguments, config sources and precedence (flag > env > file > default); one flag-naming convention; no shipped signature changes.
- Select framework — Node.js
commander→yargs→oclif; Pythontyper→click→argparse; Gocobra + viper,bubbleteafor a TUI only. - Implement — validate input before any work; every question has a flag or env fallback; on SIGINT clean up and exit 130 (128+2); 0 success, 1 failure, 2 usage error unless the repo already defines codes.
- Polish — completions for the shells in scope, clear errors, progress feedback; colour only when stdout is a
TTY, and honour
NO_COLOR. - Test — run the commands from the Mandates on each target OS and measure cold start.
- Recount — count commands, those with help text, a documented exit code, and a non-interactive path; fix the tally if it differs.
Output Template
## <tool>
1. Entry point and subcommand layout
2. Config: files, environment, flags, precedence
3. Code, including error paths and exit codes
4. Completion scripts for <shells>
5. UX rationale, one line per choice
Open: [확인 필요: ○○] ...
Commands <n> · help text <h> · exit codes <e> · non-interactive <i> · completions <shells>
Run: --help ok · --version ok · piped ok · cold start <ms> (budget <ms>) | not run: <what>
What Claude Does / What You Do
| Claude | You |
|---|---|
| Designs hierarchy and flag naming | Confirm it matches your users' workflows |
| Generates framework boilerplate and completions | Implement the domain logic |
| Handles TTY detection, SIGINT, paths | Test on your target OSes and shells |
Reference Guide
| Area | File | Read it when |
|---|---|---|
| Command surface | references/design-patterns.md |
Naming, flags, config precedence, exit codes |
| Node.js | references/node-cli.md |
commander, yargs, prompts, npm publishing |
| Python | references/python-cli.md |
typer, click, argparse, rich |
| Go | references/go-cli.md |
viper, cobra, signals, tests, releases |
| Go TUI | references/go-tui.md |
bubbletea models, bubbles components |
| UX | references/ux-patterns.md |
Feedback, colour, help text, errors |
Related Skills
develop:sre-engineer— wiring the tool into SRE pipelinesdevelop:documentation-strategy— documenting commands and flags
04 同仓库更多 Skills
diagram
Use when something must be drawn as a checked figure, not Mermaid: page layout, B-tree, lock timeline, ER, benchmark chart, architecture, sequence. SVG + PNG. Triggers: "도식화해줘", "그림으로 그려줘", "책에 넣을 그림", "시퀀스 다이어그램", "draw this as a figure".
test-master
Use when writing, improving, or auditing tests, or writing case specs with expected results from a spec. Triggers: "테스트 작성", "테스트 케이스 작성", "test case writing", "단위 테스트", "커버리지 분석", "test plan", "defect report".
sre-engineer
Use when setting up production reliability practices. Triggers on: "SLO 정하고 싶어", "에러 버짓", "알람 피로", "반복 작업(toil) 줄이기", "golden signals dashboard", "burn-rate alert". Not for active incidents or chaos tests.
sql-pro
Use when someone needs help writing or rewriting SQL — authoring complex joins, CTEs, window functions, or recursive queries — or designing a schema from scratch, normalizing an existing one, or migrating queries between database dialects.
spring-boot-engineer
Use when building or extending a Spring Boot 3.x Java backend — REST, Spring Security, JPA, WebFlux, Actuator. Triggers on: "Spring Boot API", "스프링 시큐리티 설정", "JPA 연동". Not for service decomposition or query tuning.
spec-driven-development
Use when a feature should be specified before it is coded — stories, acceptance criteria, tasks, a per-criterion check. Triggers: "스펙 먼저", "명세부터 쓰고 구현", "수용 기준 먼저", "spec first", "spec-driven development".