본문으로 건너뛰기
Skillpedia
일반 코딩12k · #11409

cli-developer

하는 일

Node.js, Python, Go로 명령줄 프로그램을 만들도록 AI 에이전트를 안내합니다. 사용하기 쉬운 터미널 도구를 원하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓하위 명령과 플래그가 있는 새 명령줄 도구를 시작할 때.
  • ✓bash, zsh, fish용 셸 자동 완성 스크립트가 필요할 때.
  • ✓터미널 앱에 진행 막대, 스피너, 명확한 도움말 텍스트가 필요할 때.

스킬 링크

https://github.com/Jeffallan/claude-skills/blob/main/skills/cli-developer/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/Jeffallan/claude-skills/blob/main/skills/cli-developer/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“sync 명령과 status 명령이 있는 명령줄 도구를 만들어 주세요. 도움말 텍스트와 탭 자동 완성도 넣어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트가 명령과 플래그를 설계하고, commander, click, cobra 같은 적합한 프레임워크로 구현합니다. 그다음 도움말과 버전 출력을 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

CLI Developer

Core Workflow

  1. Analyze UX — Identify user workflows, command hierarchy, common tasks. Validate by listing all commands and their expected --help output before writing code.
  2. Design commands — Plan subcommands, flags, arguments, configuration. Confirm flag naming is consistent and no existing signatures are broken.
  3. Implement — Build with the appropriate CLI framework for the language (see Reference Guide below). After wiring up commands, run <cli> --help to verify help text renders correctly and <cli> --version to confirm version output.
  4. Polish — Add completions, help text, error messages, progress indicators. Verify TTY detection for color output and graceful SIGINT handling.
  5. Test — Run cross-platform smoke tests; benchmark startup time (target: <50ms).

Reference Guide

Load detailed guidance based on context:

Topic Reference Load When
Design Patterns references/design-patterns.md Subcommands, flags, config, architecture
Node.js CLIs references/node-cli.md commander, yargs, inquirer, chalk
Python CLIs references/python-cli.md click, typer, argparse, rich
Go CLIs references/go-cli.md cobra, viper, bubbletea
UX Patterns references/ux-patterns.md Progress bars, colors, help text

Quick-Start Example

Node.js (commander)

#!/usr/bin/env node
// npm install commander
const { program } = require('commander');

program
  .name('mytool')
  .description('Example CLI')
  .version('1.0.0');

program
  .command('greet <name>')
  .description('Greet a user')
  .option('-l, --loud', 'uppercase the greeting')
  .action((name, opts) => {
    const msg = `Hello, ${name}!`;
    console.log(opts.loud ? msg.toUpperCase() : msg);
  });

program.parse();

For Python (click/typer) and Go (cobra) quick-start examples, see references/python-cli.md and references/go-cli.md.

Constraints

MUST DO

  • Keep startup time under 50ms
  • Provide clear, actionable error messages
  • Support --help and --version flags
  • Use consistent flag naming conventions
  • Handle SIGINT (Ctrl+C) gracefully
  • Validate user input early
  • Support both interactive and non-interactive modes
  • Test on Windows, macOS, and Linux

MUST NOT DO

  • Block on synchronous I/O unnecessarily — use async reads or stream processing instead.
  • Print to stdout when output will be piped — write logs/diagnostics to stderr.
  • Use colors when output is not a TTY — detect before applying color:
    // Node.js
    const useColor = process.stdout.isTTY;
    
    # Python
    import sys
    use_color = sys.stdout.isatty()
    
    // Go
    import "golang.org/x/term"
    useColor := term.IsTerminal(int(os.Stdout.Fd()))
    
  • Break existing command signatures — treat flag/subcommand renames as breaking changes.
  • Require interactive input in CI/CD environments — always provide non-interactive fallbacks via flags or env vars.
  • Hardcode paths or platform-specific logic — use os.homedir() / os.UserHomeDir() / Path.home() instead.
  • Ship without shell completions — all three frameworks above have built-in completion generation.

Output Templates

When implementing CLI features, provide:

  1. Command structure (main entry point, subcommands)
  2. Configuration handling (files, env vars, flags)
  3. Core implementation with error handling
  4. Shell completion scripts if applicable
  5. Brief explanation of UX decisions

Knowledge Reference

CLI frameworks (commander, yargs, oclif, click, typer, argparse, cobra, viper), terminal UI (chalk, inquirer, rich, bubbletea), testing (snapshot testing, E2E), distribution (npm, pip, homebrew, releases), performance optimization

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

자주 묻는 질문

어떤 언어를 다루나요?

commander를 쓰는 Node.js, click 또는 typer를 쓰는 Python, cobra를 쓰는 Go에 대한 안내가 있습니다.

시작 속도도 확인하나요?

네. 시작 시간을 측정하며, 목표는 50밀리초 미만입니다.

Ctrl+C는 처리하나요?

네. 정상적인 인터럽트 처리를 확인하고, 터미널이 연결된 경우에만 색상을 사용합니다.

상세 정보

작성자의 원본 설명

Use when building CLI tools, implementing argument parsing, or adding interactive prompts. Invoke for parsing flags and subcommands, displaying progress bars and spinners, generating bash/zsh/fish completion scripts, CLI design, shell completions, and cross-platform terminal applications using commander, click, typer, or cobra.

repo: Jeffallan/claude-skills

인기도

GitHub 스타
12k
순위
#11409
라이선스
MIT
업데이트
2026. 10. 30.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