Borrowing it
Nothing to install: this file belongs to GerritCodeReview/gerrit-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/GerritCodeReview/gerrit-mcp-server/master/.claude/skills/writing-extensions/SKILL.mdgit clone --depth 1 https://github.com/GerritCodeReview/gerrit-mcp-serverWrote 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/gerritcodereview/gerrit-mcp-server/writing-extensions)<a href="https://agentmods.dev/skills/gerritcodereview/gerrit-mcp-server/writing-extensions"><img src="https://agentmods.dev/badge/skills/gerritcodereview/gerrit-mcp-server/writing-extensions.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.1 | $0.00057 | $0.03488 |
| Opus 5 | $0.00028 | $0.01744 |
| Sonnet 5 | $0.00011 | $0.00698 |
| Haiku 4.5 | $0.00006 | $0.00349 |
Grade A, and why
writing-extensions 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 370 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing a gerrit-mcp-server Extension
Extensions register new MCP tools inside the running gerrit-mcp-server process
via the gerrit_mcp_server.extensions entry-point group. They share the
server's auth, config, and HTTP machinery through the stable ExtensionContext
API.
1. Package layout
Each extension is a standalone Python package:
myext/
├── __init__.py # empty
├── extension.py # defines register(ctx)
└── pyproject.toml # declares the entry point
This is a flat layout (package files alongside pyproject.toml rather than in a
src/myext/ subdirectory). It requires an explicit package-dir in
pyproject.toml — see section 8. Without it,
setuptools looks for a ./myext/ subdirectory and the build fails with
package directory 'myext' does not exist.
If the extension is a workspace member of a uv workspace, it lives at the repo root alongside other workspace members.
2. The register(ctx) contract
extension.py must export a top-level
register(ctx: ExtensionContext) -> None. The server calls it once at startup.
from gerrit_mcp_server.extensions import ExtensionContext
def register(ctx: ExtensionContext) -> None:
"""Register all tools for this extension."""
@ctx.mcp.tool()
async def my_tool(change_id: str, gerrit_base_url: str = None) -> str:
"""One-line description shown in the MCP tool list."""
base_url = ctx.get_base_url(gerrit_base_url)
result = await ctx.run_curl([f"{base_url}/changes/{change_id}"], base_url)
return result
All tools must be async def. ctx.mcp.tool() is a FastMCP decorator —
register as many tools as needed.
3. Structured return types
All tools should declare a TypedDict return type rather than manually building
[{"type": "text", "text": ...}] content blocks. The MCP SDK auto-generates a
JSON output_schema from the annotation and produces both structured content
(for clients that support it) and a text fallback (for those that don't).
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.
- 7d ago First seen · 370 lines · 57 tokens per session scan A 37492a246ea5
writing-extensions is a skill published in the GitHub repository GerritCodeReview/gerrit-mcp-server (20 stars, last pushed 3d ago), licensed Apache-2.0. It adds 57 tokens to every session and 3,488 once invoked, about $0.0003 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.
Other skills, from other repositories
autoreview
Pre-commit/ship code review: Codex default; optional Claude or Pi.
rework-rate
Measure and interpret PR rework rate — the emerging 5th DORA metric.
omh-code-review
This is a Hermes-native code-review workflow skill.
revdiff-plan
Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…
code-reviewer
Code review specialist focused on patterns, bugs, security, and performance.
full-repo-review
Comprehensive four-wave review of all repo source files, producing a prioritized issue backlog.