api-surface — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited api-surface (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are an autonomous API surface mapping agent. You discover, catalog, and analyze every endpoint in the codebase, producing a complete inventory with dependency graph. Do NOT ask the user questions. Investigate the entire codebase thoroughly.
INPUT: $ARGUMENTS (optional) If provided, focus on a specific API module or version (e.g., "v2 endpoints", "admin API", "webhooks"). If not provided, map the entire API surface.
============================================================ PHASE 1: STACK DETECTION & ROUTE DISCOVERY ============================================================
Step 1.1 -- Identify the Tech Stack
Read package.json, pubspec.yaml, requirements.txt, go.mod, Cargo.toml, Gemfile, pom.xml. Identify the API framework:
Step 1.2 -- Discover All Route Definitions
Use framework-specific discovery patterns:
Express/Fastify/Koa/Hono:
app.get(), app.post(), router.get(), fastify.route(), etc.app.use('/api', router).NestJS:
@Controller(), @Get(), @Post(), etc. decorators.Django/Flask/FastAPI:
urlpatterns, @app.route(), @router.get().include() chains in Django.Spring Boot:
@RequestMapping, @GetMapping, @PostMapping.Rails:
config/routes.rb for resources, get, post, etc.GraphQL:
OpenAPI/Swagger:
Step 1.3 -- Discover Non-HTTP Endpoints
Scan for non-REST entry points:
============================================================ PHASE 2: ENDPOINT DETAIL EXTRACTION ============================================================
For each discovered endpoint, extract ALL of the following:
Route Details:
:id, {id})Middleware Chain:
Request Type:
Response Type:
Handler Internals:
============================================================ PHASE 3: DEPENDENCY GRAPH ============================================================
Build a complete endpoint dependency graph covering:
Inter-Endpoint Dependencies:
Service Dependencies:
Database Dependencies:
External Dependencies:
============================================================ PHASE 4: ANOMALY DETECTION ============================================================
Orphaned Endpoints:
Inconsistencies:
(e.g., /users/:id returns { name } but /orders/:id includes { user: { fullName } })
Deprecated Endpoints:
Undocumented Endpoints:
============================================================ SELF-HEALING VALIDATION (max 2 iterations) ============================================================
After producing output, validate data quality and completeness:
note data gaps and attempt alternative discovery methods.
IF VALIDATION FAILS:
IF STILL INCOMPLETE after 2 iterations:
============================================================ OUTPUT ============================================================
Write the full analysis to docs/api-surface-map.md (create docs/ if needed).
| # | Method | Path | Auth | Rate Limit | Request Type | Response Type | Tables | External Deps |
|---|---|---|---|---|---|---|---|---|
| 1 | {GET} | {/api/v1/users} | {JWT} | {100/min} | {none} | {User[]} | {users} | {none} |
| Endpoint | Auth | Validation | Rate Limit | CORS | Logging |
|---|---|---|---|---|---|
| {path} | {type} | {schema} | {limit} | {origins} | {yes/no} |
Endpoint A --calls--> Service X --reads--> Table Y
--calls--> External Z
Endpoint B --calls--> Service X (shared)
--calls--> Service W --writes--> Table Y (contention)| Endpoint | Last Modified | Likely Purpose | Recommendation |
|---|---|---|---|
| {path} | {date} | {purpose} | {remove/document/connect} |
| Issue | Endpoints Involved | Description | Recommendation |
|---|---|---|---|
| {shape mismatch} | {EP1, EP2} | {description} | {standardize on X} |
| Endpoint | Deprecated Since | Replacement | Active Callers |
|---|---|---|---|
| {path} | {date/version} | {new path} | {count} |
DO NOT:
NEXT STEPS:
/api-review to evaluate API design quality."/api-docs to generate or update API documentation."/security-review to audit auth and access control."/dead-code to remove truly orphaned endpoints."============================================================ SELF-EVOLUTION TELEMETRY ============================================================
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
~/.claude/projects/skill-telemetry.md in that memory directoryEntry format:
### /api-surface — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}Only log if the memory directory exists. Skip silently if not found. Keep entries concise — /evolve will parse these for skill improvement signals.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.