create-cli
できること
このスキルは、コマンドラインツールを作る前に、コマンド、オプション、出力、エラーコードを含めて、どのように動くべきかを計画します。新しいターミナルツールを作る開発者向けです。
使う場面
- ✓新しいコマンドラインツールを設計するとき。
- ✓読みやすい出力、JSON の出力、終了コードのどれを使うか決めたいとき。
- ✓コマンドに、ドライランや確認プロンプトなどの安全なオプションが必要なとき。
スキルのリンク
https://github.com/steipete/agent-scripts/blob/main/skills/create-cli/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“自分のノートを書き出すコマンドラインツールを作りたいです。コマンドとフラグの設計を手伝ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、インターフェースを確定するのに必要な質問だけをします。そのうえで、コマンドの木構造、オプション、出力の規則、エラーコード、安全のためのオプションを含む、簡潔な仕様書を書きます。公開されているコマンドラインの指針に従います。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Create CLI
Design CLI surface area (syntax + behavior), human-first, script-friendly.
Do This First
- Read
agent-scripts/skills/create-cli/references/cli-guidelines.mdand apply it as the default rubric. - Upstream/full guidelines: https://clig.dev/ (propose changes: https://github.com/cli-guidelines/cli-guidelines)
- Ask only the minimum clarifying questions needed to lock the interface.
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/--helpalways shows help and ignores other args.--versionprints version to stdout.- Primary data to stdout; diagnostics/errors to stderr.
- Add
--jsonfor machine output; consider--plainfor stable line-based text. - Prompts only when stdin is a TTY;
--no-inputdisables prompts. - Destructive operations: interactive confirmation + non-interactive requires
--forceor 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:
- Name:
mycmd - One-liner:
... - USAGE:
mycmd [global flags] <subcommand> [args]
- Subcommands:
mycmd init ...mycmd run ...
- Global flags:
-h, --help--version-q, --quiet/-v, --verbose(define exactly)--json/--plain(if applicable)
- I/O contract:
- stdout:
- stderr:
- Exit codes:
0success1generic failure2invalid usage (parse/validation)- (add command-specific codes only when actually useful)
- Env/config:
- env vars:
- config file path + precedence:
- 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
コメント
- …
このリポジトリの他のスキル
beeper
7.4kローカルの Beeper のチャット履歴を検索して、メッセージを見つけ、あいまいなヒントがどのチャットや連絡先を指すかを特定するようエージェントを支援します。
cloudflare-registrar
7.4kCloudflare Registrar のドメインの価格と空き状況を確認し、確認の手順を経てドメインを登録または一覧表示するようエージェントを支援します。
codexbar
7.4kCodex、Claude、Kimi などの AI サービスの、残りの利用量を、上限、クレジット、リセット時刻を含めて確認するようエージェントを支援します。
frontend-design
7.4kはっきりしたデザインの方向性で、個性があり、本番環境に出せる品質の Web インターフェースを作るようエージェントを支援します。ありきたりな AI 風のレイアウトを避けます。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。