api-surface

api-surface is a skill for Claude Code, Codex from tamnguyendinh/Anvien. It costs 16 tokens per session (759 once invoked), scanned A, original, MIT.

A workflow guide for examining the exposed surface of APIs and MCP tools. An API is an interface that software uses to communicate; MCP tools are agent-accessible operations.

In plain words
What is it for?
Use it to inspect route handlers, MCP tool definitions, consumers, response-shape drift, and the likely impact of changing an API or tool.
Why use it?
It helps reveal which handlers, consumers, response shapes, and related flows are affected by an API or tool change. It also provides commands for mapping routes, checking response mismatches, and assessing impact.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect route handlers, MCP tool definitions, consumers, response-shape drift, and the likely impact of changing an API or tool.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tamnguyendinh/anvien/api-surface
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.

Any agent
npx skills add tamnguyendinh/Anvien --skill api-surface
Clone the repo
git clone --depth 1 https://github.com/tamnguyendinh/Anvien

Made for: Claude Code, Codex.

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 api-surface

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tamnguyendinh/anvien/api-surface"><img src="https://agentmods.dev/badge/skills/tamnguyendinh/anvien/api-surface.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 759 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.00016 $0.00759
Opus 5.5 $0.00006 $0.00304
Sonnet 5.5 $0.00003 $0.00152
Haiku 4.5 $0.00002 $0.00076

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

Security

Grade A, and why

api-surface 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 2mo 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.

internal/aicontext/skills/api-surface/SKILL.md · 49 lines

How it starts

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

API Surface With Anvien

Use this skill for route handlers, MCP/RPC tool handlers, generated contracts, response shape drift, route consumers, and API-impact decisions.

This skill is a workflow gate for API-surface work. It is not a command router. When a concrete Anvien command is needed, choose it directly from the generated Command Selection Guide.

Command Choices

Need CLI MCP
Route handlers, consumers, middleware, flows anvien api route-map [route] --repo <repo> --json route_map
MCP/tool definitions and linked flows anvien api tool-map [tool] --repo <repo> --json tool_map
Response shape drift against consumers anvien api shape-check [route] --repo <repo> --json shape_check
Route/API blast radius anvien api impact [route] --repo <repo> --json api_impact
Route impact via generic impact anvien impact route <route> --repo <repo> --json impact with target_type=route
MCP tool impact via generic impact anvien impact tool <tool> --repo <repo> --json impact with target_type=tool
Exact handler file context anvien context file <path> --repo <repo> context with target_type=file
Exact handler symbol context anvien context symbol "<handler>" --repo <repo> context with target_type=symbol
Broad API discovery anvien query api "<concept>" --repo <repo> query with target_type=api

MCP tool names use underscores: route_map, tool_map, shape_check, api_impact. CLI commands use hyphenated subcommands under anvien api. Do not invent CLI commands by reusing MCP underscore names as top-level Anvien commands.

Workflow

  1. Refresh the graph with anvien analyze --force before graph-based API work.
  2. Use query api for broad route/tool discovery only when the exact route or tool is unknown.
  3. Use route-map/tool-map to find handlers, consumers, flows, and handler-file handlerFile projection data.
  4. Open handler files with context file when you need symbol tree, file dependencies, linked tests, or unresolved handler-file sites.
  5. Use shape-check before changing response contracts or generated Web contracts.
  6. Use API impact before editing handlers, schemas, contracts, or shared API helpers. Use impact route or impact tool when the route/tool is the change target and you need the generic impact report shape.
  7. Validate with focused backend tests and Web contract/client tests when consumers are affected.
  8. Run detect-changes --scope all before commit.

Read the full file on GitHub · 49 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. 2mo ago First seen · 49 lines · 16 tokens per session scan A a59c8a6f7afb

Subscribe to this mod's changes

api-surface is a skill published in the GitHub repository tamnguyendinh/Anvien (12 stars, last pushed 4d ago), licensed MIT. It adds 16 tokens to every session and 759 once invoked, about $0.0001 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-31.

Related

api-surface compared with skills from other repositories

api-surface next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
api-surfacetamnguyendinh/AnvienSkill124d agoMITA16Claude Code, Codex
source-command-sparc-mcpayushcodes10/echo-memSkill21mo agoApache-2.0A31Claude Code, Codex
source-command-sparc-integrationayushcodes10/echo-memSkill21mo agoApache-2.0A35Claude Code, Codex
source-command-swarm-developmentayushcodes10/echo-memSkill21mo agoApache-2.0A15Claude Code, Codex
source-command-sparc-architectayushcodes10/echo-memSkill21mo agoApache-2.0A18Claude Code, Codex
booboo-deployjessymariau/boobooSkill12mo agoMITA94Claude Code, Codex
booboo-adapterjessymariau/boobooSkill12mo agoMITA71Claude Code, Codex