agentleFS
jaansokkjaansokk/cursor_tools/.claude/skills/code-review-codex/SKILL.md

code-review-codex

Skill1 starsChanged 9 months agoMITView on GitHub

Final-gate code review via Codex CLI (codex-5.3, xhigh). Finds bugs, security issues, and regressions before commit. No edits — findings report only.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After completing a feature, fix, or refactor — as the last step before committing

    line 13
  2. Distinctive:

    When the user says "review", "check my code", "final review", or "sanity check"

    line 14
  3. Distinctive:

    Skip noise: No style nits, no formatting opinions, no "consider renaming" suggestions.

    line 21
  4. Very specific:

    No arguments → review uncommitted changes (--uncommitted)

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Review via Codex CLI

A read-only, post-implementation review using OpenAI Codex CLI as an independent second opinion. The goal is to catch real issues before commit, not to make edits.

When to use

  • After completing a feature, fix, or refactor — as the last step before committing
  • When the user says "review", "check my code", "final review", or "sanity check"
  • For security or correctness confidence on sensitive code paths

Behavior

  • Read-only: Codex reviews and reports. No files are modified.
  • Report back: Output is returned to Claude as structured findings for the user to triage.
  • Skip noise: No style nits, no formatting opinions, no "consider renaming" suggestions.

Steps

  1. Determine scope from $ARGUMENTS:
    • No arguments → review uncommitted changes (--uncommitted)
    • Branch name (e.g. main) → review diff against that branch (--base <branch>)
  2. Run the Codex review using codex exec (supports full prompt alongside diff scope):

Uncommitted changes (default):

codex exec \
  -m gpt-5.3-codex \
  -c model_reasoning_effort='"xhigh"' \
  -s read-only \
  --ephemeral \
  -o /tmp/code-review-output.md \
  "You are a senior engineer doing a final gate review on code that is about to be committed. This is post-implementation — the work is done, you are looking for real problems only.

Start by running: git diff HEAD to see all uncommitted changes (staged and unstaged). Also run git status to catch untracked files that may be relevant.

Review ONLY for issues that would cause bugs, outages, security incidents, or serious perf regressions in production. Ignore style, naming, formatting, and minor code smells.
Use the context7 MCP to check documentation of libraries when needed.

## Review checklist

### 1. Correctness
- Logic errors: wrong conditions, off-by-one, inverted checks, unreachable branches
- State bugs: stale closures, race conditions, mutations of shared state
- Null/undefined access, unhandled promise rejections, uncaught exceptions
- Incorrect API usage or wrong assumptions about library behavior
- Edge cases: empty inputs, boundary values, concurrent access

### 2. Security
- Injection vectors: SQL, XSS, command injection, path traversal
- Auth/authz gaps: missing permission checks, broken access control
- Secrets or credentials in code, logs, or error messages
- Insecure defaults: permissive CORS, disabled CSRF, weak crypto
- User input flowing unsanitized to sensitive sinks

### 3. Data integrity
- Missing or incorrect validation at system boundaries (API inputs, DB writes, file I/O)
- Silent data loss: swallowed errors, ignored return values, dropped events
- Inconsistent state from partial failures (no transaction, no rollback)

### 4. Performance (only if clearly problematic)
- N+1 queries, unbounded loops over large datasets
- Blocking calls in async/event-loop code
- Missing pagination or limits on user-controlled queries
- Obvious memory leaks (growing caches, unclosed resources, dangling listeners)

### 5. Robustness
- Error handling: catch blocks that swallow context, missing retry/backoff on network calls
- Missing timeouts on external calls (HTTP, DB, queues)
- Failure modes that cascade (one failing dependency takes down everything)

## Output format

For each finding:
- **Severity**: CRITICAL / HIGH / MEDIUM / LOW
- **File:Line**: exact location
- **What**: one-sentence description of the problem
- **Why it matters**: what breaks or goes wrong in production
- **Fix**: concrete code suggestion or approach (keep it short)

Group findings by severity (CRITICAL first). If nothing significant is found, say so — a clean review is a valid outcome.

End with a one-line verdict: PASS (ship it), PASS WITH NOTES (minor items), or BLOCK (must fix before commit)."

Branch diff:

codex exec \
  -m gpt-5.3-codex \
  -c model_reasoning_effort='"xhigh"' \
  -s read-only \
  --ephemeral \
  -o /tmp/code-review-output.md \
  "You are a senior engineer doing a final gate review on code that is about to be committed. This is post-implementation — the work is done, you are looking for real problems only.

Start by running: git diff <branch>...HEAD to see all changes on this branch relative to <branch>. Also run git log <branch>..HEAD --oneline to understand the commit scope.

Review ONLY for issues that would cause bugs, outages, security incidents, or serious perf regressions in production. Ignore style, naming, formatting, and minor code smells.
Use the context7 MCP to check documentation of libraries when needed.

## Review checklist

### 1. Correctness
- Logic errors: wrong conditions, off-by-one, inverted checks, unreachable branches
- State bugs: stale closures, race conditions, mutations of shared state
- Null/undefined access, unhandled promise rejections, uncaught exceptions
- Incorrect API usage or wrong assumptions about library behavior
- Edge cases: empty inputs, boundary values, concurrent access

### 2. Security
- Injection vectors: SQL, XSS, command injection, path traversal
- Auth/authz gaps: missing permission checks, broken access control
- Secrets or credentials in code, logs, or error messages
- Insecure defaults: permissive CORS, disabled CSRF, weak crypto
- User input flowing unsanitized to sensitive sinks

### 3. Data integrity
- Missing or incorrect validation at system boundaries (API inputs, DB writes, file I/O)
- Silent data loss: swallowed errors, ignored return values, dropped events
- Inconsistent state from partial failures (no transaction, no rollback)

### 4. Performance (only if clearly problematic)
- N+1 queries, unbounded loops over large datasets
- Blocking calls in async/event-loop code
- Missing pagination or limits on user-controlled queries
- Obvious memory leaks (growing caches, unclosed resources, dangling listeners)

### 5. Robustness
- Error handling: catch blocks that swallow context, missing retry/backoff on network calls
- Missing timeouts on external calls (HTTP, DB, queues)
- Failure modes that cascade (one failing dependency takes down everything)

## Output format

For each finding:
- **Severity**: CRITICAL / HIGH / MEDIUM / LOW
- **File:Line**: exact location
- **What**: one-sentence description of the problem
- **Why it matters**: what breaks or goes wrong in production
- **Fix**: concrete code suggestion or approach (keep it short)

Group findings by severity (CRITICAL first). If nothing significant is found, say so — a clean review is a valid outcome.

End with a one-line verdict: PASS (ship it), PASS WITH NOTES (minor items), or BLOCK (must fix before commit)."
  1. Present the review output to the user exactly as returned. Do not edit, summarize, or reformat the findings.

$ARGUMENTS

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.