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.
npx skills add tamnguyendinh/Anvien --skill api-surfacegit clone --depth 1 https://github.com/tamnguyendinh/AnvienWrote 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.
[](https://agentmods.dev/skills/tamnguyendinh/anvien/api-surface)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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
- Refresh the graph with
anvien analyze --forcebefore graph-based API work. - Use
query apifor broad route/tool discovery only when the exact route or tool is unknown. - Use route-map/tool-map to find handlers, consumers, flows, and handler-file
handlerFileprojection data. - Open handler files with
context filewhen you need symbol tree, file dependencies, linked tests, or unresolved handler-file sites. - Use shape-check before changing response contracts or generated Web contracts.
- Use API impact before editing handlers, schemas, contracts, or shared API helpers. Use
impact routeorimpact toolwhen the route/tool is the change target and you need the generic impact report shape. - Validate with focused backend tests and Web contract/client tests when consumers are affected.
- Run
detect-changes --scope allbefore commit.
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.
- 2mo ago First seen · 49 lines · 16 tokens per session scan A a59c8a6f7afb
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.
api-surface compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| api-surfacetamnguyendinh/Anvien | Skill | 12 | 4d ago | MIT | A | 16 | Claude Code, Codex |
| source-command-sparc-mcpayushcodes10/echo-mem | Skill | 2 | 1mo ago | Apache-2.0 | A | 31 | Claude Code, Codex |
| source-command-sparc-integrationayushcodes10/echo-mem | Skill | 2 | 1mo ago | Apache-2.0 | A | 35 | Claude Code, Codex |
| source-command-swarm-developmentayushcodes10/echo-mem | Skill | 2 | 1mo ago | Apache-2.0 | A | 15 | Claude Code, Codex |
| source-command-sparc-architectayushcodes10/echo-mem | Skill | 2 | 1mo ago | Apache-2.0 | A | 18 | Claude Code, Codex |
| booboo-deployjessymariau/booboo | Skill | 1 | 2mo ago | MIT | A | 94 | Claude Code, Codex |
| booboo-adapterjessymariau/booboo | Skill | 1 | 2mo ago | MIT | A | 71 | Claude Code, Codex |