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.
npx agentmods add commands/openshift-eng/ai-helpers/pre-commit-reviewgit clone --depth 1 https://github.com/openshift-eng/ai-helpersWrote 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.
[](https://agentmods.dev/commands/openshift-eng/ai-helpers/pre-commit-review)<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/pre-commit-review"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/pre-commit-review.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00016 | $0.02616 |
| Opus 5 | $0.00008 | $0.01308 |
| Sonnet 5 | $0.00003 | $0.00523 |
| Haiku 4.5 | $0.00002 | $0.00262 |
Grade A, and why
pre-commit-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 3d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- pre-commit-review — 98% identical, 12 lines differ
How it starts
The opening of the file, as written. The whole thing — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Name
code-review:pre-commit-review
Synopsis
/code-review:pre-commit-review [--language <lang>] [--profile <name>] [--skip-build] [--skip-tests]
Description
The code-review:pre-commit-review command performs a comprehensive code quality review of staged and unstaged changes before committing. It analyzes unit test coverage, idiomatic code patterns, DRY compliance, SOLID principles, and build verification.
The command supports two layers of customization:
-
Language skills (
--language <lang>): Load language-specific guidance for idiomatic code review, test conventions, and build commands. Currently shipped:go. Planned:python,rust,typescript,java. If not specified, the language is auto-detected from changed file extensions. -
Profile skills (
--profile <name>): Load project-specific guidance that layers on top of language checks. Profiles add project conventions, shared utilities, build targets, and additional review criteria. Profiles reference the project's own agents and skills rather than embedding them.
The two layers compose: --language go --profile hypershift applies both Go idioms and HyperShift project conventions.
Implementation
Step 0 — Parse Arguments & Load Skills
- Parse
$ARGUMENTSfor the following flags:--language <lang>: Language skill to load (e.g.,go,python,rust,typescript,java)--profile <name>: Project profile skill to load (e.g.,hypershift)--skip-build: Skip build verification step--skip-tests: Skip unit test coverage review step
- If
--languageis not specified, auto-detect the primary language from the file extensions of changed files:.go->go.py->python.rs->rust.ts,.tsx->typescript.java->java- If mixed or unrecognized, proceed without a language skill
- Check for the language skill file at
skills/<lang>-code-review/SKILL.mdrelative to the plugin root directory. If the skill exists, read it and store its content for use by sub-agents. If it does not exist, inform the user and proceed with a generic review. - If
--profileis specified, check for the profile skill file atskills/<name>-code-review/SKILL.mdrelative to the plugin root directory. If the skill exists, read it and store its content for use by sub-agents. If it does not exist, warn the user and proceed without profile-specific checks.
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.
- 3d ago First seen · 191 lines · 16 tokens per session scan A 848d768ef31d
pre-commit-review is a command published in the GitHub repository openshift-eng/ai-helpers (116 stars, last pushed yesterday), licensed Apache-2.0. It adds 16 tokens to every session and 2,616 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-09-03.
Other commands, from other repositories
review-diff
Review the current working diff for correctness, security, and reuse.
elegant-code-review
Review the current working diff against the elegant-code decision ladder and propose deletions, honoring the negligence floor.
git
The pre-finish status: branch, hygiene findings, message checks, workflow lint, template state.
prp-commit
Quick commit with natural language file targeting: describe what to commit in plain English.
fix-comments
Address PR review comments by implementing requested changes automatically.
validate-pr-description
Use when validating a PR title and description for conventional commit format, issue linking keywords, and template compliance before submission.