agentleFS
oaslanankaoaslananka/kicad-mcp-pro/.github/skills/code-review/SKILL.md

code-review

Skill117 starsChanged 5 months agoMITView on GitHub

Use this skill for GitHub Copilot pull request and code reviews in oaslananka/kicad-mcp-pro. Review Python MCP server changes, KiCad adapter and tool-contract changes, tests, npm/package wrappers, Tauri/Rust desktop code, GitHub Actions, security controls, documentation, generated metadata, and compatibility/release surfaces. Use it whenever reviewing a PR or diff in this repository, especially changes under src/, tests/, packages/, src-tauri/, .github/workflows/, or public MCP metadata/configuration.

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use starter, media-processing and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ww-w-aiSkill

    starter

    Static web development guide for beginners. Covers HTML/CSS/JavaScript and Next.js App Router basics. Project initialization with "init starter". Triggers: static website, portfolio, landing page, HTML CSS, beginner, 정적 웹, 포트폴리오, 초보자, 静的サイト, 初心者, 静态网站, 初学者, sitio web estático, site statique, statische Website, sito web statico Do NOT use for: fullstack apps (use $dynamic), enterprise (use $enterprise).

    Also in 4 projects that use this

  • mrgoonieSkill

    media-processing

    Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format conversion, batch processing, effects, composition). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.

    Also in 5 projects that use this

  • loulanyueSkill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 15 projects that use this

  • mrgoonieSkill

    aesthetic

    Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.

    Also in 4 projects that use this

  • AWSSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 32 projects that use this

  • AWSSkill

    resolving-merge-conflicts

    Use when you need to resolve an in-progress git merge/rebase conflict.

    Also in 48 projects that use this

  • +1 more from mrgoonie
  • +2 more from aws

The file

Show its rules and text

We split this skill into the rules it gives an agent

35 rules. 0 are common, 30 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 174 edited versions we read keep these.

  • 30

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not invent failures, tool behavior, KiCad behavior, CI results, or browser evidence.

    line 33
  2. Distinctive:

    Prefer correctness and user-impact findings over formatting or naming nits already enforced by repository tooling.

    line 35
  3. Distinctive:

    Do not require a broad refactor when a focused fix addresses the defect.

    line 37
  4. Distinctive:

    If no actionable defect is found, do not manufacture a comment.

    line 38
  5. Distinctive:

    Read the PR title, description, changed files, and diff.

    line 44
  6. Distinctive:

    Use GitHub MCP context when available to inspect:

    line 45
  7. Distinctive:

    Treat the PR head branch as the source of repository instructions and skill content.

    line 59
  8. Distinctive:

    Use existing CI evidence when it is from the reviewed head commit and covers the exact concern.

    line 60
  9. Distinctive:

    Use GitHub MCP tools when they provide concrete review evidence, especially for linked issues, PR intent, CI/check state, or failed …

    line 67
  10. Distinctive:

    When changes affect the dashboard or desktop/web UI and the application can be run in the review environment, use Playwright MCP for …

    line 73
  11. Distinctive:

    Do not report a browser regression unless you have code evidence or observed behavior.

    line 83
  12. Very specific:

    If a KiCad MCP Pro server is configured in repository Copilot settings and the PR changes KiCad-facing behavior, .kicad_* fixtures, …

    line 88
  13. Distinctive:

    Prefer the bounded read-only/default review surface and inspection/validation tools such as:

    line 92
  14. Very specific:

    keep register() and _register_* helpers focused on wiring.

    line 133
  15. Distinctive:

    do not add new business logic directly to large registration/composition roots.

    line 134
  16. Distinctive:

    prefer typed domain services plus thin MCP adapters.

    line 136
  17. Distinctive:

    If a calculation is approximate, heuristic, partial, or first-pass, ensure the API, docstring, docs, and verdict communicate that …

    line 144
  18. Distinctive:

    Treat the MCP surface as a public compatibility contract.

    line 150
  19. Distinctive:

    When a tool is added, removed, renamed, reclassified, or its schema/behavior changes, check the relevant contract surfaces:

    line 152
  20. Very specific:

    read-only/destructive/headless/requires-KiCad semantics.

    line 159
  21. Distinctive:

    Treat MCP/tool arguments, project paths, filenames, output paths, and imported artifact names as attacker-controlled.

    line 199
  22. Distinctive:

    no silent re-enabling of deprecated/legacy exposure.

    line 226
  23. Distinctive:

    default permissions remain least-privilege.

    line 248
  24. Distinctive:

    write permissions are scoped to the job that needs them.

    line 249
  25. Very specific:

    If a public PR introduces a sensitive vulnerability, explain the fix-relevant risk without publishing weaponized exploit details, secrets, …

    line 255
  26. Distinctive:

    Check the repository's testing policy:

    line 263
  27. Distinctive:

    Do not demand live KiCad execution for logic that is deliberately unit-testable without KiCad.

    line 277
  28. Distinctive:

    Prefer the smallest relevant validation set.

    line 319
  29. Distinctive:

    Use Playwright-backed tests when the environment supports them and the change is user-visible.

    line 363
  30. Very specific:

    Use task verify for the repository's local quality gate.

    line 368
  31. Distinctive:

    Do not make "run the entire suite" the only review recommendation when a specific, smaller regression test would prove the issue.

    line 372
  32. Distinctive:

    Write a review finding only when all of the following are true:

    line 377
  33. Distinctive:

    Use severity proportional to impact:

    line 395
  34. Distinctive:

    Avoid duplicate comments for the same root cause.

    line 403
  35. Distinctive:

    Do not create review comments solely because:

    line 408

