본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)15k · #10925

cli-for-agents

하는 일

이 스킬은 자동화에 잘 맞는 명령줄 도구를 만들거나 검토하도록 어시스턴트를 돕습니다. CLI를 AI 에이전트와 스크립트에서 쓰기 쉽게 만들고 싶은 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓새 명령줄 도구를 만들거나 기존 도구에 명령을 추가할 때.
  • ✓실제 예시가 있는 명확한 도움말을 원할 때.
  • ✓스크립트, 파이프라인, 자동화에서 잘 작동하는 CLI를 원할 때.

스킬 링크

https://github.com/cursor/plugins/blob/main/cli-for-agent/skills/cli-for-agents/SKILL.md

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

사용 방법

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

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

Use this skill to help me: https://github.com/cursor/plugins/blob/main/cli-for-agent/skills/cli-for-agents/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에서 그대로 가져왔습니다.

CLI for agents

Human-oriented CLIs often block agents: interactive prompts, huge upfront docs, and help text without copy-pasteable examples. Prefer patterns that work headlessly and compose in pipelines.

Non-interactive first

  • Every input should be expressible as a flag or flag value. Do not require arrow keys, menus, or timed prompts.
  • If flags are missing, then fall back to interactive mode—not the other way around.

Bad: mycli deploy → ? Which environment? (use arrow keys)
Good: mycli deploy --env staging

Discoverability without dumping context

  • Agents discover subcommands incrementally: mycli, then mycli deploy --help. Do not print the entire manual on every run.
  • Let each subcommand own its documentation so unused commands stay out of context.

--help that works

  • Every subcommand has --help.
  • Every --help includes Examples with real invocations. Examples do more than prose for pattern-matching.
Options:
  --env     Target environment (staging, production)
  --tag     Image tag (default: latest)
  --force   Skip confirmation

Examples:
  mycli deploy --env staging
  mycli deploy --env production --tag v1.2.3
  mycli deploy --env staging --force

stdin, flags, and pipelines

  • Accept stdin where it makes sense (e.g. cat config.json | mycli config import --stdin).
  • Avoid odd positional ordering and avoid falling back to interactive prompts for missing values.
  • Support chaining: mycli deploy --env staging --tag $(mycli build --output tag-only).

Fail fast with actionable errors

  • On missing required flags: exit immediately with a clear message and a correct example invocation, not a hang.
Error: No image tag specified.
  mycli deploy --env staging --tag <image-tag>
  Available tags: mycli build list --output tags

Idempotency

  • Agents retry often. The same successful command run twice should be safe (no-op or explicit "already done"), not duplicate side effects.

Destructive actions

  • Add --dry-run (or equivalent) so agents can preview plans before committing.
  • Offer --yes / --force to skip confirmations while keeping the safe default for humans.

Predictable structure

  • Use a consistent pattern everywhere, e.g. resource + verb: if mycli service list exists, mycli deploy list and mycli config list should follow the same shape.

Success output

  • On success, return machine-useful data: IDs, URLs, durations. Plain text is fine; avoid relying on decorative output alone.
deployed v1.2.3 to staging
url: https://staging.myapp.com
deploy_id: dep_abc123
duration: 34s

When reviewing an existing CLI

  • Check: non-interactive path, layered help, examples on --help, stdin/pipeline story, error messages with invocations, idempotency, dry-run, confirmation bypass flags, consistent command structure, structured success output.
자주 묻는 질문

대화형 프롬프트를 피하는 이유는 무엇인가요?

에이전트는 방향키나 메뉴를 쓸 수 없으므로, 모든 입력은 플래그로도 전달할 수 있어야 합니다.

도움말에는 무엇이 있어야 하나요?

각 하위 명령마다 긴 설명만이 아니라 실제로 실행하는 방법의 예시를 보여야 합니다.

드라이런도 다루나요?

네. 지침에는 드라이런 옵션과 명령을 반복해도 안전한 동작이 포함됩니다.

상세 정보

작성자의 원본 설명

Designs or reviews CLIs so coding agents can run them reliably: non-interactive flags, layered --help with examples, stdin/pipelines, fast actionable errors, idempotency, dry-run, and predictable structure. Use when building a CLI, adding commands, writing --help, or when the user mentions agents, terminals, or automation-friendly CLIs.

repo: cursor/plugins

인기도

GitHub 스타
15k
순위
#10925
라이선스
—
업데이트
2026. 10. 31.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