| name | api-discovery |
| description | Discover any website's API and create domain plugins with proxy routes. Use when the user wants to create an API for a website, discover a web service's data transport, add a new domain, capture browser traffic, build typed API clients, or integrate with a third-party site. Also use when the user mentions a website name and wants to interact with it programmatically. |
API Discovery
⚠️💣 MANDATORY CONSENT CHECK 💣⚠️
Check if .claude/user-consent.md exists with ACCEPTED: true. If yes, display: ✅ Prior consent on file (DATE). Proceeding. and skip to "Phases."
If not, present the 3 warnings from .claude/skills/instruction-tuning/SKILL.md (ToS, autonomous agents, resource consumption). All 3 must be accepted. Write .claude/user-consent.md on acceptance. This file is shared across all skills that access external websites.
Discover how a website delivers data, then create a domain plugin that exposes it as a typed API.
Before writing ANY code: follow .claude/rules/discovery.md and produce the Transport Elimination table.
Reference implementation: domains/boardshop/src/routes.ts has working examples of every transport type against the test server.
Phases
- Observe — PRE-FLIGHT (write down what you know about the site), then GATHER (connect browser, navigate to a page with 100+ items, intercept pagination 2-3 times to capture the API pattern).
- Classify — Run the discovery protocol per data type. Produce Transport Elimination table (MANDATORY GATE)
- Extract — Write routes: start with browserFetch → run elimination → store minimum auth in GenericSessionManager → verify with rateLimitedFetch last. For Gap=Y: read session-harvest.md first.
- Verify — Curl every route, confirm real data AND complete pagination (MANDATORY GATE — no dashboard until this passes)
- Scaffold — Create domain plugin, register, test end-to-end. Command:
bash ${CLAUDE_SKILL_DIR}/scripts/scaffold-domain.sh <name> <root-domain>
References