{"slug": "i-built-a-claude-code-skill-that-reverse-engineers-undocumented-apis", "title": "I Built a Claude Code Skill That Reverse-Engineers Undocumented APIs", "summary": "A developer has created API Archaeologist, a Claude Code and Codex CLI skill that reverse-engineers undocumented APIs by reading source code. The tool maps internal endpoints, external integrations, auth flows, security gaps, and dead code, generating OpenAPI specs and security reports. It is designed for legacy monoliths, startups without proper API documentation, and projects where original developers have left.", "body_md": "I Built a Claude Code Skill That Reverse-Engineers Undocumented APIs\n\nBecause \"the docs are in the code\" is not a documentation strategy.\n\nThe Week I Lost to Grepping\n\nI joined a new team last month. Day 1 task: add a feature to the billing service.\n\nDay 1 reality: I opened the API docs and realized they were from 2022. Half the routes had been rewritten. The other half never had docs to begin with.\n\nSo I did what every backend dev does. I grepped.\n\ngrep -r \"app.get|app.post|router.\" src/ --include=\"*.js\"\n\nFour hours later, I had a notebook full of endpoints, a headache, and zero confidence that I had found everything.\n\nI found routes that worked but were not documented. I found docs for routes that did not exist anymore. I found one GET /invoices/:id endpoint with zero auth checks that had been sitting there since 2022.\n\nThis is normal. And it should not be.\n\nThe Idea\n\nWhat if I could drop a single file into a repo and have Claude Code map the entire API layer for me?\n\nNot from annotations. Not from existing OpenAPI specs. From the actual code.\n\nSo I built it.\n\nMeet API Archaeologist\n\nAPI Archaeologist is a Claude Code / Codex CLI skill that reads your source code and reverse-engineers your API layer.\n\nIt finds:\n\n• Internal endpoints — REST, GraphQL, gRPC, WebSockets\n\n• External integrations — third-party APIs, webhooks, SDK clients\n\n• Auth flows — JWT, OAuth, API keys, session cookies, RBAC\n\n• Security gaps — unauthenticated routes, hardcoded secrets, missing rate limits\n\n• Dead code — auth middleware with no endpoints, orphaned routes\n\nAnd it generates two things:\n\nHow It Works\n\nThe skill is just a SKILL.md file. Claude Code reads it and follows the instructions.\n\nIt:\n\nWhy Not Just Use Swagger?\n\nSwagger and OpenAPI Generator are great if your codebase already has annotations, decorators, or an existing specification.\n\nThis is for the other kind of codebase:\n\n• Legacy monoliths\n\n• Startups without proper API documentation\n\n• Projects where the original developers have left\n\n• APIs that evolved faster than their documentation\n\nIt reads the actual source code instead of depending on existing documentation.\n\nInstallation\n\nClaude Code:\n\nmkdir -p ~/.claude/skills/api-archaeologist\n\ncurl -o ~/.claude/skills/api-archaeologist/SKILL.md\n\n[https://raw.githubusercontent.com/prasen-sky/api-archaeologist/main/skills/api-archaeologist/SKILL.md](https://raw.githubusercontent.com/prasen-sky/api-archaeologist/main/skills/api-archaeologist/SKILL.md)\n\nCodex CLI:\n\nmkdir -p ~/.codex/agents/skills/api-archaeologist\n\ncurl -o ~/.codex/agents/skills/api-archaeologist/SKILL.md\n\n[https://raw.githubusercontent.com/prasen-sky/api-archaeologist/main/skills/api-archaeologist/SKILL.md](https://raw.githubusercontent.com/prasen-sky/api-archaeologist/main/skills/api-archaeologist/SKILL.md)\n\nOr clone the repository:\n\ngit clone [https://github.com/prasen-sky/api-archaeologist.git](https://github.com/prasen-sky/api-archaeologist.git)\n\ncp api-archaeologist/skills/api-archaeologist/SKILL.md ~/.claude/skills/api-archaeologist/\n\nUsage\n\nNavigate to your backend repository and run:\n\nclaude /api-archaeologist\n\nOr with Codex:\n\ncodex $api-archaeologist\n\nThen review the generated reports and verify the findings against your codebase.\n\nWhat I Learned\n\nThe interesting part wasn't generating another API documentation tool.\n\nIt was realizing how much useful information already exists inside a codebase.\n\nRoutes, middleware, authentication, database calls, third-party APIs and request/response structures are already there.\n\nThe problem is finding and connecting all of it.\n\nLimitations\n\nThe OpenAPI output is a draft. Types and behavior may need manual verification.\n\nDynamic or heavily meta-programmed routing can be harder to analyze.\n\nLarge monorepos are better analyzed service by service.\n\nRoadmap\n\n• Frontend API consumer mapping\n\n• Postman collection export\n\n• CI/CD integration\n\n• Detection of newly introduced unauthenticated endpoints\n\nTry It\n\nIf your API documentation is outdated, this might be useful.\n\nGitHub:\n\n[[https://github.com/prasen-sky/api-archaeologist](https://github.com/prasen-sky/api-archaeologist)]\n\nTry it on a repo and let me know what it finds.", "url": "https://wpnews.pro/news/i-built-a-claude-code-skill-that-reverse-engineers-undocumented-apis", "canonical_source": "https://dev.to/prasen-sky/i-built-a-claude-code-skill-that-reverse-engineers-undocumented-apis-2h47", "published_at": "2026-08-19 15:44:05+00:00", "updated_at": "2026-08-19 16:13:59.348306+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "large-language-models"], "entities": ["Claude Code", "Codex CLI", "API Archaeologist", "OpenAPI", "Swagger", "prasen-sky"], "alternates": {"html": "https://wpnews.pro/news/i-built-a-claude-code-skill-that-reverse-engineers-undocumented-apis", "markdown": "https://wpnews.pro/news/i-built-a-claude-code-skill-that-reverse-engineers-undocumented-apis.md", "text": "https://wpnews.pro/news/i-built-a-claude-code-skill-that-reverse-engineers-undocumented-apis.txt", "jsonld": "https://wpnews.pro/news/i-built-a-claude-code-skill-that-reverse-engineers-undocumented-apis.jsonld"}}