api-gateway CLAUDE.md

A project instruction file for Membrane API Gateway, a Java gateway for REST, GraphQL, and older SOAP/WSDL services.

In plain words
What is it for?
Use it as working guidance when changing the gateway, its YAML or XML configuration, or related code and documentation.
Why use it?
It tells coding agents to think through assumptions, prefer simple solutions, and limit changes to what the task requires.

Instructions file

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/membrane/api-gateway/claude-md
Clone the repo
git clone --depth 1 https://github.com/membrane/api-gateway
Per session 2,566 This file is loaded in full into every session.
When invoked 2,566 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.02566 $0.02566
Opus 5 $0.01283 $0.01283
Sonnet 5 $0.00513 $0.00513
Haiku 4.5 $0.00257 $0.00257

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

Security

Grade A, and why

api-gateway CLAUDE.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 yesterday.

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.md · 167 lines

How it starts

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

CLAUDE.md

Membrane API Gateway — a lightweight Java API gateway for REST, GraphQL, and legacy SOAP/WSDL services, configurable in YAML or XML. Upstream: https://github.com/membrane/api-gateway

Working principles

Behavioral guidelines to reduce common coding mistakes; they compose with the project-specific conventions below. Tradeoff: these bias toward caution over speed. For trivial tasks, use judgment.

1. Think before coding

Don't assume silently. Surface tradeoffs.

  • State assumptions explicitly rather than picking one silently.
  • If multiple reasonable interpretations exist, name them instead of just choosing.
  • Ask before proceeding only on judgment calls with real cost to being wrong (data model, auth, hard-to-undo changes). For everything else, state your assumption and proceed — don't stall on low-stakes ambiguity.
  • If a simpler approach exists, say so, even if it means pushing back.

2. Simplicity first

No speculative abstraction.

  • No features, flexibility, or config beyond what was asked.
  • No abstractions for single-use code.
  • If it could be a third of the length, rewrite it shorter.

3. Surgical changes

Touch only what you must.

  • Don't "improve," reformat, or refactor adjacent code, even if it's messy.
  • Match existing style even where you'd choose differently.
  • Remove imports/vars/functions your change made unused; leave pre-existing dead code alone (mention it, don't touch it).
  • Every changed line should trace to the request.

4. Verify before declaring done

  • For bug fixes: reproduce with a failing test first, then fix.
  • For new logic: add tests for the cases that matter (invalid input, edge cases), not exhaustive coverage.

5. Never push on your own

  • Never run git push (or open/merge a PR) without the user explicitly asking for it in that moment. Committing locally is fine; pushing is not the default next step.

Modules

Maven multi-module reactor (root pom.xml), Java 21 (javac.source/target):

Read the full file on GitHub · 167 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. yesterday First seen · 167 lines · 2,566 tokens per session scan A 2ea02d1231a8

Subscribe to this mod's changes

api-gateway CLAUDE.md is an instructions file published in the GitHub repository membrane/api-gateway (638 stars, last pushed yesterday), licensed Apache-2.0. It adds 2,566 tokens to every session, about $0.0128 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.