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 skills/u9401066/rootcause-mcp/code-reviewernpx skills add u9401066/rootcause-mcp --skill code-reviewergit clone --depth 1 https://github.com/u9401066/rootcause-mcpWrote 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/skills/u9401066/rootcause-mcp/code-reviewer)<a href="https://agentmods.dev/skills/u9401066/rootcause-mcp/code-reviewer"><img src="https://agentmods.dev/badge/skills/u9401066/rootcause-mcp/code-reviewer.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 | $0.00000 | $0.01710 |
| Opus 5 | $0.00000 | $0.00855 |
| Sonnet 5 | $0.00000 | $0.00342 |
| Haiku 4.5 | $0.00000 | $0.00171 |
Grade A, and why
code-reviewer 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.
This is a copy
100% identical to code-reviewer — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
name: code-reviewer description: Comprehensive code review checking quality, security, and best practices. Triggers: CR, review, 審查, 檢查, check, 看一下, PR, code review, 品質, inspect, 檢視, 看看, 幫看, lint, quality check, 品質檢查, pull request, merge request, MR, diff, 程式碼審查. version: 2.2.0 category: quality compatibility:
- claude-code
- github-copilot
- vscode
- codex-cli dependencies:
- ddd-architect
- code-refactor allowed-tools:
- read_file
- grep_search
- semantic_search
- get_errors
- list_code_usages
- run_in_terminal
程式碼審查技能
描述
對程式碼進行全面審查,檢查品質、安全性、效能和最佳實踐。
觸發條件
- 「review 這段程式碼」「CR」「審查」
- 「檢查程式碼」「看一下」「幫看」
- 「code review」「PR review」
🔧 操作步驟
Step 1: 確定審查範圍
詢問或推斷審查目標:
- 特定檔案:
read_file("path/to/file.py") - 整個目錄:
grep_search取得概覽 - 特定功能:
semantic_search("功能名稱") - 最近變更:
get_changed_files()
Step 2: 執行靜態分析(Python 專案)
# Ruff - 快速 linter (取代 flake8 + isort + pyupgrade)
uv run ruff check src/ --output-format=concise
# Mypy - 型別檢查
uv run mypy src/ --ignore-missing-imports
# Bandit - 安全性檢查
uv run bandit -r src/ -ll
# Vulture - 死碼偵測
uv run vulture src/ --min-confidence 80
Step 3: 審查程式碼品質
| 檢查項目 | 標準 | 工具輔助 |
|---|---|---|
| 命名清晰度 | 名稱應描述用途 | 人工審查 |
| 函數長度 | < 50 行 | grep_search |
| 類別大小 | < 300 行 | grep_search |
| 複雜度 | McCabe < 10 | ruff --select=C901 |
| DRY 原則 | 無重複程式碼 | semantic_search |
| SOLID 原則 | 單一職責等 | 人工審查 |
Step 4: 審查安全性
| 風險類型 | 檢查方式 | 嚴重程度 |
|---|---|---|
| SQL 注入 | 搜尋 raw SQL | 🔴 Critical |
| XSS | 搜尋未轉義輸出 | 🔴 Critical |
| 硬編碼密碼 | grep "password|secret|key" | 🔴 Critical |
| 路徑遍歷 | 搜尋未驗證路徑 | 🟠 High |
| 日誌洩漏 | 搜尋敏感資料輸出 | 🟡 Medium |
Step 5: 審查效能
| 問題類型 | 偵測方式 |
|---|---|
| N+1 查詢 | 搜尋迴圈內的 DB 呼叫 |
| 無謂迴圈 | 審查巢狀迴圈 |
| 記憶體洩漏 | 檢查資源釋放 |
| 阻塞操作 | 審查 I/O 操作 |
Step 6: 審查 DDD 架構
參考 ddd-architect 規則:
- Domain 層是否有外部依賴?
- Repository Interface 是否在 Domain 層?
- Application 層是否過度膨脹?
Step 7: 產生審查報告
📊 審查報告格式
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 · 195 lines · 0 tokens per session scan A c828461b4e15
code-reviewer is a skill published in the GitHub repository u9401066/rootcause-mcp (0 stars, last pushed 15d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,710 tokens. A static security scan graded it A with 0 findings. It is 100% identical to code-reviewer, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
coding-icd10
Suggests candidate ICD-10-CM diagnosis codes (and ICD-10-PCS procedure codes) for diagnoses and procedures extracted by OpenMed, with rationale and a human-coder caveat. Use when the user wants to code a problem list, map a diagnosis span to a billable ICD-10-CM code, route a finding to the right chapter, cross-walk…
detecting-pv-signals
Computes disproportionality signals — PRR, ROR, EBGM, and IC (BCPNN) — over FAERS / OpenFDA drug-event data to flag potential safety signals. Use when the user wants to mine spontaneous-report data for drug-reaction associations, build a 2x2 contingency table, compute a Proportional Reporting Ratio or Reporting Odds…
mapping-to-snomed
Maps clinical concept spans extracted by OpenMed to SNOMED CT concepts through a USER-SUPPLIED terminology server (the user's own Ontoserver, Snowstorm, or UMLS/UTS), never a bundled vocabulary. Use when the user wants to code findings, disorders, procedures, body structures, or substances to SNOMED CT, run an ECL…
deidentifying-clinical-text
Remove, mask, or replace PHI/PII in clinical free text on-device with OpenMed's deidentify(). Use when the user needs to de-identify medical notes, strip patient identifiers, redact PHI before sharing or analysis, anonymize discharge summaries, or pick a de-id method (mask vs remove vs replace vs hash vs shiftdates).…
extracting-sdoh
Extracts social determinants of health (SDOH) — housing instability, food insecurity, unemployment, transportation barriers, social isolation, financial strain — from clinical narrative and maps the spans to ICD-10-CM Z-codes (Z55–Z65). Use after running OpenMed NER when the user wants SDOH surfacing, Z-code…
pick-a-pii-model
Select an on-device OpenMed PII model from the committed registry by language, runtime format, and size budget, then require recall validation before deployment. Use when an agent must choose a local PII detector for CPU, Apple Silicon, or a mobile export without relying on live model discovery.