api-docs — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited api-docs (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 in AUTONOMOUS MODE. Do NOT ask questions. Analyze the project's API layer and produce complete OpenAPI documentation.
INPUT: $ARGUMENTS
If no arguments provided, auto-detect the API framework and document all endpoints. If a specific path, module, or endpoint group is provided, scope documentation to that area.
============================================================ PHASE 1: FRAMEWORK DETECTION ============================================================
Detect the API framework by scanning for config files and import patterns:
| Framework | Detection Signals |
|---|---|
| Express | require('express'), import express, app.get(, router.post( |
| Fastify | require('fastify'), import Fastify, fastify.route(, fastify.get( |
| NestJS | @Controller(, @Get(, @Post(, nest-cli.json |
| Hono | import { Hono }, new Hono(), app.get( with Hono types |
| Django REST | urls.py, views.py, serializers.py, rest_framework imports |
| FastAPI | from fastapi, @app.get(, @router.post(, APIRouter |
| Flask | from flask, @app.route(, Blueprint |
| Go net/http | http.HandleFunc(, http.ListenAndServe(, mux.Handle( |
| Gin | gin.Default(), r.GET(, r.POST( |
| Rails | routes.rb, config/routes, resources : |
| Spring | @RestController, @RequestMapping, @GetMapping |
| ASP.NET | [ApiController], [HttpGet], MapGet(, app.MapControllers() |
Record the detected framework as API_FRAMEWORK for subsequent phases.
If no API framework is detected, check for:
Report the finding and adapt accordingly.
============================================================ PHASE 2: ROUTE EXTRACTION ============================================================
Systematically extract all API routes:
Step 2.1 -- Find Route Files
Based on API_FRAMEWORK, locate route definitions:
router., app.get/post/put/delete/patch@Controller decorated classesurls.py files and viewsets@app. and @router. decoratorsHandleFunc, Handle, mux. callsconfig/routes.rb@RequestMapping, @GetMapping, etc.Step 2.2 -- Extract Route Details
For each route, extract:
:id or {id})Step 2.3 -- Extract Authentication Requirements
Identify auth patterns:
Step 2.4 -- Extract Validation Schemas
Look for request validation:
============================================================ PHASE 3: OPENAPI SPEC GENERATION ============================================================
Generate an OpenAPI 3.1.0 specification:
Generate a valid OpenAPI 3.1.0 YAML spec with: info (title, description, version from package config), servers (localhost with detected port), paths (from extracted routes), components/schemas (from extracted types), and securitySchemes.
For each path item include: operationId, summary, description, tags (grouped by controller/router or URL prefix), parameters, requestBody, responses with status codes, and security requirements.
For schemas: convert TypeScript interfaces, Pydantic models, Zod schemas, or Django serializers to JSON Schema. Mark required vs optional fields. Include examples from test fixtures or seed data where available. Generate both success and error examples.
============================================================ PHASE 4: INTERACTIVE DOCS SETUP ============================================================
Set up interactive API documentation:
Step 4.1 -- Choose Tool
Based on the framework and existing dependencies:
| Condition | Tool | Setup |
|---|---|---|
| Fastify project | @fastify/swagger + @scalar/fastify-api-reference | Plugin registration |
| Express project | swagger-ui-express | Middleware mount |
| NestJS project | @nestjs/swagger | Module configuration |
| FastAPI project | Built-in (Swagger UI at /docs) | Already available |
| Django REST | drf-spectacular or drf-yasg | Settings configuration |
| Any project | Redoc standalone | Static HTML page |
| Any project | Scalar | CDN-based HTML page |
Step 4.2 -- Integration
If the project supports it, add interactive docs as a development dependency:
If the project does not support middleware-based docs, generate a standalone HTML file using Scalar or Redoc CDN that references the spec file.
============================================================ PHASE 5: VALIDATION ============================================================
Validate the generated spec against the actual codebase:
Step 5.1 -- Route Coverage
Step 5.2 -- Schema Accuracy
Step 5.3 -- Spec Lint
============================================================ SELF-HEALING VALIDATION (max 2 iterations) ============================================================
After producing documentation, validate completeness:
IF VALIDATION FAILS:
============================================================ OUTPUT ============================================================
Write the following files:
docs/openapi.yaml -- The complete OpenAPI 3.1.0 specificationdocs/api-docs.md -- Human-readable API reference (for GitHub browsing)Report:
docs/openapi.yaml -- OpenAPI 3.1.0 specificationdocs/api-docs.md -- Markdown API reference| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /api/users | Bearer | List all users |
| POST | /api/users | Bearer | Create a user |
| ... | ... | ... | ... |
============================================================ 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-docs — {{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.
============================================================ DO NOT ============================================================
preserving any manually-written descriptions or examples.
part of the documented API surface.
NEXT STEPS:
After generating API documentation:
/document to audit overall documentation coverage."/qa to verify API endpoint behavior matches the spec."/secure to audit API security (auth, rate limiting, input validation)."~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.