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/redhat-community-ai-tools/unifai/code.reviewgit clone --depth 1 https://github.com/redhat-community-ai-tools/UnifAIWrote 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/redhat-community-ai-tools/unifai/code.review)<a href="https://agentmods.dev/commands/redhat-community-ai-tools/unifai/code.review"><img src="https://agentmods.dev/badge/commands/redhat-community-ai-tools/unifai/code.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.00000 | $0.00671 |
| Opus 5 | $0.00000 | $0.00336 |
| Sonnet 5 | $0.00000 | $0.00134 |
| Haiku 4.5 | $0.00000 | $0.00067 |
Grade A, and why
Code.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 6d 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.
What it actually says
Your task is to perform a deep, non-superficial code review on the target branch.
You must focus on: Code duplication Dead / unused code Reusability opportunities Smart abstraction usage Over-engineering Clean architecture alignment Maintainability and efficiency You are NOT allowed to provide generic comments.
🎯 Primary Review Goals
Detect duplicated logic (explicit or subtle) Detect dead / unreachable / unused code Detect similar implementations that should be unified Identify opportunities to reuse existing utilities or services Detect unnecessary abstractions Detect performance inefficiencies Validate consistency with project patterns
🔍 Duplication Detection (STRICT)
You MUST check for: Repeated validation logic Repeated mapping logic Repeated error handling blocks Repeated logging patterns Similar helper methods implemented in multiple places Copy-paste logic with small variations Duplicate business rules across services For each duplication: Show where it appears Explain why it is duplication Suggest how to refactor (reuse existing component or extract shared logic) Mark severity: MAJOR → duplicated business logic MINOR → duplicated structural or helper code
🧟 Dead Code Detection (STRICT)
You MUST detect: Unused imports Unused variables Unused parameters Unused functions Unused classes Commented-out legacy code Unreachable branches Always-true / always-false conditions Redundant null checks Deprecated code not used anymore For each issue: Explain why it is dead or redundant Recommend safe removal strategy Mark severity: MAJOR → unused logic that affects clarity MINOR → cosmetic cleanup
♻️ Reusability & Smart Design Check
Before suggesting new abstractions, you MUST: Check if similar logic already exists Check if existing utilities can be reused Check if existing base classes or services can be leveraged Check if shared mappers already exist Check if common error handling mechanism is already implemented If new logic duplicates existing patterns → mark as ALIGNMENT ISSUE If reusable logic exists but is not used → mark as MAJOR
🧠 Architecture Awareness
While reviewing, ensure: No business logic in controllers No business logic in repositories No cross-layer leakage Clear separation of responsibilities SRP respected No tight coupling introduced Flag architectural side effects if found.
🚫 Forbidden Review Behavior
Do NOT give generic suggestions like “improve readability” Do NOT suggest rewriting everything Do NOT recommend adding abstractions unless justified Do NOT approve if major duplication exists Do NOT ignore subtle duplication patterns Every claim must be justified.
📊 Required Output Format 1️⃣ Code Duplication Issues
Location Description Severity Refactor recommendation
2️⃣ Dead Code Issues
Location Why it is dead/unnecessary Severity Removal recommendation
3️⃣ Reusability Improvements
Existing reusable component found
Where it should be used Why it improves maintainability
4️⃣ Efficiency & Clean Code Concerns
Issue Risk Suggested improvement
5️⃣ Overall Code Health Score (0–10) Explain reasoning.
6️⃣ Final Verdict CLEAN NEEDS REFACTORING MAJOR CLEANUP REQUIRED Explain clearly.
🎯 Review Mindset
You are reviewing production-grade code. Optimize for: Maintainability Reusability Clarity Scalability Long-term sustainability
Be strict. Be precise. Be constructive. Be architectural.
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.
- 6d ago First seen · 142 lines · 0 tokens per session scan A f4f3bff3989c
Code.Review is a command published in the GitHub repository redhat-community-ai-tools/UnifAI (44 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 671 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-30.
Other commands, from other repositories
afrv
Revise the current feature worktree after code review — decide accept/revert/modify (shortcut for feature-code-revise).
mach12:pr-review
Run a comprehensive PR review with independent reviewers and post the results as a structured comment.
mach12:gh-pr-read
Read a GitHub pull request's title, body, and all top-level PR conversation comments; optionally locate an HTML-marker comment.
mach12:integrate-branch
Integrate a same-repository branch locally, review the combined result, and push when authorized.
bob-review-diff
Send the diff you just made to Bob for a read-only code review (Bob's native review mode).
worktree
Manage git worktrees for parallel agent isolation — spin up a new worktree, merge it back, or clean it up.