eg-precommit-review

eg-precommit-review is a skill for Codex from vshvedov/elephant-goldfish. It costs 20 tokens per session (1,224 once invoked), scanned A, original, MIT.

A pre-commit review process in which a fresh reviewer checks pending code changes before they are committed to version control.

In plain words
What is it for?
It is for running the relevant linting, type checks, focused tests, end-to-end tests, and code-generation checks for a pending change.
Why use it?
It helps catch code, type, test, generated-file, and user-visible behavior problems before they enter the project history.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

Good fit It is for running the relevant linting, type checks, focused tests, end-to-end tests, and code-generation checks for a pending change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vshvedov/elephant-goldfish/eg-precommit-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vshvedov/elephant-goldfish --skill eg-precommit-review
Clone the repo
git clone --depth 1 https://github.com/vshvedov/elephant-goldfish

Made for: Codex.

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 eg-precommit-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/vshvedov/elephant-goldfish/eg-precommit-review/github.svg)](https://agentmods.dev/skills/vshvedov/elephant-goldfish/eg-precommit-review)
Your own site
<a href="https://agentmods.dev/skills/vshvedov/elephant-goldfish/eg-precommit-review"><img src="https://agentmods.dev/badge/skills/vshvedov/elephant-goldfish/eg-precommit-review/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 eg-precommit-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/vshvedov/elephant-goldfish/eg-precommit-review"><img src="https://agentmods.dev/badge/skills/vshvedov/elephant-goldfish/eg-precommit-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,224 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.00020 $0.01224
Opus 5 $0.00010 $0.00612
Sonnet 5 $0.00004 $0.00245
Haiku 4.5 $0.00002 $0.00122

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

Security

Grade A, and why

eg-precommit-review 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 10d 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.

codex/skills/eg-precommit-review/SKILL.md · 137 lines

How it starts

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

EG Precommit Review Skill

Run the pre-commit review loop. The goal is to validate pending changes locally before commit with a fresh reviewer that sees the diff cold.

If the user provides text around the $eg-precommit-review skill mention, treat it as an additional focus area for the reviewer.

Preflight

Skip the loop for pure documentation-only commits, typo-only edits, version bumps, dependency updates with no code changes, formatter-only diffs, and merge commits.

Run it for everything else.

Run these checks sequentially, not chained:

<derive lint command from AGENTS.md, CLAUDE.md, package manifests, and CI config>

If the project has a separate typecheck/analyze step, run it:

<derive typecheck/analyze command>
<derive focused unit/integration test command>

If the project has E2E/system tests and the diff touches UI/API/user-visible behavior, run the relevant tier:

<derive E2E/system test command>

Skip only when the diff is purely internal logic/config/docs with no observable UI/API behavior.

If the project uses generated code and the diff touches generation inputs, regenerate first:

<derive codegen command>

Both source and generated files must be committed together.

New errors introduced by the diff are blockers. Pre-existing failures are out of scope; if needed, baseline against main and compare outputs.

Goldfish Review

The user invoked this skill, so fresh subagent review is explicitly authorized.

Preferred path: spawn a fresh Codex subagent with fork_context: false and agent_type: "default". If spawn_agent is unavailable, pipe the reviewer prompt into the Codex CLI fallback:

codex review --uncommitted --base main -

Pass only the reviewer prompt below. Do not include the implementation plan, the original request, or explanatory context.

Independent code review of the pending changes on this branch.

Run all of the following to capture pending changes:
- `git status`
- `git diff`
- `git diff --cached`
- `git diff main...HEAD`
- `git log main..HEAD --oneline`
- `git ls-files --others --exclude-standard`

Read touched files in full where the diff context is not enough.

Find substantive issues. For each finding: cite file:line, name the issue, explain why it is a bug or risk, and suggest a concrete fix.

Hunt for:
- Bugs: off-by-ones, null/undefined dereference, wrong variable used, type coercion gotchas, unhandled promises, missing await, mutating function args, wrong return on error paths.
- Security: command injection, XSS, SQL injection, path traversal, prototype pollution, unsanitized input, secrets in URLs or logs, missing auth checks, missing CSRF, open redirects, IDOR.
- Race conditions: shared state without locks, async ordering, double-submit, event handler re-entry, TOCTOU.
- Edge cases: empty arrays, NaN, Infinity, zero, negative numbers, very large numbers, Unicode, timezone, network failure, partial writes.
- Error handling: silent catches, swallowed errors, fallback paths that mask real failures, missing propagation.
- Performance: N+1 queries, sync work in hot loops, missing memoization, layout thrashing, unbounded growth, missing pagination.
- Test coverage gaps, especially missing regression tests for bug fixes.
- Project-specific gotchas from AGENTS.md/CLAUDE.md and the current stack: auth/scoping, migrations/backfills, generated-code drift, lifecycle/dispose issues, N+1/data loading, async races, platform/browser differences, performance budgets.
- Project-rule violations from AGENTS.md or CLAUDE.md, with citations.
- Dead code, leftover debug output, stale comments referencing removed code.

Do not surface style preferences, micro-refactors, or speculative concerns without a concrete failure mode.

[NO ADDITIONAL FOCUS]

Output format: numbered list. For each finding, lead with file:line. End with the literal string `no findings` if and only if the diff is clean.

Read the full file on GitHub · 137 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 137 lines · 20 tokens per session scan A 374f3438a90d

Subscribe to this mod's changes

eg-precommit-review is a skill published in the GitHub repository vshvedov/elephant-goldfish (43 stars, last pushed 4mo ago), licensed MIT. It adds 20 tokens to every session and 1,224 once invoked, about $0.0001 per session on Opus 5. 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-30.