api-gateway: Skill for Claude Code

.claude/skills/config-error-handling/SKILL.md

config-error-handling is a skill for Claude Code from membrane/api-gateway. It costs 89 tokens per session (937 once invoked), scanned A, original, Apache-2.0.

A guide for adding validation and useful error messages to Membrane configuration elements. It explains how configuration errors arise while reading YAML, a text format often used for application settings, and how they are shown to users.

In plain words
What is it for?
Use it when changing @MCElement configuration classes, handling ConfigurationException errors, or improving highlighted YAML error messages in RouterCLI.
Why use it?
It helps developers place checks in the right phase and preserve the source location and real cause of invalid configuration.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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/config-error-handling/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 config-error-handling

README.md
[![agentmods](https://agentmods.dev/badge/skills/membrane/api-gateway/config-error-handling.svg)](https://agentmods.dev/skills/membrane/api-gateway/config-error-handling)
Your own site
<a href="https://agentmods.dev/skills/membrane/api-gateway/config-error-handling"><img src="https://agentmods.dev/badge/skills/membrane/api-gateway/config-error-handling.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 937 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.
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.00089 $0.00937
Opus 5 $0.00044 $0.00468
Sonnet 5 $0.00018 $0.00187
Haiku 4.5 $0.00009 $0.00094

Measured 2d ago against content hash f813343e595a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

config-error-handling 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 2d 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/config-error-handling/SKILL.md · 62 lines

How it starts

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

Config Error Handling

Two failure phases, two reporting paths

Membrane config errors surface differently depending on when they're thrown, and that's the first thing to get right.

Setter-time — inside an @MCAttribute/@MCChildElement setter, during YAML property binding (annot/.../yaml/parsing/binding/PropertyBinder.java, populate()). That catch (Throwable cause) re-wraps into new ConfigurationParsingException(cause.getMessage()) and attaches a ParsingContext (source location), so RouterCLI renders a highlighted > YAML snippet pointing at the offending line. Mind the message: reflection wraps a setter's own exception in InvocationTargetException, and PropertyBinder does not unwrap it, so the message it copies is the wrapper's (null) — the real text sits in cause.getCause().getMessage(). The @MCElement(collapsed=true) scalar path in ObjectBinder does unwrap (e.getTargetException()). Example: WsuTimestampInterceptor.setTtl (core/.../soap/wsse/WsuTimestampInterceptor.java) catches DateTimeParseException from Duration.parse and rethrows a ConfigurationException with a concrete valid-example ("PT5M").

Init-time — inside interceptor.init(Router), reached via DefaultRouter.init()AbstractRouter.initProxies()proxy.init(this), i.e. after all YAML parsing has finished. The YAML bootstrap does carry a ParsingContext into the bean registry, but nothing on this initProxies() path passes it on, so an interceptor's init() has no source location to report — not fixable per-interceptor without a cross-cutting change to plumb it through Router/interceptor init. ConfigurationException thrown here is caught by SpringConfigurationErrorHandler.handleConfigurationException (core/.../exceptions/SpringConfigurationErrorHandler.java:128), which prints a plain "************** Configuration Error ***..." / "Reason: <cause message>" block — no YAML snippet. This is the existing, accepted behavior for every interceptor's init()-time checks (missing keystore, bad key alias, unsupported algorithm, ...), not a bug to chase per class.

Read the full file on GitHub · 62 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. 2d ago First seen · 62 lines · 89 tokens per session scan A f813343e595a

Subscribe to this mod's changes

config-error-handling is a skill published in the GitHub repository membrane/api-gateway (641 stars, last pushed today), licensed Apache-2.0. It adds 89 tokens to every session and 937 once invoked, about $0.0004 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-09-05.

Related

Other skills, from other repositories

api-design-patterns

Design robust APIs with RESTful patterns, GraphQL schemas, versioning strategies, and error handling conventions. Supports OpenAPI/Swagger documentation and SDK generation patterns. Triggers on API design, schema definition, endpoint architecture, or developer experience requests.

organvm-iv-taxis/a-i--skills · 54 tokens

construtor-de-api

Construção e documentação de APIs REST e GraphQL: design de endpoints, versionamento, autenticação, tratamento de erros, documentação OpenAPI 3.0 e boas práticas de segurança e performance.

ricneves-ai/flowgrammers-skills · 46 tokens

api-designer

Designs production-grade APIs — REST, GraphQL, gRPC, and AsyncAPI patterns including pagination, versioning, error handling, rate limiting, and API governance. Use when the user asks to design APIs, create endpoints, build an API layer, write OpenAPI specs, or needs help with REST/GraphQL/gRPC service design.

buiphucminhtam/forgewright · 73 tokens

api-design

Design and implement RESTful APIs with proper routing, validation, error handling, and documentation. Use when building new API endpoints, designing API architecture, or improving existing APIs.

asgarovf/locusai · 37 tokens

api-design-first

Design-first API development skill. Generates OpenAPI 3.1 specifications, enforces REST design best practices, validates endpoints, handles versioning, pagination, error formatting, authentication patterns, rate limiting, and idempotency. Activates when users say "design an API", "create OpenAPI spec", "API endpoint"…

JPeetz/agent-skills · 117 tokens

lap

LAP CLI -- compile, search, and manage API specs for AI agents. Use when working with API specifications (OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman), compiling specs to LAP format, searching the LAP registry, generating skills from API specs, or publishing APIs. Commands: init, compile, search, get, skill…

Lap-Platform/LAP · 89 tokens