$npx -y skills add Rune-kit/rune --skill docs-seekerFind documentation for APIs, libraries, and error messages. Looks up official docs, changelog entries, and migration guides.
| 1 | # docs-seeker |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Documentation lookup utility. Receives a library name, API reference, or error message, resolves the correct documentation, and returns API signatures, usage examples, and known issues. Stateless — no memory between calls. |
| 6 | |
| 7 | ## Calls (outbound) |
| 8 | |
| 9 | None — pure L3 utility using `WebSearch`, `WebFetch`, and Context7 MCP tools directly. |
| 10 | |
| 11 | ## Called By (inbound) |
| 12 | |
| 13 | - `debug` (L2): lookup API docs for unclear errors |
| 14 | - `fix` (L2): check correct API usage before applying changes |
| 15 | - `review` (L2): verify API usage is current and correct |
| 16 | - `adversary` (L2): verify framework/API assumptions in plan are correct |
| 17 | |
| 18 | ## Execution |
| 19 | |
| 20 | ### Input |
| 21 | |
| 22 | ``` |
| 23 | target: string — library name, API endpoint, or error message |
| 24 | version: string — (optional) specific version to look up |
| 25 | query: string — specific question about the target (e.g., "how to configure retry") |
| 26 | ``` |
| 27 | |
| 28 | ### Step 1 — Identify Target |
| 29 | |
| 30 | Parse the input to extract: |
| 31 | - Library or framework name (e.g., "react-query", "fastapi", "prisma") |
| 32 | - Version if specified |
| 33 | - The specific API, method, or error to look up |
| 34 | |
| 35 | ### Step 2 — Try Context7 MCP (fastest) |
| 36 | |
| 37 | Attempt Context7 MCP lookup first (faster, higher quality): |
| 38 | |
| 39 | 1. Call `mcp__plugin_context7_context7__resolve-library-id` with the library name and query |
| 40 | 2. Select the best matching library ID from results (prioritize: name match, source reputation, snippet count) |
| 41 | 3. Call `mcp__plugin_context7_context7__query-docs` with the resolved library ID and the specific query |
| 42 | 4. If Context7 returns a satisfactory answer with code examples, proceed to Step 5 |
| 43 | |
| 44 | ### Step 3 — Try llms.txt Discovery |
| 45 | |
| 46 | If Context7 MCP is unavailable or insufficient, try llms.txt (AI-optimized documentation): |
| 47 | |
| 48 | **For GitHub repos** — pattern: `https://context7.com/{org}/{repo}/llms.txt` |
| 49 | ``` |
| 50 | github.com/vercel/next.js → context7.com/vercel/next.js/llms.txt |
| 51 | github.com/shadcn-ui/ui → context7.com/shadcn-ui/ui/llms.txt |
| 52 | ``` |
| 53 | |
| 54 | **For doc sites** — pattern: `https://context7.com/websites/{normalized-domain}/llms.txt` |
| 55 | ``` |
| 56 | docs.imgix.com → context7.com/websites/imgix/llms.txt |
| 57 | ffmpeg.org/doxygen/8.0 → context7.com/websites/ffmpeg_doxygen_8_0/llms.txt |
| 58 | ``` |
| 59 | |
| 60 | **Topic-specific** — append `?topic={query}` for focused results: |
| 61 | ``` |
| 62 | context7.com/shadcn-ui/ui/llms.txt?topic=date-picker |
| 63 | context7.com/vercel/next.js/llms.txt?topic=cache |
| 64 | ``` |
| 65 | |
| 66 | **Traditional llms.txt fallback**: `WebSearch "[library] llms.txt"` → common paths: `docs.[lib].com/llms.txt`, `[lib].dev/llms.txt` |
| 67 | |
| 68 | Use `WebFetch` on the resolved llms.txt URL. If it contains multiple section URLs (3+), launch parallel Explorer agents (one per section, max 5). |
| 69 | |
| 70 | ### Step 4 — Fallback to Web Search |
| 71 | |
| 72 | If neither Context7 nor llms.txt available: |
| 73 | |
| 74 | 1. Use `WebSearch` with queries: |
| 75 | - "[library] [api/method] official documentation" |
| 76 | - "[library] [version] [query]" |
| 77 | - "[error message] [library] fix" |
| 78 | 2. Identify official documentation URLs (docs.*, official GitHub, npm/pypi pages) |
| 79 | 3. Call `WebFetch` on the top 1-3 official sources |
| 80 | |
| 81 | **Repository analysis fallback** (when docs are sparse but code is available): |
| 82 | ```bash |
| 83 | npx repomix --output /tmp/repomix-output.xml # in the cloned repo |
| 84 | ``` |
| 85 | Read the repomix output to extract API patterns, usage examples, and internal documentation. |
| 86 | |
| 87 | ### Step 5 — Extract Answer |
| 88 | |
| 89 | From Context7, llms.txt, or fetched pages, extract: |
| 90 | - Exact API signature with parameter types and return type |
| 91 | - Minimal working code example |
| 92 | - Version-specific notes (deprecated in X, changed in Y) |
| 93 | - Known issues or common pitfalls mentioned in docs |
| 94 | |
| 95 | ### Step 6 — Report |
| 96 | |
| 97 | Return structured documentation in the output format below. |
| 98 | |
| 99 | ## Constraints |
| 100 | |
| 101 | - Prefer Context7 MCP → llms.txt → WebSearch (in that priority order) |
| 102 | - Only fall back to web if Context7 and llms.txt both lack coverage |
| 103 | - Use `?topic=` parameter on llms.txt URLs for targeted results |
| 104 | - Always include source URL so callers can verify |
| 105 | - If the API is deprecated, say so explicitly and link to the replacement |
| 106 | - For parallel fetching: 1-3 URLs = single agent, 4-10 = 3-5 Explorer agents, 11+ = 5-7 agents |
| 107 | |
| 108 | ## Output Format |
| 109 | |
| 110 | ``` |
| 111 | ## Documentation: [Library/API] |
| 112 | - **Version**: [detected or "latest"] |
| 113 | - **Source**: [official docs URL or "Context7"] |
| 114 | |
| 115 | ### API Reference |
| 116 | - **Signature**: `functionName(param1: Type, param2: Type): ReturnType` |
| 117 | - **Parameters**: |
| 118 | - `param1` — description |
| 119 | - `param2` — description |
| 120 | - **Returns**: description |
| 121 | |
| 122 | ### Usage Example |
| 123 | ```[lang] |
| 124 | [minimal working code snippet from official docs] |
| 125 | ``` |
| 126 | |
| 127 | ### Known Issues / Deprecations |
| 128 | - [relevant warning, deprecation notice, or common mistake] |
| 129 | ``` |
| 130 | |
| 131 | ## Sharp Edges |
| 132 | |
| 133 | Known failure modes for this skill. Check these before declaring done. |
| 134 | |
| 135 | | Failure Mode | Severity |