claude-code
できること
このスキルは、Claude Code を非対話モードで動かし、コードの編集、プロジェクトの分析、作業のレビューを行う補助として使う方法を AI に示します。別のモデルにタスクを実行させたり、レビューさせたりしたい開発者向けです。
使う場面
- ✓コーディングやリファクタリングのタスクを Claude Code に任せ、その結果を受け取りたいとき。
- ✓別の AI モデルによるセカンドオピニオンや、独立したレビューがほしいとき。
- ✓タスクの別々の部分を、複数の Claude Code のヘルパーに同時に進めさせたいとき。
スキルのリンク
https://github.com/kortix-ai/suna/blob/dev/.agents/skills/claude-cli/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Claude Code に私のコード変更をレビューさせて、見つかったバグを一覧にしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AI は明確な指示を書き、適切なフォルダーと権限の設定で claude コマンドを非対話モードで実行し、出力を保存します。そのあと、変更されたファイルを自分で確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Claude Code as a Sub-Agent
Claude Code is Anthropic's terminal coding agent. Its headless mode,
claude -p (a.k.a. --print), makes it a disposable sub-agent: you write the
metaprompt, Claude explores/edits/runs commands on its own, and returns a final
message you capture and verify. You stay the planner; Claude is the implementer —
it's a strong long-context planner, so this is useful for reviews, big-picture
design, and cross-cutting refactors.
Golden rule: Claude's self-report is a claim, not the truth. Capture its output, then independently verify the artifacts yourself (read the files, re-run the tests) before treating the task as done.
Verified locally: claude 2.1.167. Confirm install with claude --version.
The core command
claude -p "your metaprompt here" \
--add-dir <workdir> \
--permission-mode <default|acceptEdits|plan|bypassPermissions> \
--output-format json >/tmp/claude_<rand>.json 2>>/tmp/claude_<rand>.log
-p, --print— headless: print the response and exit. Required for scripting.- Prompt as the arg, OR pipe via stdin:
echo "$PROMPT" | claude -p(good for long/generated prompts). --output-format—text(default),json(single object withresult+session_id+ cost/usage), orstream-json(NDJSON events as they arrive). Usejsonfor clean capture and to grab thesession_idfor resume.- Redirect stdout to a capture file and stderr to a log so progress noise
doesn't pollute your context. Generate
<rand>once per run. --model <alias|id>— pin the model (e.g.opus,sonnet, or a full id).--add-dir <dir>...— extra directories Claude may read/write.--append-system-prompt <text>— inject extra instructions/persona.
Permission modes (pick the least privilege)
default— Claude asks before edits/commands. In headless-pit cannot prompt, so write actions are effectively blocked → good for read-only review/analysis.plan— Claude plans but does not edit. Use for "design this / find the bug".acceptEdits— auto-accepts file edits. Use for real implementation.bypassPermissions(or--dangerously-skip-permissions) — no gating at all. Powerful; only use when the user has explicitly authorized autonomous edits AND the working dir is scoped, or in a throwaway dir. When unsure, ask which mode before granting write access.
Output & session resume
- Parse
--output-format json: theresultfield is the final message; thesession_idfield lets you continue the same conversation. - Resume with context intact:
claude -p --continue "now also update the tests" # most recent session claude -p --resume <session-id> "..." # a specific session - Use resume for multi-turn delegation (draft → refine → fix) instead of re-sending all context.
Delegation patterns
- One-shot task — scope
--add-dir,acceptEdits, capture, verify. - Second opinion / adversarial review —
planmode, ask Claude to critique your diff or find bugs. Different model, different blind spots. - Plan/implement split — Claude designs; you implement (or vice-versa).
- Parallel fan-out — for N independent tasks, launch N
claude -pruns, each with its own capture/log file. For concurrent WRITE runs, give each its owngit worktree adddir and point--add-dirthere to avoid edit collisions.
The supervision loop (never skip)
- Delegate —
claude -p ... --output-format json >out 2>>log. - Capture — read the
resultfromout(andlog/stream-json for detail). - Verify INDEPENDENTLY — do not trust "tests pass" / "done":
git status/git diffto see what actually changed.- Read the changed files yourself.
- Re-run the build/tests/linter yourself and read the real output.
- Iterate — if wrong,
claude -p --continue "<correction>"and repeat. - Report — state what changed, what you verified, and how. Say plainly when something failed or was skipped.
Cleanup: remove /tmp/claude_* capture/log files (and any throwaway worktrees)
when done.
よくある質問
AI は Claude Code の報告を信頼しますか?
いいえ。スキルでは、自己報告は主張として扱い、タスクを完了と判断する前に変更されたファイルとテストを確認するよう求めています。
Claude Code のインストールが必要ですか?
はい。claude コマンドラインツールがインストールされている必要があり、スキルではまずバージョンを確認するよう求めています。
作業を並行して行えますか?
はい。複数のエージェントを同時に動かすこと、例えばタスクの別々の部分を担当させることにも対応しています。
詳細
作者による元の説明
Drive Anthropic's Claude Code CLI (`claude -p`) as a non-interactive coding sub-agent from inside Codex. Use when you want to delegate a coding/analysis/refactor task to Claude, get a second opinion / adversarial review from another model, hand off long-context planning, or fan out parallel agents. Covers the exact `claude -p` flags, permission modes, output capture, JSON/stream-json modes, session resume, parallel fan-out, and the mandatory "delegate → capture → independently verify, never trust the self-report" supervision loop.
repo: kortix-ai/suna
人気
- GitHubのスター
- 20k
- ランキング
- #10370
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
codex-cli
20kコーディングやレビューのタスクを OpenAI の Codex CLI に任せ、その結果を受け取ることで、2 つ目のモデルに作業を確認させられるようにします。
commit-dis
20kこのチャットで行った変更だけを、現在の Git ブランチに 1 つのコミットとして保存します。プッシュやブランチの作成は行いません。
composio
20kComposio を使って Gmail、Slack、GitHub、Notion などのアプリを接続し、自分のエージェントや、自分で作る製品で利用できるよう支援します。
e2e
20k平易な言葉の目標と正確な確認項目を使い、ウェブアプリやモバイルアプリを操作するエンドツーエンドのテストを書く方法を、エージェントに教えます。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。