Files
2026-02-16 14:02:42 +09:00

87 lines
3.0 KiB
Markdown

---
name: ck-docs-seeker
description: Search library and framework documentation via llms.txt standard. Use for API docs lookup, GitHub repository analysis, technical documentation discovery, latest library features, context7 integration.
---
# ck-docs-seeker
Script-first documentation discovery using the llms.txt standard via context7.com. Fetch documentation for any library or framework without manual URL construction.
## When to Use
- Looking up API documentation for a specific library
- Finding the latest features or syntax for a framework
- Analyzing a GitHub repository's documentation
- Before implementing with an unfamiliar library
- When the local codebase docs are insufficient
## Don't Use When
- Searching local project files — use `ck-scout` instead
- General web research on a broad topic — use `ck-research`
- The documentation is already loaded in context
## Primary Workflow
Always execute scripts in this order from the `ck-docs-seeker` skill directory:
```bash
# 1. Detect query type (topic-specific vs general)
node scripts/detect-topic.js "<user query>"
# 2. Fetch documentation using script output
node scripts/fetch-docs.js "<user query>"
# 3. Analyze results (if multiple URLs returned)
cat llms.txt | node scripts/analyze-llms-txt.js -
```
Scripts handle URL construction, fallback chains, and error handling automatically.
## Scripts
**`detect-topic.js`** — Classify query type
- Identifies topic-specific vs general queries
- Extracts library name + topic keyword
- Returns JSON: `{topic, library, isTopicSpecific}`
**`fetch-docs.js`** — Retrieve documentation
- Constructs context7.com URLs automatically
- Handles fallback: topic → general → error
- Outputs llms.txt content or error message
**`analyze-llms-txt.js`** — Process llms.txt
- Categorizes URLs (critical/important/supplementary)
- Recommends agent distribution strategy
- Returns JSON with strategy
## Examples
**Topic-specific query:** "How do I use date picker in shadcn?"
```bash
node scripts/detect-topic.js "<query>" # → {topic, library, isTopicSpecific: true}
node scripts/fetch-docs.js "<query>" # → 2-3 URLs
# Fetch URLs with web fetch tool
```
**General query:** "Documentation for Next.js"
```bash
node scripts/detect-topic.js "<query>" # → {isTopicSpecific: false}
node scripts/fetch-docs.js "<query>" # → 8+ URLs
cat llms.txt | node scripts/analyze-llms-txt.js - # → distribution strategy
# Deploy parallel agents per recommendation
```
## Execution Principles
1. **Scripts first** — run scripts instead of manual URL construction
2. **Zero-token overhead** — scripts run as commands without loading content
3. **Automatic fallback** — scripts handle topic → general → error chains
4. **Progressive disclosure** — load only what's needed
5. **Agent distribution** — scripts recommend parallel agent strategy for large docs
## Don't Use When
- The skill directory or scripts are not available in the environment
- Simple, single-page documentation is already at a known URL — fetch directly