APIbase: Command for Claude Code

.claude/commands/codexreview.md

codexreview is a command for Claude Code from whiteknightonhorse/APIbase. It costs 0 tokens per session (1,436 once invoked), scanned A, original, MIT.

An adversarial code-review command that examines recent changes for bugs, security weaknesses, and other defects. It also reads the complete changed files to check how the changes fit into the surrounding code.

In plain words
What is it for?
Use it to review a recent commit or feature branch for issues such as injection, authentication failures, unsafe data handling, broken behavior, and missing tests.
Why use it?
It helps expose problems that a quick review or a focus on the code difference alone can miss.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is whiteknightonhorse/APIbase's own configuration. It tells Claude Code how to work on APIbase itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything APIbase configures →

Reuse

Borrowing it

Nothing to install: this file belongs to whiteknightonhorse/APIbase. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/whiteknightonhorse/APIbase/main/.claude/commands/codexreview.md
Clone the repo
git clone --depth 1 https://github.com/whiteknightonhorse/APIbase

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codexreview

README.md
[![agentmods](https://agentmods.dev/badge/commands/whiteknightonhorse/apibase/codexreview/github.svg)](https://agentmods.dev/commands/whiteknightonhorse/apibase/codexreview)
Your own site
<a href="https://agentmods.dev/commands/whiteknightonhorse/apibase/codexreview"><img src="https://agentmods.dev/badge/commands/whiteknightonhorse/apibase/codexreview/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codexreview

Your own site · 80×15
<a href="https://agentmods.dev/commands/whiteknightonhorse/apibase/codexreview"><img src="https://agentmods.dev/badge/commands/whiteknightonhorse/apibase/codexreview.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,436 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01436
Opus 5 $0.00000 $0.00718
Sonnet 5 $0.00000 $0.00287
Haiku 4.5 $0.00000 $0.00144

Measured 9d ago against content hash 9accf49df423, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

codexreview scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/codexreview.md · 138 lines

How it starts

The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Adversarial Code Audit

You are a hostile code reviewer. Your job is to find bugs, vulnerabilities, and defects. Not to compliment code.

Step 1: Get the diff

Run git diff HEAD~1 to get the changes from the last commit. If on a feature branch, use git diff main...HEAD instead.

Read the full diff. Then read the complete file for every changed file (not just the diff context) so you understand the surrounding code.

Step 2: Analyze every changed file against 8 categories

For each file in the diff, systematically check:

Category 1: SECURITY

  • Hardcoded secrets, API keys, tokens, passwords in code or comments
  • SQL injection, NoSQL injection, command injection, SSRF, XSS
  • Path traversal, URL injection without encodeURIComponent
  • Auth bypass, missing authentication checks, privilege escalation
  • Insecure crypto (MD5, SHA1 for security, ECB mode, static IVs)
  • Use of eval(), exec(), Function(), vm.runInNewContext() with user input
  • Prototype pollution, ReDoS, unsafe deserialization
  • Missing rate limiting on sensitive endpoints
  • Secrets logged or included in error responses
  • HTML sanitization via raw regex instead of dedicated library

Category 2: DATA INTEGRITY

  • Race conditions in concurrent access (check-then-act without locks)
  • Lost updates (read-modify-write without optimistic locking)
  • Unchecked null/undefined that will throw at runtime
  • Silent data truncation or coercion (Number() on non-numeric, parseInt without radix)
  • Missing database transaction where atomicity is required
  • Partial state on error (operation half-completed, no rollback)
  • Array index out of bounds, map/filter on possibly-null arrays
  • Type coercion bugs (== vs ===, truthy/falsy edge cases)

Category 3: ERROR HANDLING

  • catch blocks that swallow errors silently (empty catch, catch with only console.log)
  • catch-all without rethrowing or proper error classification
  • Missing error boundaries in async chains (unhandled promise rejection)
  • Error messages that leak internal state, stack traces, or file paths
  • Missing finally blocks for resource cleanup (DB connections, file handles)
  • Errors that should be fatal treated as warnings
  • Missing timeout handling on external calls

Read the full file on GitHub · 138 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 138 lines · 0 tokens per session scan A 9accf49df423

Subscribe to this mod's changes

codexreview is a command published in the GitHub repository whiteknightonhorse/APIbase (10 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,436 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.