codex-cli
できること
このスキルは、Codex を非対話モードで動かし、コーディング、分析、レビューの補助として使う方法を AI に示します。別のモデルにタスクを実行させたり、確認させたりしたい開発者向けです。
使う場面
- ✓コーディングやリファクタリングのタスクを Codex に任せ、結果を受け取りたいとき。
- ✓変更内容を別のモデルにレビューさせて、問題点を指摘してほしいとき。
- ✓長く繰り返しの多いコーディング作業を任せ、自分は作業の計画を続けたいとき。
スキルのリンク
https://github.com/kortix-ai/suna/blob/dev/.agents/skills/codex-cli/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このリファクタリングを Codex に任せ、何を変更したかを教えてください。確認できるようにしたいです。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AI は明確なタスクを書き、選んだフォルダーでサンドボックスの設定を指定して codex exec を実行し、最後のメッセージをファイルに保存します。そのあと、変更されたファイルとテストを自分で確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
The golden rule: Codex's self-report is a claim, not the truth. Always capture its output, then independently verify the artifacts yourself (read the files, re-run the tests) before treating the task as done.
Verified available on this machine: codex-cli 0.137.0, logged in via ChatGPT
(no API key needed). Confirm with codex login status.
</overview>
codex exec \
--cd <workdir> \
--sandbox <read-only|workspace-write|danger-full-access> \
-o /tmp/codex_<rand>.txt \
"your metaprompt here" 2>>/tmp/codex_<rand>.log
- Prompt as the final arg, OR pipe via stdin:
echo "$PROMPT" | codex exec -(good for long/generated prompts). If both are given, stdin is appended. -o, --output-last-message <file>— writes ONLY Codex's final message to a file. This is your clean capture; read it back, don't scrape the TUI stream.2>>/tmp/...log— Codex streams progress/reasoning to stderr; the final message goes to stdout. Redirect stderr to a log so it doesn't bloat your context. Generate the suffix withopenssl rand -hex 4.--cd <dir>— Codex's working root. Scope it to the relevant subdir (e.g.apps/api), not the whole monorepo, so it stays focused.--skip-git-repo-check— only needed when running outside a git repo.</the-core-command>
read-only(default) — Codex can read/grep/run read-only commands but cannot edit files or hit the network. Use for review, analysis, planning, "find the bug", second opinions.workspace-write— can edit files in--cd(and--add-dirpaths) and run commands, but no network by default. Use for real implementation/refactors.danger-full-access— no sandbox at all. Avoid; only for throwaway/ephemeral dirs you fully control.
Approvals: in exec mode Codex does not prompt for approvals. For a fully
autonomous run with no gating at all, add
--dangerously-bypass-approvals-and-sandbox. This is powerful — only use it when
the user has explicitly authorized autonomous edits AND the --cd is scoped, or
when running in an already-sandboxed/throwaway dir. When unsure, ask the user
which sandbox tier before running with write access.
</sandbox-tiers>
codex exec resume --last "now also update the tests" # most recent session
codex exec resume <session-id> "..." # a specific one
The session id is printed at the start of each exec run. Use resume for
multi-turn delegation (draft → refine → fix) instead of re-sending all context.
</session-resume>
よくある質問
Codex はパソコン全体にフルアクセスできますか?
いいえ。実行ごとに設定されたサンドボックスの範囲内で動きます。例えば、読み取り専用や、ワークスペースへの書き込みです。
OpenAI の API キーが必要ですか?
スキルでは、ChatGPT のログインで十分だとしています。codex login status コマンドで確認できます。
Codex の報告を信頼すべきですか?
いいえ。スキルでは、自己報告は主張として扱い、AI がファイルを確認してテストを再実行するよう求めています。
詳細
作者による元の説明
Drive OpenAI's Codex CLI (`codex exec`) as a non-interactive coding sub-agent from inside Claude Code. Load WHENEVER you want to delegate a coding/analysis/refactor task to Codex, get a second opinion / adversarial review from another model, fan out parallel agents across files or worktrees, or run a long mechanical job while you stay the planner. Covers the exact `codex exec` flags, sandbox tiers, output capture, JSON/schema 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
- ランキング
- #10371
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
claude-code
20kエージェントが、コーディング、レビュー、計画のタスクを Anthropic の Claude Code CLI に任せ、その結果を確認できるように取り込めるよう支援します。
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ページを段階的に操作するようエージェントに教えます。