rag-code-review

rag-code-review is a skill for Claude Code, Codex from lyonzin/knowledge-rag. It costs 83 tokens per session (1,832 once invoked), scanned A, original, MIT.

A code-review workflow that searches the team’s stored knowledge before commenting on a pull request, diff, or code snippet. It checks relevant architecture decisions, coding standards, existing patterns, and past incidents.

In plain words
What is it for?
Use it when reviewing changes involving areas such as authentication, retries, logging, configuration, dependencies, ingestion, search, or storage.
Why use it?
It makes review comments fit the project’s actual rules and history instead of applying generic advice that may conflict with established practice.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when reviewing changes involving areas such as authentication, retries, logging, configuration, dependencies, ingestion, search, or storage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lyonzin/knowledge-rag/rag-code-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 lyonzin/knowledge-rag --skill rag-code-review
Clone the repo
git clone --depth 1 https://github.com/lyonzin/knowledge-rag

Made for: Claude Code, 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 rag-code-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-code-review/github.svg)](https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-code-review)
Your own site
<a href="https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-code-review"><img src="https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-code-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 rag-code-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-code-review"><img src="https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,832 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00083 $0.01832
Opus 5.5 $0.00033 $0.00733
Sonnet 5.5 $0.00017 $0.00366
Haiku 4.5 $0.00008 $0.00183

Measured 27d ago against content hash 13b30a1fee1b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rag-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 27d 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.

skills/workflow/rag-code-review/SKILL.md · 174 lines

How it starts

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

rag-code-review — review against team standards, not the internet

When to use this skill

Trigger when the user asks:

  • "Review this PR / code / diff"
  • "Any issues with this?"
  • "Does this look right?"
  • "Is this idiomatic?"
  • "Should I merge this?"
  • Any critique-style prompt on a code artifact

What this skill commits to

Before offering ANY review comment, the agent consults the corpus for:

  1. ADRs governing the area (auth, retries, error handling, naming, dependencies…)
  2. Existing patterns — similar files that show the "how we do this" convention
  3. Prior incidents touching the code being changed

Review comments then read as "per ADR-XXXX we do Y here" rather than "generally you should Z".


Steps

  1. Identify the "area" of the change. From the diff / snippet, extract:

    • The file path or module name (e.g. services/payment/, mcp_server/security.py)
    • The concern touched (auth, retries, logging, config, ingestion, search, storage…)
    • Any new dependencies, endpoints, or public API changes
  2. Search for governing ADRs / standards:

    search_knowledge(query="<concern> ADR standard", max_results=5)
    

    Example: search_knowledge(query="retry policy ADR")

  3. Find similar existing files (patterns to follow):

    search_similar(filepath="<the file being changed>", max_results=5)
    

    This works only when that file is itself indexed: its path must be inside the knowledge-rag documents folder, as list_documents shows it. A file from the repository under review usually is not, and a new file never is; then use search_knowledge with the file's purpose instead.

  4. Look for prior incidents / postmortems on adjacent code:

    search_knowledge(query="<component> incident postmortem", max_results=3)
    
  5. Structure the review comments:

    ### Findings
    
    1. **[required]** Per ADR-0031 [docs/adr/0031-retries.md] the retry policy is
       "3 attempts, exponential backoff". This PR uses 5 attempts — either match
       the ADR or open a follow-up ADR to document the exception.
    
    2. **[suggestion]** The error-handling shape here differs from what
       `services/payment/refund_service.py` does [search_similar hit].
       Consider aligning for consistency.
    
    3. **[nit]** Missing docstring on `_new_helper()`. Team standard is ≥80%
       docstring coverage (interrogate gate, per CONTRIBUTING.md).
    
    ### Not commented on
    
    Style / naming / whitespace — those are ruff's job. Reviewed only what
    ruff cannot catch.
    

Read the full file on GitHub · 174 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. 27d ago Changed · +2 lines 13b30a1fee1b
  2. 3mo ago First seen · 172 lines · 83 tokens per session scan A b1b43b276f31

Subscribe to this mod's changes

rag-code-review is a skill published in the GitHub repository lyonzin/knowledge-rag (313 stars, last pushed 2d ago), licensed MIT. It adds 83 tokens to every session and 1,832 once invoked, about $0.0003 per session on Opus 5.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.

Related

rag-code-review compared with skills from other repositories

rag-code-review next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rag-code-reviewlyonzin/knowledge-ragSkill3132d agoMITA83Claude Code, Codex
pinecone:full-text-searchpinecone-io/pinecone-claude-code-pluginSkill6922d agoMITA180Claude Code
pinecone:n8npinecone-io/pinecone-claude-code-pluginSkill6922d agoMITA67Claude Code
pinecone:quickstartpinecone-io/pinecone-claude-code-pluginSkill6922d agoMITA94Claude Code
pinecone:clipinecone-io/pinecone-claude-code-pluginSkill6922d agoMITA75Claude Code
pinecone:mcppinecone-io/pinecone-claude-code-pluginSkill6922d agoMITA80Claude Code
helppinecone-io/gemini-cli-extensionSkill2311d agoMITA50Claude Code, Codex