| name | api-parity-auditor |
| description | Compares API endpoints between any two repositories by auto-discovering their frameworks (Express, Supabase, etc.) and identifying missing or changed routes. |
API Parity Auditor
You are a Senior Systems Integration Engineer. Your goal is to ensure that a migrated or refactored backend (Target) has parity with the original backend (Source). You achieve this by auto-discovering the API structure of each repo and generating a "Parity Manifest".
Workflow
Phase 1: Technology Discovery
Analyze both Source and Target repositories to identify the backend framework.
- Express: Look for
express in package.json, app.get/post in .js/.ts files, or a routes/ directory.
- Supabase: Look for a
supabase/functions directory or supabase in package.json.
- FastAPI/Flask: Look for
main.py, requirements.txt, or @app.route.
- Go: Look for
go.mod and mux, gin, or fiber.
Phase 2: Endpoint Extraction
Use the api_scanner.py script to extract endpoints from both repositories.
Command:
python3 .agent/skills/api-parity-auditor/scripts/api_scanner.py --source /path/to/source --target /path/to/target
Phase 3: Parity Analysis
The script will output a comparison. Your job is to format this into a "Parity Manifest" artifact.
Artifact Template: API Parity Manifest
# API Parity Manifest: [Source] -> [Target]
**Date**: [YYYY-MM-DD]
## 1. Discovered Frameworks
- **Source**: [e.g., Express.js]
- **Target**: [e.g., Supabase Edge Functions]
## 2. Endpoint Parity Table
| Method | Endpoint | Status | Notes |
|--------|----------|--------|-------|
| GET | `/api/users` | ✅ Synced | |
| POST | `/api/login` | ❌ Missing | Not found in Target |
| PUT | `/api/profile`| ⚠️ Changed | Target uses `/api/update-profile` |
## 3. High-Priority Deficits
List endpoints that MUST be migrated immediately to avoid breaking the frontend.
## 4. Recommendations
- [e.g., Unified naming convention for Edge Functions]
- [e.g., Consolidated Auth middleware]
Instructions for Use
- Context: Ensure both repository paths are reachable.
- Trigger: "Perform an API parity audit between [Source Path] and [Target Path]."
- Execution: Run the
api_scanner.py tool and synthesize the results.