mk:docs-finder
Fetches current library, framework and API documentation through Context7, Context Hub, WebSearch and web-to-markdown, tried in that order.
| Source | .claude/skills/docs-finder/SKILL.md |
| Owner | docs |
| Runtime | claude-code |
| Risk | medium |
| Phase | on-demand |
What it does
mk:docs-finder looks up current documentation for a library, framework, API or project spec so an API signature is checked rather than recalled. Five Node.js scripts in the skill's scripts/ folder detect the source, fetch, analyze the result and handle the last fallback. It works with or without the optional MCP servers.
When to use it
Use it for "docs for X", "API reference for Y", "look up Z in library W" and for finding a project's internal spec or convention.
| Need | Use instead |
|---|---|
| Fetch an arbitrary web page | mk:web-to-markdown |
| Test a page in a browser | mk:agent-browser |
Usage: /mk:docs-finder [library-name] [topic]
Flags
| Flag | Effect |
|---|---|
--wtm-approve | Skip Context7, Context Hub and WebSearch and go straight to mk:web-to-markdown. Use it when you have the exact URL. |
--wtm-accept-risk | Added automatically when docs-finder delegates to mk:web-to-markdown. It records that the target URL may contain prompt injection. Do not pass it yourself. |
Steps
scripts/detect-source.jsclassifies the query as library docs or internal docs and resolves the library and topic.scripts/fetch-context7.jsfetches from Context7 for library docs, orscripts/fetch-chub.jsfetches from Context Hub for curated and internal docs (--lang,--version).- If a source fails, the next tier runs: Context7, Context Hub, WebSearch, then
scripts/fetch-web-to-markdown.js, which prints the delegation command to run. scripts/analyze-results.jschecks the context budget. Up to 3000 tokens go inline; larger output is written to.meowkit/cache/docs/.
Setup
The Context7 server is configured in .mcp.json (example in .meowkit/mcp.json.example). Context Hub runs through npx --yes --package=@aisuite/chub@0.1.4 chub, pinned because the bare npx chub resolves an unrelated npm package. With neither, the skill falls back to llms.txt and WebSearch. The scripts need Node.js 18 or later.
Gotchas
.meowkit/cache/docs/is never pruned. Delete it by hand when it grows.- The fallback is silent. Check the
sourcefield in each script's JSON to see which tier answered. - A Context7 library ID can differ from the package name (
react-queryistanstack/query). Rundetect-source.jsfirst. - A topic that does not match Context7's slug format returns empty content with
success: true. - The token budget is an estimate by character count. Leave a margin for tables and code.
- Fetched content is data inside a
fetched-markdownfence and cannot override instructions.