claude/skills/codex-review/SKILL.md
codex CLIを使ってコードをレビューする
npx skillsauth add lilpacy/dotfiles codex-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
!git diff HEAD
!git ls-files --others --exclude-standard | while read f; do echo "=== NEW FILE: $f ==="; cat "$f"; done
/codex-review → 現在の変更(staged + unstaged + untracked)をレビュー/codex-review HEAD~3 → 直近3コミットのdiffをレビュー/codex-review main..feature → ブランチ間のdiffをレビュー/codex-review main -- src/utils.ts → 特定ファイルのdiffをレビュー/codex-review src/utils.ts → ファイルの中身全体をレビュー/codex-review src/ → フォルダ配下のコードをレビュー引数: $ARGUMENTS
引数の内容に応じて diffモード か ファイルレビューモード を自動判定してください。
判定ルール:
.. または ... を含む(例: main..feature)--staged, --cached, --stat 等の git diff オプション-- トークン(パスとの境界)git rev-parse --verify "$token^{commit}" でコミットとして解決できる(例: HEAD, HEAD~3, main, ブランチ名)git diff $ARGUMENTS をBashで実行codex exec を実行(timeout: 600000)。prompt に以下を渡す:以下のgit diffをコードレビューしてください。バグ、セキュリティ問題、パフォーマンス問題、可読性の観点でレビューし、重要度(Critical/Warning/Info)を付けて指摘してください。良い点も挙げてください。
(diff内容をここに埋め込む)
コマンド:
codex exec -s read-only --skip-git-repo-check "<prompt>"
cat で内容を取得find <dir> -type f で再帰的にファイル一覧を取得し、各ファイルを catcodex exec を実行(timeout: 600000)。prompt に以下を渡す:以下のコードをレビューしてください。バグ、セキュリティ問題、パフォーマンス問題、可読性の観点でレビューし、重要度(Critical/Warning/Info)を付けて指摘してください。良い点も挙げてください。
=== FILE: path/to/file1.ts ===
(ファイル内容)
=== FILE: path/to/file2.ts ===
(ファイル内容)
コマンド:
codex exec -s read-only --skip-git-repo-check "<prompt>"
codex exec 実行後、別のBash呼び出しでレスポンスをアーカイブ保存する:
DIR=~/.claude/codex-responses/$(date +%Y-%m-%d) && mkdir -p "$DIR"
# レビュー結果をファイルに保存
コードレビューはインターネットアクセス不要のため、常に -s read-only を使用する。
development
Use when searching the web or reading online documentation. Prefer DuckDuckGo for search and read documents through npx curl.md instead of raw HTML.
testing
Use when writing or editing tests. Tests should be ordered by near-normal, normal, then abnormal cases where applicable, and test names must be Japanese behavior descriptions from a reviewer/user perspective.
development
GoF/オブジェクト指向デザインパターンを関数型プログラミング(pure functions, higher-order functions, ADT, composition, immutability, effect boundaries)でシンプルに整理・設計・リファクタリングする。Strategy/Factory/Adapter/ObserverなどGoF全23パターンのFP置き換え、適用判断、具体事例を提示する必要があるときに使う。
tools
Use when committing, pushing, or preparing PRs. Defines the user's commit workflow, message style discovery, review handoff, and branch/worktree push requirements.