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

create-cli

하는 일

이 스킬은 명령줄 도구를 만들기 전에 명령, 옵션, 출력, 오류 코드를 포함해 어떻게 동작할지 계획하도록 돕습니다. 새 터미널 도구를 만드는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓새로운 명령줄 도구를 설계할 때.
  • ✓읽기 쉬운 출력, JSON 출력, 종료 코드 중 무엇을 쓸지 정하고 싶을 때.
  • ✓드라이 런이나 확인 프롬프트 같은 안전한 옵션이 필요한 명령이 있을 때.

스킬 링크

https://github.com/steipete/agent-scripts/blob/main/skills/create-cli/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“내 메모를 내보내는 명령줄 도구를 만들고 싶어요. 명령과 옵션을 설계하도록 도와주세요.”

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

작동 방식

에이전트는 인터페이스를 확정하는 데 필요한 질문만 하고, 명령 구조, 옵션, 출력 규칙, 오류 코드, 안전 옵션을 담은 간결한 사양서를 씁니다. 공개된 명령줄 가이드라인을 따릅니다.

기술 내용 (원본 SKILL.md)

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

Create CLI

Design CLI surface area (syntax + behavior), human-first, script-friendly.

Do This First

Clarify (fast)

Ask, then proceed with best-guess defaults if user is unsure:

  • Command name + one-sentence purpose.
  • Primary user: humans, scripts, or both.
  • Input sources: args vs stdin; files vs URLs; secrets (never via flags).
  • Output contract: human text, --json, --plain, exit codes.
  • Interactivity: prompts allowed? need --no-input? confirmations for destructive ops?
  • Config model: flags/env/config-file; precedence; XDG vs repo-local.
  • Platform/runtime constraints: macOS/Linux/Windows; single binary vs runtime.

Deliverables (what to output)

When designing a CLI, produce a compact spec the user can implement:

  • Command tree + USAGE synopsis.
  • Args/flags table (types, defaults, required/optional, examples).
  • Subcommand semantics (what each does; idempotence; state changes).
  • Output rules: stdout vs stderr; TTY detection; --json/--plain; --quiet/--verbose.
  • Error + exit code map (top failure modes).
  • Safety rules: --dry-run, confirmations, --force, --no-input.
  • Config/env rules + precedence (flags > env > project config > user config > system).
  • Shell completion story (if relevant): install/discoverability; generation command or bundled scripts.
  • 5–10 example invocations (common flows; include piped/stdin examples).

Default Conventions (unless user says otherwise)

  • -h/--help always shows help and ignores other args.
  • --version prints version to stdout.
  • Primary data to stdout; diagnostics/errors to stderr.
  • Add --json for machine output; consider --plain for stable line-based text.
  • Prompts only when stdin is a TTY; --no-input disables prompts.
  • Destructive operations: interactive confirmation + non-interactive requires --force or explicit --confirm=....
  • Respect NO_COLOR, TERM=dumb; provide --no-color.
  • Handle Ctrl-C: exit fast; bounded cleanup; be crash-only when possible.

Templates (copy into your answer)

CLI spec skeleton

Fill these sections, drop anything irrelevant:

  1. Name: mycmd
  2. One-liner: ...
  3. USAGE:
    • mycmd [global flags] <subcommand> [args]
  4. Subcommands:
    • mycmd init ...
    • mycmd run ...
  5. Global flags:
    • -h, --help
    • --version
    • -q, --quiet / -v, --verbose (define exactly)
    • --json / --plain (if applicable)
  6. I/O contract:
    • stdout:
    • stderr:
  7. Exit codes:
    • 0 success
    • 1 generic failure
    • 2 invalid usage (parse/validation)
    • (add command-specific codes only when actually useful)
  8. Env/config:
    • env vars:
    • config file path + precedence:
  9. Examples:
    • …

Notes

  • Prefer recommending a parsing library (language-specific) only when asked; otherwise keep this skill language-agnostic.
  • If the request is “design parameters”, do not drift into implementation.
자주 묻는 질문

완성된 도구를 직접 만드나요?

아닙니다. 여러분이나 개발자가 구현할 수 있는 간결한 사양서를 만듭니다.

비밀 정보는 플래그로 전달해야 하나요?

아닙니다. 스킬은 비밀 정보를 플래그로 절대 전달하지 않아야 한다고 설명합니다.

어떤 가이드라인을 따르나요?

clig.dev에 공개된 명령줄 가이드라인을 바탕으로 한 참고 자료가 함께 들어 있습니다.

상세 정보

작성자의 원본 설명

CLI UX/spec: args, flags, help, output, errors, config, dry-run.

repo: steipete/agent-scripts

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