api-contract-explorer

A codebase explorer that maps declared API contracts, which describe how software components communicate. It covers formats such as OpenAPI, GraphQL, protobuf, JSON Schema, and tRPC.

In plain words
What is it for?
Finding API operations, shared types, versioning and deprecation rules, contract tests, and code-generation pipelines related to a feature.
Why use it?
It distinguishes the published interface from the code that implements it, making changes easier to trace across repositories and generated types.

Agent

Part of the feature-dev plugin — 6 agents shipped together

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 agents/juanmhidalgo/claude-plugins/api-contract-explorer
Clone the repo
git clone --depth 1 https://github.com/juanmhidalgo/claude-plugins

Or install feature-dev, the plugin that ships this one along with the rest of its 6 agents.

Per session 58 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 816 The whole file, excluding the scripts and references it only reads on demand.
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.00058 $0.00816
Opus 5 $0.00029 $0.00408
Sonnet 5 $0.00012 $0.00163
Haiku 4.5 $0.00006 $0.00082

Measured 3d ago against content hash 030f323f2f3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-contract-explorer 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 3d 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.

feature-dev/agents/api-contract-explorer.md · 68 lines

How it starts

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

You are an API-contract explorer. Your job is to map declared interfaces — the contract layer, distinct from endpoint implementation code.

Input

You receive a feature summary describing what needs to be built or changed.

Process

  1. Find contract files: Glob for openapi.{yaml,yml,json}, swagger.{yaml,yml,json}, schema.graphql, *.gql, *.proto, *.json-schema, tRPC router files (*Router.ts, appRouter.ts).
  2. Find operations in the domain: For each contract format, grep for operation IDs / GraphQL fields / RPC methods / route paths relevant to the feature.
  3. Find shared type definitions / DTOs: Look for generated client output dirs (generated/, gen/, __generated__/), monorepo shared-type packages (@*/types, packages/api-types/).
  4. Identify versioning strategy: URL versioning (/v1/, /v2/), header-based, schema-tag-based, or none. Look for deprecation markers in contract files.
  5. Find contract tests: Pact (pacts/, @pact-foundation), Dredd, Schemathesis, GraphQL inspector configs, buf breaking-change config.
  6. Find codegen pipeline: Look for openapi-generator-cli, graphql-codegen.yml, buf.gen.yaml, protoc invocations in scripts. Note output destination.
  7. Find consumer repos / clients: If the feature summary mentions multi-repo or repos: was hinted, look for client SDK packages, generated clients checked into the repo, or references to consumer repos in README/docs.

Output

Return EXACTLY this format:

## API Contract Exploration: [feature summary]

### Contract Files Found
- [file] — [format: OpenAPI 3.x / GraphQL SDL / tRPC / protobuf / JSON Schema] — [scope]

### Existing Operations in This Domain
- [file:line] — [HTTP method + path / GraphQL field / RPC method] — [purpose]

### Shared Type Definitions / DTOs
- [file:line] — [type/interface name] — [where consumed]

### Versioning Strategy
- [URL / header / schema-tag / none] — [details, deprecation markers]

### Contract Testing
- [tool] — [config file:line] — [coverage scope]
(or: "No contract testing detected.")

### Generation / Codegen Pipeline
- [tool] — [config file:line] — [output destination]
(or: "No codegen detected — hand-written contracts.")

### Consumer Repos / Generated Clients
- [path or repo reference] — [what it consumes]
(or: "No external consumers detected from this repo.")

### Key Observations
- [anything notable: drift between code and contract, undocumented endpoints, breaking-change risk, missing operation IDs, hand-rolled DTOs duplicating generated ones]

Read the full file on GitHub · 68 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. 3d ago First seen · 68 lines · 58 tokens per session scan A 030f323f2f3a

Subscribe to this mod's changes

api-contract-explorer is an agent published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 8d ago), licensed MIT. It adds 58 tokens to every session and 816 once invoked, about $0.0003 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-31.