I Built a Claude Code Skill Th... Note

I Built a Claude Code Skill That Reverse-Engineers Undocumented APIs

The author joined a new team and immediately faced outdated API documentation, forcing them to manually grep the codebase for routes. This four-hour ordeal highlighted the common problem of non-existent or inaccurate documentation in many development environments. To address this, the author developed API Archaeologist, a Claude Code / Codex CLI skill designed to reverse-engineer API layers directly from source code.This tool automatically discovers various API elements, including internal endpoints (REST, GraphQL, gRPC, WebSockets), external integrations, authentication flows, and potential security gaps like unauthenticated routes. API Archaeologist generates two key outputs: API_DISCOVERY.md, a comprehensive catalog with Mermaid diagrams, and openapi-draft.yaml, a preliminary OpenAPI specification. Unlike tools that rely on existing annotations or specs, API Archaeologist analyzes the actual source code, making it ideal for legacy systems, startups, or projects with rapid development.The skill operates by reading a SKILL.md file that instructs Claude Code to trace route definitions, handlers, middleware, and database calls, mapping authentication and identifying external API calls. Installation involves creating a directory for the skill and downloading its SKILL.md file for either Claude Code or Codex CLI. Users then navigate to their backend repository and execute a simple command to generate the reports.The author emphasizes that the core insight gained was the sheer volume of valuable information already embedded within a codebase, needing only extraction and connection. While the OpenAPI output is a draft and dynamic routing can pose challenges, the tool aims to streamline API documentation. Future plans include frontend API consumer mapping, Postman collection export, and CI/CD integration. API Archaeologist offers a solution for teams struggling with outdated or missing API documentation by directly interpreting the code.