docs-detect-sourcelisted
Install: claude install-skill Docsbook-io/docs-skills
# docs-detect-source — Identify and route a docs source
## Workflow
1. Inspect the input: classify as a plain URL, a GitHub repo URL, or a local path.
2. For a plain URL — fetch the page and look for platform signals in HTML meta tags, CDN links, and domain name. If no platform matches, classify as a generic website.
3. For a GitHub repo URL — fetch root contents via the GitHub API and look for known config files (`mint.json`, `SUMMARY.md`, `docusaurus.config.js`, `.vitepress/`, `astro.config.*`, etc.). If only a README and source directory are present, classify as a code repo.
4. For a local path — inspect the directory structure for the same config file signals.
5. Map the detected type to a downstream skill and report both.
## Guardrails
- Fetch the page with WebFetch first; only escalate to a browser if the HTML is empty.
- A single ambiguous signal is not enough — require at least one platform-specific config file or meta tag before assigning a platform type.
- If detection is inconclusive, default to `website` / `/docs-from-site` rather than blocking.
- Never mutate the source; detection is read-only.
## Skill Routing
| Detected type | Downstream skill |
|---|---|
| `website` | `/docs-from-site` |
| `github-code-repo` | `/docs-from-code` |
| Any recognized docs platform | `/docs-from-docs` |
## Acceptance Criteria
- [ ] Input classified into exactly one type without prompting the user
- [ ] Platform identified from signals (meta tags, config files, domain) rathe