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 skills add GerritCodeReview/gerrit-mcp-server --skill writing-extensionsgit 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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.5 | $0.00023 | $0.01395 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (21 stars, last pushed 2d ago), licensed Apache-2.0. It adds 57 tokens to every session and 3,488 once invoked, about $0.0002 per session on Opus 5.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
signals-scout-skills-store
Skill-hygiene scout for the team's PostHog skills store. Watches recently-changed and most- used skills for authoring violations — vague descriptions, bloated bodies, dead file links, kitchen-sink scope, committed secrets.
review-hog-authoring
How to author custom PostHog Review skills: the review perspectives, blind-spot checks, validation criteria, and resolution criteria that drive PostHog Review's automated PR reviews. Use when a user wants a new review perspective (a specialist lens on their PRs), a custom blind-spot sweep, their own validation bar for…
review-hog-resolution-criteria-gaps
Fixes should-fix and must-fix bugs and missing functionality. Leaves wording, documentation, and style suggestions to the author.
review-hog-resolution-criteria-small
Fixes small bugs, typos, wording, and outdated documentation. Leaves changes that need a design decision to the author.
review-hog-resolution-criteria
Implements safe, verifiable fixes from review comments. Explains declined requests and asks a human to handle risky changes.
review-hog-perspective-contracts-security
Checks security, input validation, and API compatibility. Reports security and contract issues only.