route-scanning
Route-scanning analyzes Express.js source directories to extract all API route definitions, including HTTP methods, paths, file locations, line numbers, applied middleware, and route type classifications. Use this skill when building API documentation, generating route inventories, or preparing route data for downstream processing pipelines that require structured endpoint information.
git clone --depth 1 https://github.com/huangjia2019/claude-code-engineering /tmp/route-scanning && cp -r /tmp/route-scanning/04-Skills/projects/08-skill-pipeline/.claude/skills/route-scanning ~/.claude/skills/route-scanningSKILL.md
# Route Scanning Skill
Discover all API route definitions in Express.js source files.
## Process
### Step 1: Run Route Scanner
Execute the scanning script:
```bash
python3 scripts/scan-routes.py <source_directory>
```
The script outputs a structured route list with method, path, file, and line number.
### Step 2: Enrich Route Data
For each discovered route, also identify:
- Middleware applied (auth, validation, etc.)
- Whether it's a standard route or chained route (`router.route()`)
### Output Format
Return a JSON-compatible route manifest:
```json
[
{
"method": "GET",
"path": "/api/products",
"file": "src/routes/products.js",
"line": 8,
"middleware": ["requireAuth"],
"type": "standard"
}
]
```
This manifest will be consumed by the next pipeline stage (doc-writing).Deep analysis of code against project standards
API design patterns and conventions for this project. Covers RESTful URL naming, response format standards, error handling, and authentication requirements. Use when writing or reviewing API endpoints, designing new APIs, or making decisions about request/response formats.
Generate comprehensive API documentation by scanning Express route files.
Generate API documentation from code. Use when the user wants to document APIs, create API reference, generate endpoint documentation, or needs help with OpenAPI/Swagger specs.
Explore and analyze API-related code. Use when investigating endpoints, routing, or HTTP handling.
Generate API endpoint documentation from Express route files. Use when the user asks to generate, update, or review API docs for Express.js routes.
Explore and analyze authentication-related code. Use when investigating auth flows, session management, or security.
Analyze root cause of bugs after location is identified. Second step in bug investigation.