“Common” is measured: kept by at least 6 in 10 of the 174 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

KiCad MCP Pro Code Review

Review pull requests for correctness, security, contract stability, compatibility, test coverage, and release safety. Prefer a small number of high-confidence, actionable findings over broad style feedback.

KiCad MCP Pro is a production MCP server that drives real KiCad projects. Treat unsafe mutations, incorrect tool contracts, path/subprocess mistakes, protocol regressions, and misleading engineering verdicts as high-risk.

Review stance

  • Review the changed code and the behavior introduced by the change.
  • Comment on unchanged code only when the PR newly makes an existing defect reachable or materially increases its impact.
  • Do not invent failures, tool behavior, KiCad behavior, CI results, or browser evidence.
  • Distinguish a demonstrated defect from a possible improvement.
  • Prefer correctness and user-impact findings over formatting or naming nits already enforced by repository tooling.
  • Do not require a broad refactor when a focused fix addresses the defect.
  • If no actionable defect is found, do not manufacture a comment.

1. Gather review context first

Before writing findings:

  1. Read the PR title, description, changed files, and diff.
  2. Use GitHub MCP context when available to inspect:
    • linked issues or incidents referenced by the PR;
    • review-relevant PR metadata;
    • changed-file scope;
    • workflow/check status;
    • failed job logs when a failure is relevant to the changed code.
  3. Consult repository policy and architecture when needed:
    • ARCHITECTURE.md
    • CONTRIBUTING.md
    • SECURITY.md
    • docs/development/coding-standards.md
    • docs/development/testing-policy.md
    • docs/security/threat-model.md
    • .github/PULL_REQUEST_TEMPLATE.md
  4. Treat the PR head branch as the source of repository instructions and skill content.
  5. Use existing CI evidence when it is from the reviewed head commit and covers the exact concern. Do not claim a check passed if you did not observe it.

2. MCP context policy

GitHub MCP

Use GitHub MCP tools when they provide concrete review evidence, especially for linked issues, PR intent, CI/check state, or failed workflow details. Do not browse unrelated repository history just to increase context.

Playwright MCP

When changes affect the dashboard or desktop/web UI and the application can be run in the review environment, use Playwright MCP for focused user-visible verification.

Relevant areas include:

  • src/kicad_mcp/web/
  • dashboard routes/templates/assets
  • src-tauri/frontend/
  • desktop flows that depend on the local dashboard

Do not report a browser regression unless you have code evidence or observed behavior. Lack of a runnable browser environment is not itself a defect.

KiCad MCP Pro MCP server

If a KiCad MCP Pro server is configured in repository Copilot settings and the PR changes KiCad-facing behavior, .kicad_* fixtures, validation logic, or project inspection behavior, use it only when it adds concrete evidence.

Prefer the bounded read-only/default review surface and inspection/validation tools such as:

  • kicad_get_project_info
  • kicad_get_version
  • project_quality_gate
  • schematic_quality_gate
  • pcb_quality_gate
  • run_erc
  • run_drc
  • pcb_get_board_summary
  • sch_get_symbols

During code review, do not invoke write, destructive, manufacturing, export, or mutation tools. Never change a user's board or schematic as part of review.

3. Architecture review

KiCad MCP Pro has a five-layer design. Preserve the boundaries described in ARCHITECTURE.md.

KiCad adapter seam

Flag changes that bypass the KiCad adapter seam or spread KiCad-version fragility into pure domain code.

KiCad-facing behavior belongs behind the established seams, including:

  • src/kicad_mcp/kicad/
  • src/kicad_mcp/connection.py
  • src/kicad_mcp/ipc/
  • src/kicad_mcp/discovery.py
  • thin tool adapters that delegate to stable domain/services

