api-gateway: Skill for Claude Code

.claude/skills/optimize-interceptor-docs/SKILL.md

optimize-interceptor-docs is a skill for Claude Code from membrane/api-gateway. It costs 173 tokens per session (2,244 once invoked), scanned A, original, Apache-2.0.

A writing guide for improving the Java source documentation that generates Membrane API reference pages. Membrane is an API gateway, and its reference pages are built from code annotations and Javadoc.

In plain words
What is it for?
Use it when documenting an interceptor or plugin, including its YAML attributes, child elements, behaviour, syntax summary, and runnable example.
Why use it?
It helps documentation match the actual configuration options and behaviour instead of relying on vague or incorrect prose.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

This is membrane/api-gateway's own configuration. It tells Claude Code how to work on api-gateway itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything api-gateway configures →

Reuse

Borrowing it

Nothing to install: this file belongs to membrane/api-gateway. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/membrane/api-gateway/master/.claude/skills/optimize-interceptor-docs/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/membrane/api-gateway

Made for: Claude Code.

Wrote 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.

agentmods badge for optimize-interceptor-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/membrane/api-gateway/optimize-interceptor-docs/github.svg)](https://agentmods.dev/skills/membrane/api-gateway/optimize-interceptor-docs)
Your own site
<a href="https://agentmods.dev/skills/membrane/api-gateway/optimize-interceptor-docs"><img src="https://agentmods.dev/badge/skills/membrane/api-gateway/optimize-interceptor-docs/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.

agentmods 80×15 button for optimize-interceptor-docs

Your own site · 80×15
<a href="https://agentmods.dev/skills/membrane/api-gateway/optimize-interceptor-docs"><img src="https://agentmods.dev/badge/skills/membrane/api-gateway/optimize-interceptor-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 173 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,244 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00173 $0.02244
Opus 5.5 $0.00069 $0.00898
Sonnet 5.5 $0.00035 $0.00449
Haiku 4.5 $0.00017 $0.00224

Measured 1mo ago against content hash 26f97af04119, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

optimize-interceptor-docs 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.

.claude/skills/optimize-interceptor-docs/SKILL.md · 95 lines

How it starts

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

Optimize Interceptor Documentation

Membrane's reference pages (https://www.membrane-api.io/docs/) are generated from the Java source, not hand-written. The element name, attribute table, child cardinalities and "required" flags are derived from the @MCElement / @MCAttribute / @MCChildElement annotations and the JSON schema. The prose and the example come from Javadoc tags. So "writing docs" here means rewriting Javadoc — and getting it right depends on knowing exactly what the renderer consumes and what it rejects.

Goal: a page that reads like a precise reference entry — a one-glance summary, exact behaviour, one runnable YAML example, and a compact syntax sketch. Short but complete. No XML examples.

Workflow

  1. Read the class and pull facts from code — never invent. Identify:
    • @MCElement(name=...) → the element name used in YAML.
    • every @MCAttribute setter → an attribute (default from the field initializer or @default; type from the setter param; enum values from the enum type).
    • every @MCChildElement setter → a child element / list (cardinality from List<…> vs single, order from order=).
    • handleRequest / init → real behaviour worth documenting: status codes, side effects (what it adds to the Exchange), what happens on the failure path, defaults applied when config is omitted.
    • which flows it actually acts in — check getAppliedFlow() and which of handleRequest/handleResponse/handleAbort are really overridden (and any flow.isRequest() guards inside them). An element can be wired for a flow but no-op there; document what runs, not what's declared. Only mention flow in the prose when it's special — i.e. the element acts in only the request flow or only the response flow. Acting in both request and response is the normal case; don't state it.
    • Don't trust the existing Javadoc — it's often copy-pasted from a sibling element and wrong. Verify every @default against the field initializer and every @description against the code (e.g. <for> shipped @default groovy for a field initialized to SpEL, and an in description that talked about a "test condition" lifted from <if>). Fix what the code contradicts.
  2. Rewrite the class-level Javadoc: @topic, @description, @yaml. Keep the existing @topic unless it's clearly wrong.
    • @topic belongs on top-level elements — those that can appear directly in a flow: or at the api: level. Elements that are only ever used inside another interceptor or api as a child/sub-config (e.g. an extractor, a key store entry, a sub-element with component = false) do not get @topic.
  3. Rewrite each attribute and child setter's Javadoc: @description, plus @default / @example for attributes.
  4. Replace every XML sample with YAML, and add a [] | syntax sketch where the shape is non-trivial.
  5. Validate — every tag value is parsed as XML by the build (see below). Confirm well-formedness; optionally compile to let the annotation processor check it.

Read the full file on GitHub · 95 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago Changed 26f97af04119
  2. 2mo ago First seen · 95 lines · 173 tokens per session scan A 7cb7284fc626

Subscribe to this mod's changes

optimize-interceptor-docs is a skill published in the GitHub repository membrane/api-gateway (656 stars, last pushed yesterday), licensed Apache-2.0. It adds 173 tokens to every session and 2,244 once invoked, about $0.0007 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.

Related

Other skills, from other repositories