mcp-server-excel code-review.instructions.md

A code-review rulebook for sbroenne/mcp-server-excel, focused on defects that can break Excel integration, resource cleanup, contracts, tests, or security. It covers both strongly typed Excel interfaces and dynamic access used when required by runtime dependencies.

In plain words
What is it for?
Use it to review pull requests involving Excel interop, COM resources, MCP contracts, error handling, tests, or security-sensitive cleanup.
Why use it?
It helps reviewers catch concrete risks such as incorrect numeric conversions, unreleased Excel objects, unsafe process cleanup, and broken protocol behavior. It keeps reviews focused on high-confidence problems instead of style preferences.

Instructions file for GitHub Copilot

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 instructions/sbroenne/mcp-server-excel/code-review
Clone the repo
git clone --depth 1 https://github.com/sbroenne/mcp-server-excel

Made for: GitHub Copilot.

Per session 784 This file is loaded in full into every session.
When invoked 784 The same file — it is already loaded in full.
Security scan A 0 findings. 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.00784 $0.00784
Opus 5 $0.00392 $0.00392
Sonnet 5 $0.00157 $0.00157
Haiku 4.5 $0.00078 $0.00078

Measured 2d ago against content hash 106284ecbc5b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-server-excel code-review.instructions.md 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 2d 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.

.github/instructions/code-review.instructions.md · 66 lines

How it starts

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

Copilot Code Review

Report only actionable, high-confidence defects introduced by the pull request. Prioritize correctness, data loss, resource leaks, deadlocks, broken contracts, and security. Do not request style-only changes, speculative refactors, or unrelated cleanup.

Interop and Resource Safety

  • Enforce PIA-first interop across Core and ComInterop. Flag new dynamic Excel access when Microsoft.Office.Interop.Excel exposes a strongly typed member. Allow late binding only for a documented PIA or runtime dependency gap, such as Application.Run, AutomationSecurity, or VBProject; do not suggest early binding that reintroduces Office.Core or VBE dependencies.
  • Flag direct numeric casts from dynamic COM values. Excel can marshal integer properties as double; use Convert.ToInt32, Convert.ToDouble, or the equivalent explicit conversion instead of (int) or an enum cast.
  • Verify every acquired COM object is released in a finally block. Cleanup must target resources by tracked identity, such as PID and start time or a stable object identifier, never by process name or display-name substring.
  • Do not treat a generic HRESULT, especially 0x800A03EC, as proof of one specific cause without an additional precondition or distinguishing check. Route known transient COM failures through the established retry path; do not add broad catches inside Core commands instead of batch.Execute propagation.
  • Verify operation counters, flags, locks, and session state are restored on every exit path. A caught timeout or connection failure must not become an empty successful result, and one action failure must not terminate the whole MCP session or strand Excel.

Contract and Path Completeness

  • When an action or parameter is added, renamed, retyped, or given a new default, trace it through the Core interface, CLI argument routing, batch JSON dispatch, generated service dispatch, MCP schema, and both entry points. Names, types, aliases, defaults, validation, and timeout behavior must agree; unknown values must fail explicitly rather than silently select a default.
  • When a change adds a dependency, response field, wait, lock, or synchronization path, verify the matching existence guard, integrity check, return-value check, timeout handling, and round-trip assertion were extended with it.
  • When a pull request fixes a value, state, cache, or measurement bug, inspect fallback, retry, degenerate, cached-state, and parallel branches for the same defect. A primary-path fix is incomplete if another branch still uses the old value or behavior.
  • If one generated, templated, or intentionally parallel artifact changes, verify its source of truth and counterparts change consistently. Flag hand-maintained duplicate logic and validation that compares generated output against the same stale fallback used to produce it.

Read the full file on GitHub · 66 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. 2d ago First seen · 66 lines · 784 tokens per session scan A 106284ecbc5b

Subscribe to this mod's changes

mcp-server-excel code-review.instructions.md is an instructions file published in the GitHub repository sbroenne/mcp-server-excel (645 stars, last pushed 3d ago), licensed MIT. It adds 784 tokens to every session, about $0.0039 per session on Opus 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

Other instructions, from other repositories

open-sheet AGENTS.md

Instructions for lianghsun/open-sheet, covering open-sheet — repository guide, repo layout, commands, the one invariant and core pipeline.

lianghsun/open-sheet · 1,070 tokens

mcp-server-powerpoint copilot-instructions.md

Instructions for sbroenne/mcp-server-powerpoint, covering project instructions — powerpointmcp, critical files (read these first), sister projects, what is powerpointmcp? and session model (mcp server).

sbroenne/mcp-server-powerpoint · 3,630 tokens

mcp-server-powerpoint architecture-patterns.instructions.md

Instructions for sbroenne/mcp-server-powerpoint, covering architecture patterns, .net class design (mandatory), layered architecture (critical), command pattern and structure (per domain).

sbroenne/mcp-server-powerpoint · 1,597 tokens

mcp-server-powerpoint critical-rules.instructions.md

Instructions for sbroenne/mcp-server-powerpoint, covering critical rules - must follow, rule 1: success/errormessage invariant, rule 1b: no exception suppression in core, rule 30: real-com integration tests only, strict tdd and rule: 1-based indexing everywhere.

sbroenne/mcp-server-powerpoint · 1,486 tokens

mcp-server-powerpoint mcp-server-guide.instructions.md

Instructions for sbroenne/mcp-server-powerpoint, covering mcp server development guide, llm-facing content rules, two kinds of tools: hand-written vs. generated, implementation pattern: single hand-written dispatch tool and error handling (mandatory).

sbroenne/mcp-server-powerpoint · 1,737 tokens

mcp-server-powerpoint testing-strategy.instructions.md

Instructions for sbroenne/mcp-server-powerpoint, covering testing strategy, strict tdd (red → green), test project layout, serialization is mandatory and trait tagging (required for surgical filtering).

sbroenne/mcp-server-powerpoint · 1,409 tokens