Pure deterministic logic should remain testable without KiCad and should not import KiCad-specific runtime internals unnecessarily.

Composition roots

For tool registration and validation composition:

  • keep register() and _register_* helpers focused on wiring;
  • do not add new business logic directly to large registration/composition roots;
  • preserve the repository's architecture-boundary checks;
  • prefer typed domain services plus thin MCP adapters.

Real-state rule

The server must not invent board, schematic, DRC/ERC, manufacturing, or KiCad state. Behavior should be based on real KiCad engines, real project files, or explicitly documented deterministic/heuristic calculations.

If a calculation is approximate, heuristic, partial, or first-pass, ensure the API, docstring, docs, and verdict communicate that limitation. Do not allow code or docs to present first-order estimates as formal engineering sign-off.

4. MCP tool and public contract review

Treat the MCP surface as a public compatibility contract.

When a tool is added, removed, renamed, reclassified, or its schema/behavior changes, check the relevant contract surfaces:

  • implementation in the appropriate domain/tool module;
  • TOOL_CATEGORIES and profile membership in src/kicad_mcp/tools/router.py;
  • experimental classification when applicable;
  • tool annotations/metadata in src/kicad_mcp/tools/metadata.py;
  • read-only/destructive/headless/requires-KiCad semantics;
  • operating-mode restrictions;
  • generated tool documentation;
  • tool-surface snapshots and contract tests;
  • profile/toolset/adapter/compatibility matrices when affected.

Flag any change that silently exposes mutating or destructive behavior through a read-only/default review surface.

Preserve stable error behavior. Agent-visible failures should use the repository's typed error model and stable error codes rather than leaking raw implementation exceptions or ambiguous strings.

For transport/protocol changes, review:

  • MCP initialization and protocol compatibility;
  • stdio and Streamable HTTP behavior;
  • session/header behavior;
  • discovery endpoints;
  • backward-compatibility implications;
  • explicit handling of unsupported client/KiCad capabilities.

5. Security review

Security findings take priority over style or convenience.

Subprocess and command execution

Flag:

  • shell=True;
  • os.system, os.popen, or equivalent shell execution in production paths;
  • string-built shell commands containing user-controlled data;
  • untrusted values interpreted as CLI flags unintentionally;
  • missing error handling around subprocess boundaries.

KiCad CLI calls should use discrete argv elements with shell=False.

Filesystem and path safety

Treat MCP/tool arguments, project paths, filenames, output paths, and imported artifact names as attacker-controlled.

Check for:

  • canonicalization before access;
  • confinement to the project/workspace root;
  • .. traversal;
  • absolute-path escapes;
  • symlink escapes;
  • Windows drive/UNC path edge cases;
  • unsafe file extensions where an allowlist is expected;
  • TOCTOU risks before destructive mutations.

Security-sensitive filesystem/subprocess changes need negative tests for hostile inputs and failure paths.

HTTP and local service boundaries

For Streamable HTTP, dashboard, bridge, or auth changes, verify the intended local and authentication boundaries are preserved, including:

  • bearer-token enforcement when configured;
  • origin validation;
  • CORS allowlists;
  • localhost-only assumptions where required;
  • stateful/stateless session policy;
  • no silent re-enabling of deprecated/legacy exposure.

Secrets and private design data

Flag code, tests, logs, fixtures, screenshots, or workflow artifacts that can expose:

  • credentials or API tokens;
  • private board/schematic data;
  • generated Gerbers/netlists/manufacturing files;
  • customer-specific paths or logs.

Destructive behavior

Any destructive or KiCad-mutating operation must be explicit, policy-gated, test-covered, and documented. A convenience path must not bypass operating-mode or human-approval boundaries.

GitHub Actions

