writing-extensions SKILL.md skillA

writing-extensions from gerritcodereview/gerrit-mcp-server is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add gerritcodereview/gerrit-mcp-server/writing-extensions@git:20260811.def7665

Pins git:20260811.def7665 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
gerritcodereview/gerrit-mcp-server
Path
.claude/skills/writing-extensions/SKILL.md
Versions recorded
2
Latest version
git:20260811.c6b13b1, committed Aug 11, 2026
First version recorded
Aug 11, 2026
Size
13,999 bytes
Repository stars
22
License
Apache-2.0

Guide for authoring a new in-process MCP tool extension for gerrit-mcp-server. Use when a user wants to add new Gerrit tools, port a standalone plugin MCP server into the extension framework, or needs a worked example of the ExtensionContext API.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# 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](#8_entry_point-declaration). 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.

```python
from gerrit_mcp_server.extensions import ExtensionContext
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add gerritcodereview/gerrit-mcp-server/writing-extensions@sha256:37492a246ea5961b

The line at the top of this page pins the label git:20260811.def7665, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_6w3pboxuizef4kl2.svg)](https://markdownregistry.com/a/art_6w3pboxuizef4kl2)

1 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 2 versions of this file, all committed on Aug 11, 2026.

versioncommittedcommitsizeaudit
git:20260811.c6b13b1 latest2026-08-11 c6b13b1 13,999 BA view · diff
git:20260811.def76652026-08-11 def7665 14,467 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (13999 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

gerritcodereview/gerrit-mcp-server · 22 stars · license Apache-2.0 · pushed 2026-11-07 · branch master

API

GET https://markdownregistry.com/api/v1/artifacts/art_6w3pboxuizef4kl2
GET https://markdownregistry.com/api/v1/resolve?ref=gerritcodereview/gerrit-mcp-server/writing-extensions
GET https://markdownregistry.com/api/v1/blob/37492a246ea5961bc5a64f505262eec673d09a2aec0d90fb5935c24b2d2fcede

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from gerritcodereview/gerrit-mcp-server

AGENTS.md AGENTS.md file
gerritcodereview/gerrit-mcp-server · AGENTS.md
git:20261030.df75118 · audit A · 22 stars
find-dependencies SKILL.md skill
gerritcodereview/gerrit-mcp-server · skills/find-dependencies/SKILL.md · Find all dependencies of a Gerrit change or set of changes — both explicit Depends-on annotations (parsed by the…
git:20260811.0f96c19 · audit A · 22 stars
gerrit-task-query SKILL.md skill
gerritcodereview/gerrit-mcp-server · skills/gerrit-task-query/SKILL.md · Use when asked to check, list, or act on tasks for a Gerrit change. Triggers on phrases like "what tasks are blocking"…
git:20260811.0f96c19 · audit A · 22 stars
gerrit-workflow SKILL.md skill
gerritcodereview/gerrit-mcp-server · skills/gerrit-workflow/SKILL.md · This skill should be used when the user asks to "submit a change to Gerrit", "push for review", "upload a patch"…
git:20260810.c35875b · audit A · 22 stars
setup SKILL.md skill
gerritcodereview/gerrit-mcp-server · skills/setup/SKILL.md · Interactive setup for gerrit_mcp_server configuration. Creates or updates gerrit_config.json with Gerrit host URLs and…
git:20261030.df75118 · audit A · 22 stars

Every file in gerritcodereview/gerrit-mcp-server

Browse by kind, by grade A, or by owner.