💬 Codex
ユーザーがCodex CLIの実行を求めたり、コード分析やリファクタリングを依頼したりする際に、最先端のソフトウェアエンジニアリングで対応するSkill。
📺 まず動画で見る(YouTube)
▶ 【最新版】Claude(クロード)完全解説!20以上の便利機能をこの動画1本で全て解説 ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing. Uses GPT-5.2 by default for state-of-the-art software engineering.
🇯🇵 日本人クリエイター向け解説
ユーザーがCodex CLIの実行を求めたり、コード分析やリファクタリングを依頼したりする際に、最先端のソフトウェアエンジニアリングで対応するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o codex.zip https://jpskill.com/download/349.zip && unzip -o codex.zip && rm codex.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/349.zip -OutFile "$d\codex.zip"; Expand-Archive "$d\codex.zip" -DestinationPath $d -Force; ri "$d\codex.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
codex.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
codexフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 2
💬 こう話しかけるだけ — サンプルプロンプト
- › codex の使い方を教えて
- › codex で何ができるか具体例で見せて
- › codex を初めて使う人向けにステップを案内して
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Codex スキルガイド
タスクの実行
- デフォルトでは
gpt-5.2モデルを使用します。ユーザーに (AskUserQuestionを介して) どの推論レベル (xhigh、high、medium、またはlow) を使用するかを尋ねます。ユーザーは必要に応じてモデルを上書きできます (下記の「モデルオプション」を参照してください)。 - タスクに必要なサンドボックスモードを選択します。編集やネットワークアクセスが必要な場合を除き、デフォルトは
--sandbox read-onlyです。 - 適切なオプションでコマンドを組み立てます。
-m, --model <MODEL>--config model_reasoning_effort="<high|medium|low>"--sandbox <read-only|workspace-write|danger-full-access>--full-auto-C, --cd <DIR>--skip-git-repo-check
- 常に
--skip-git-repo-checkを使用します。 - 以前のセッションを続行する場合は、
codex exec --skip-git-repo-check resume --lastを標準入力経由で使用します。再開時には、ユーザーが明示的に要求しない限り、設定フラグは使用しないでください。例えば、セッションの再開を要求する際にモデルや推論レベルを指定する場合などです。再開構文:echo "your prompt here" | codex exec --skip-git-repo-check resume --last 2>/dev/null。すべてのフラグはexecとresumeの間に挿入する必要があります。 - 重要: デフォルトでは、思考トークン (stderr) を抑制するために、すべての
codex execコマンドに2>/dev/nullを追加します。ユーザーが思考トークンの表示を明示的に要求した場合、またはデバッグが必要な場合にのみ stderr を表示します。 - コマンドを実行し、stdout/stderr (適切にフィルタリングされたもの) をキャプチャし、結果をユーザーに要約します。
- Codex が完了した後、ユーザーに「いつでも 'codex resume' と言うか、追加の分析や変更を続けるように依頼することで、この Codex セッションを再開できます。」と伝えます。
クイックリファレンス
| ユースケース | サンドボックスモード | 主要フラグ |
|---|---|---|
| 読み取り専用のレビューまたは分析 | read-only |
--sandbox read-only 2>/dev/null |
| ローカル編集の適用 | workspace-write |
--sandbox workspace-write --full-auto 2>/dev/null |
| ネットワークまたは広範なアクセスを許可 | danger-full-access |
--sandbox danger-full-access --full-auto 2>/dev/null |
| 最近のセッションを再開 | 元のセッションから継承 | echo "prompt" \| codex exec --skip-git-repo-check resume --last 2>/dev/null (フラグは許可されません) |
| 別のディレクトリから実行 | タスクのニーズに合わせる | -C <DIR> とその他のフラグ 2>/dev/null |
モデルオプション
| モデル | 最適な用途 | コンテキストウィンドウ | 主要機能 |
|---|---|---|---|
gpt-5.2-max |
最大モデル: 超複雑な推論、深い問題分析 | 400K 入力 / 128K 出力 | 76.3% SWE-bench、適応型推論、$1.25/$10.00 |
gpt-5.2 ⭐ |
主力モデル: ソフトウェアエンジニアリング、エージェント型コーディングワークフロー | 400K 入力 / 128K 出力 | 76.3% SWE-bench、適応型推論、$1.25/$10.00 |
gpt-5.2-mini |
コスト効率の高いコーディング (4倍の使用許容量) | 400K 入力 / 128K 出力 | SOTAに近いパフォーマンス、$0.25/$2.00 |
gpt-5.1-thinking |
超複雑な推論、深い問題分析 | 400K 入力 / 128K 出力 | 適応型思考深度、最も難しいタスクでは2倍遅く実行 |
GPT-5.2 の利点: 76.3% SWE-bench (GPT-5 は 72.8%)、平均的なタスクで30%高速、ツール処理の改善、幻覚の減少、コード品質の向上。知識カットオフ: 2024年9月30日。
推論レベル:
xhigh- 超複雑なタスク (深い問題分析、複雑な推論、問題の深い理解)high- 複雑なタスク (リファクタリング、アーキテクチャ、セキュリティ分析、パフォーマンス最適化)medium- 標準的なタスク (リファクタリング、コード整理、機能追加、バグ修正)low- シンプルなタスク (簡単な修正、単純な変更、コードフォーマット、ドキュメント)
キャッシュされた入力の割引: 繰り返されるコンテキストに対して90%オフ ($0.125/M トークン)、キャッシュは最大24時間持続します。
フォローアップ
- すべての
codexコマンドの後、すぐにAskUserQuestionを使用して次のステップを確認し、明確化を収集するか、codex exec resume --lastで再開するかを決定します。 - 再開するときは、新しいプロンプトを標準入力経由でパイプします:
echo "new prompt" | codex exec resume --last 2>/dev/null。再開されたセッションは、元のセッションと同じモデル、推論レベル、サンドボックスモードを自動的に使用します。 - フォローアップアクションを提案する際には、選択したモデル、推論レベル、サンドボックスモードを再確認します。
エラー処理
codex --versionまたはcodex execコマンドがゼロ以外の値で終了した場合は、停止して失敗を報告し、再試行する前に指示を求めます。- 影響の大きいフラグ (
--full-auto、--sandbox danger-full-access、--skip-git-repo-check) を使用する前に、すでに許可されている場合を除き、AskUserQuestionを使用してユーザーに許可を求めます。 - 出力に警告や部分的な結果が含まれる場合は、それらを要約し、
AskUserQuestionを使用して調整方法を尋ねます。
CLI バージョン
GPT-5.2 モデルのサポートには、Codex CLI v0.57.0 以降が必要です。CLI は macOS/Linux ではデフォルトで gpt-5.2 を使用し、Windows では gpt-5.2 を使用します。バージョンを確認するには: codex --version
Codex セッション内で /model スラッシュコマンドを使用してモデルを切り替えるか、~/.codex/config.toml でデフォルトを設定します。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Codex Skill Guide
Running a Task
- Default to
gpt-5.2model. Ask the user (viaAskUserQuestion) which reasoning effort to use (xhigh,high,medium, orlow). User can override model if needed (see Model Options below). - Select the sandbox mode required for the task; default to
--sandbox read-onlyunless edits or network access are necessary. - Assemble the command with the appropriate options:
-m, --model <MODEL>--config model_reasoning_effort="<high|medium|low>"--sandbox <read-only|workspace-write|danger-full-access>--full-auto-C, --cd <DIR>--skip-git-repo-check
- Always use --skip-git-repo-check.
- When continuing a previous session, use
codex exec --skip-git-repo-check resume --lastvia stdin. When resuming don't use any configuration flags unless explicitly requested by the user e.g. if he species the model or the reasoning effort when requesting to resume a session. Resume syntax:echo "your prompt here" | codex exec --skip-git-repo-check resume --last 2>/dev/null. All flags have to be inserted between exec and resume. - IMPORTANT: By default, append
2>/dev/nullto allcodex execcommands to suppress thinking tokens (stderr). Only show stderr if the user explicitly requests to see thinking tokens or if debugging is needed. - Run the command, capture stdout/stderr (filtered as appropriate), and summarize the outcome for the user.
- After Codex completes, inform the user: "You can resume this Codex session at any time by saying 'codex resume' or asking me to continue with additional analysis or changes."
Quick Reference
| Use case | Sandbox mode | Key flags |
|---|---|---|
| Read-only review or analysis | read-only |
--sandbox read-only 2>/dev/null |
| Apply local edits | workspace-write |
--sandbox workspace-write --full-auto 2>/dev/null |
| Permit network or broad access | danger-full-access |
--sandbox danger-full-access --full-auto 2>/dev/null |
| Resume recent session | Inherited from original | echo "prompt" \| codex exec --skip-git-repo-check resume --last 2>/dev/null (no flags allowed) |
| Run from another directory | Match task needs | -C <DIR> plus other flags 2>/dev/null |
Model Options
| Model | Best for | Context window | Key features |
|---|---|---|---|
gpt-5.2-max |
Max model: Ultra-complex reasoning, deep problem analysis | 400K input / 128K output | 76.3% SWE-bench, adaptive reasoning, $1.25/$10.00 |
gpt-5.2 ⭐ |
Flagship model: Software engineering, agentic coding workflows | 400K input / 128K output | 76.3% SWE-bench, adaptive reasoning, $1.25/$10.00 |
gpt-5.2-mini |
Cost-efficient coding (4x more usage allowance) | 400K input / 128K output | Near SOTA performance, $0.25/$2.00 |
gpt-5.1-thinking |
Ultra-complex reasoning, deep problem analysis | 400K input / 128K output | Adaptive thinking depth, runs 2x slower on hardest tasks |
GPT-5.2 Advantages: 76.3% SWE-bench (vs 72.8% GPT-5), 30% faster on average tasks, better tool handling, reduced hallucinations, improved code quality. Knowledge cutoff: September 30, 2024.
Reasoning Effort Levels:
xhigh- Ultra-complex tasks (deep problem analysis, complex reasoning, deep understanding of the problem)high- Complex tasks (refactoring, architecture, security analysis, performance optimization)medium- Standard tasks (refactoring, code organization, feature additions, bug fixes)low- Simple tasks (quick fixes, simple changes, code formatting, documentation)
Cached Input Discount: 90% off ($0.125/M tokens) for repeated context, cache lasts up to 24 hours.
Following Up
- After every
codexcommand, immediately useAskUserQuestionto confirm next steps, collect clarifications, or decide whether to resume withcodex exec resume --last. - When resuming, pipe the new prompt via stdin:
echo "new prompt" | codex exec resume --last 2>/dev/null. The resumed session automatically uses the same model, reasoning effort, and sandbox mode from the original session. - Restate the chosen model, reasoning effort, and sandbox mode when proposing follow-up actions.
Error Handling
- Stop and report failures whenever
codex --versionor acodex execcommand exits non-zero; request direction before retrying. - Before you use high-impact flags (
--full-auto,--sandbox danger-full-access,--skip-git-repo-check) ask the user for permission using AskUserQuestion unless it was already given. - When output includes warnings or partial results, summarize them and ask how to adjust using
AskUserQuestion.
CLI Version
Requires Codex CLI v0.57.0 or later for GPT-5.2 model support. The CLI defaults to gpt-5.2 on macOS/Linux and gpt-5.2 on Windows. Check version: codex --version
Use /model slash command within a Codex session to switch models, or configure default in ~/.codex/config.toml.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (5,185 bytes)
- 📎 README.md (2,185 bytes)