For .github/workflows/**, check:

  • third-party actions are pinned to full commit SHAs;
  • default permissions remain least-privilege;
  • write permissions are scoped to the job that needs them;
  • untrusted GitHub expressions are passed through env: before shell use;
  • PR-controlled values do not reach shell commands unsafely;
  • release credentials use GitHub/OIDC/trusted-publishing patterns where applicable;
  • artifact, checksum, SBOM, signing, and attestation steps are not weakened silently.

If a public PR introduces a sensitive vulnerability, explain the fix-relevant risk without publishing weaponized exploit details, secrets, or private data. Follow SECURITY.md for disclosure handling.

6. Testing and regression review

Behavior changes require evidence at the narrowest useful layer.

Check the repository's testing policy:

  • pure Python logic -> unit tests and type checks;
  • KiCad artifact parsing -> representative fixture tests;
  • MCP tool contract changes -> metadata/generated-doc checks and surface/contract tests;
  • filesystem/subprocess changes -> hostile-input and failure-mode tests;
  • bug fixes -> regression test when reproducible;
  • workflow/release changes -> workflow-security and dry-run/metadata checks;
  • docs-only changes -> docs/link-sensitive review rather than unrelated runtime tests.

For tests that create or mutate Git repositories, verify test-owned temporary directories and isolated Git configuration are used so contributor/system hooks and configuration cannot leak into fixtures.

Do not demand live KiCad execution for logic that is deliberately unit-testable without KiCad. Conversely, do not accept mocked-only evidence when the change specifically depends on a live KiCad integration contract and the repository has a dedicated KiCad-enabled CI path for it.

7. Generated files and canonical metadata

Identify the source of truth before commenting on generated surfaces.

Important repository rules include:

  • pyproject.toml is a canonical package metadata/version source;
  • compatibility.yaml is a canonical KiCad/MCP support-policy source;
  • server.json and several public surfaces are generated/synchronized;
  • generated tool docs, parity/toolset/profile/adapter outputs should be regenerated from their canonical inputs rather than hand-edited.

Flag generated drift, but do not ask contributors to hand-edit generated files when the repository generator is authoritative.

8. Packaging, release, and desktop review

For Python/npm/container/release changes, check:

  • package metadata remains internally consistent;
  • npm wrapper behavior/version policy does not drift from the Python package contract;
  • lockfile changes match dependency changes;
  • release checks still run before publishing;
  • trusted publishing / provenance controls are not bypassed;
  • public compatibility claims match compatibility.yaml;
  • generated registry/container metadata stays synchronized.

For Tauri/desktop changes, also review:

  • backend/frontend version compatibility and startup handshake;
  • local server lifecycle and port/bind assumptions;
  • permission/capability changes;
  • error handling when the backend cannot start or does not match;
  • user-visible flows with web/GUI tests when practical.

9. Focused validation commands

Prefer the smallest relevant validation set. Use CI evidence instead of re-running a check only when the reviewed head commit already ran the same check successfully.

Baseline Python/server changes

corepack pnpm run format:check
corepack pnpm run lint
corepack pnpm run typecheck
corepack pnpm run test:unit

Public MCP/tool/metadata/compatibility changes

corepack pnpm run metadata:check
corepack pnpm run docs:tools:check
corepack pnpm run tool-contracts:check
corepack pnpm run architecture:check
corepack pnpm run profiles:check
corepack pnpm run adapter-matrix:check
corepack pnpm run compat:check

Workflow/security changes

corepack pnpm run workflows:lint
corepack pnpm run workflows:security

Package/release changes

corepack pnpm run package:check
corepack pnpm run release:dry-run

Dashboard changes

task test:web

Use Playwright-backed tests when the environment supports them and the change is user-visible.

Cross-boundary changes

Use task verify for the repository's local quality gate. Use task ci only when the change crosses enough package, compatibility, workflow, security, or release boundaries to justify the full local CI equivalent.

Do not make "run the entire suite" the only review recommendation when a specific, smaller regression test would prove the issue.

10. Finding quality bar

Write a review finding only when all of the following are true:

  1. The issue is introduced or made materially worse by the PR.
  2. There is a concrete failure mode, security risk, compatibility break, or maintenance hazard.
  3. The affected scenario is realistic for this repository.
  4. The comment can point to the smallest relevant changed range.
  5. The author can act on the feedback.

For each finding:

  • state the problem first;
  • explain the trigger/scenario;
  • explain the impact;
  • cite concrete code/CI/MCP evidence when available;
  • give a focused fix direction;
  • mention the missing test only when a test would materially prevent regression.

Use severity proportional to impact:

  • Blocker: vulnerability, data loss, unsafe mutation, release/supply-chain break, major public-contract break, or a deterministic build/runtime failure.
  • Major: likely user-facing correctness, compatibility, protocol, or regression risk.
  • Minor: concrete maintainability or test gap with plausible future impact.
  • Omit pure style nits and speculative suggestions.

Avoid duplicate comments for the same root cause. Prefer one precise finding that covers the causal defect.

11. Do not flag these by default

Do not create review comments solely because:

  • code could be written in a different style;
  • a formatter/linter would already catch it;
  • generated output changed together with its canonical source;
  • a documentation-only change lacks unrelated runtime tests;
  • a full task ci run is absent but the relevant focused checks passed;
  • the code uses an intentional project pattern documented in ARCHITECTURE.md;
  • a theoretical edge case has no realistic path from repository inputs.

The goal is a review that maintainers can trust: few comments, high confidence, clear impact, and repository-specific evidence.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.