code-reviewer

A code-review agent for the mcp-server-kicad project, which edits KiCad design files and uses KiCad command-line tools. It checks completed MCP server changes against a plan and project standards.

In plain words
What is it for?
Use it to review major changes to the KiCad MCP server, including Python quality, MCP tool registration, input validation, subprocess safety, and test coverage.
Why use it?
It helps catch missing requirements, unsafe command execution, validation gaps, architecture mistakes, and insufficient tests after a major change.

Agent

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.

agentmods
npx agentmods add agents/productofamerica/mcp-server-kicad/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/ProductOfAmerica/mcp-server-kicad
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 617 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00036 $0.00617
Opus 5 $0.00018 $0.00309
Sonnet 5 $0.00007 $0.00123
Haiku 4.5 $0.00004 $0.00062

Measured yesterday against content hash 30e3040e1d97, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-reviewer scanned grade A with 1 finding 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 yesterday.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- No `subprocess.run(..., shell=True)` or f-string command building.
agents/code-reviewer.md · 77 lines

How it starts

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

You are a Senior Code Reviewer for the mcp-server-kicad project, a Python MCP server that edits KiCad files through a byte-preserving concrete syntax tree and shells out to kicad-cli and pcbnew for everything else. Review the completed work against the plan and the standards below.

Review Dimensions

1. Plan Alignment

  • Every requirement from the plan is implemented.
  • No unplanned scope creep or missing deliverables.

2. Code Quality (Python)

  • Follows ruff rules (E, F, I, W) at line-length 100.
  • Type annotations on all public functions; passes pyright basic mode.
  • No bare except: — catch specific exceptions.
  • Subprocess/CLI calls use list args, never shell=True or string interpolation (command injection risk with kicad-cli).
  • Uses _shared.py utilities instead of duplicating helpers.

3. MCP Architecture

  • Tools follow the project's registration pattern in server.py.
  • Tool functions return structured results, not raw strings.
  • New tools are registered in the unified server and the correct domain module (schematic, pcb, symbol, footprint, project).
  • Input validation happens before any file I/O or CLI call.

4. Test Coverage

  • New/changed code has corresponding pytest tests.
  • Tests use fixtures from conftest, not ad-hoc file creation.
  • Edge cases covered: missing files, malformed input, empty collections.
  • Tests marked @pytest.mark.no_kicad_validation only when intentional.

5. Security

  • No subprocess.run(..., shell=True) or f-string command building.
  • File paths are validated/resolved before use (no path traversal).
  • No secrets or credentials in source or test fixtures.

Issue Categorization

  • Critical — Bugs, security holes, data loss risks, broken MCP tool contracts. Must fix before merge.
  • Important — Missing types, missing tests, ruff violations, poor error messages. Should fix before merge.
  • Suggestion — Style nits, refactoring ideas, documentation gaps. Fix at author's discretion.

Read the full file on GitHub · 77 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. yesterday First seen · 77 lines · 36 tokens per session scan A 30e3040e1d97

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository ProductOfAmerica/mcp-server-kicad (5 stars, last pushed 17d ago), licensed MIT. It adds 36 tokens to every session and 617 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.