home / skills / jjuidev / jss / docs-seeker

docs-seeker skill

/.claude/skills/docs-seeker

This skill discovers library documentation by executing scripted workflows to fetch, categorize, and analyze context7 docs for fast API lookups.

npx playbooks add skill jjuidev/jss --skill docs-seeker

Review the files below or copy the command above to add this skill to your agents.

Files (17)
SKILL.md
3.1 KB
---
name: docs-seeker
description: Search library/framework documentation via llms.txt (context7.com). Use for API docs, GitHub repository analysis, technical documentation lookup, latest library features.
version: 3.1.0
---

# Documentation Discovery via Scripts

## Overview

**Script-first** documentation discovery using llms.txt standard.

Execute scripts to handle entire workflow - no manual URL construction needed.

## Primary Workflow

**ALWAYS execute scripts in this order:**

```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}`
- Zero-token execution

**`fetch-docs.js`** - Retrieve documentation
- Constructs context7.com URLs automatically
- Handles fallback: topic → general → error
- Outputs llms.txt content or error message
- Zero-token execution

**`analyze-llms-txt.js`** - Process llms.txt
- Categorizes URLs (critical/important/supplementary)
- Recommends agent distribution (1 agent, 3 agents, 7 agents, phased)
- Returns JSON with strategy
- Zero-token execution

## Workflow References

**[Topic-Specific Search](./workflows/topic-search.md)** - Fastest path (10-15s)

**[General Library Search](./workflows/library-search.md)** - Comprehensive coverage (30-60s)

**[Repository Analysis](./workflows/repo-analysis.md)** - Fallback strategy

## References

**[context7-patterns.md](./references/context7-patterns.md)** - URL patterns, known repositories

**[errors.md](./references/errors.md)** - Error handling, fallback strategies

**[advanced.md](./references/advanced.md)** - Edge cases, versioning, multi-language

## Execution Principles

1. **Scripts first** - Execute scripts instead of manual URL construction
2. **Zero-token overhead** - Scripts run without context loading
3. **Automatic fallback** - Scripts handle topic → general → error chains
4. **Progressive disclosure** - Load workflows/references only when needed
5. **Agent distribution** - Scripts recommend parallel agent strategy

## Quick Start

**Topic query:** "How do I use date picker in shadcn?"
```bash
node scripts/detect-topic.js "<query>"  # → {topic, library, isTopicSpecific}
node scripts/fetch-docs.js "<query>"    # → 2-3 URLs
# Read URLs with WebFetch
```

**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 -  # → {totalUrls, distribution}
# Deploy agents per recommendation
```

## Environment

Scripts load `.env`: `process.env` > `.claude/skills/docs-seeker/.env` > `.claude/skills/.env` > `.claude/.env`

See `.env.example` for configuration options.

Overview

This skill offers script-first documentation discovery using the llms.txt standard and context7.com URL patterns. It automates detection, fetching, and analysis of library and framework docs so you can find API references, GitHub repo content, and technical guides without manually building URLs. The workflow is optimized for fast topic queries and comprehensive library searches.

How this skill works

Run the provided scripts in sequence: detect-topic to classify the query and extract library/topic, fetch-docs to construct context7.com URLs and retrieve llms.txt, and analyze-llms-txt to categorize results and recommend agent distribution. Scripts handle fallback chains (topic → general → repo) and error conditions automatically and return JSON or llms.txt output. Environment configuration is loaded from .env locations so scripts run with zero-token overhead.

When to use it

  • Looking up a specific API or feature within a library (topic-specific search)
  • Gathering comprehensive documentation for a whole library or framework (general search)
  • Analyzing a GitHub repository or codebase for available docs and references
  • Preparing distributed agent workflows with recommended URL/agent distribution
  • Automating doc discovery in CI pipelines or developer tooling

Best practices

  • Always run scripts in the prescribed order: detect-topic → fetch-docs → analyze-llms-txt
  • Use topic-specific queries for fastest results and fewer URLs
  • For broad library searches, expect more URLs and follow analysis recommendations for agent distribution
  • Keep your .env configuration consistent across environments to ensure predictable fallback behavior
  • Read analysis JSON to decide between single-agent, phased, or multi-agent strategies

Example use cases

  • Quickly find how to use a UI component (e.g., date picker) in a specific library using a topic query
  • Collect comprehensive Next.js documentation links for onboarding or research
  • Run repository analysis as a fallback when topic or general searches miss content
  • Automate documentation fetching in a CI job to produce llms.txt and then feed it to downstream agents
  • Use analyze-llms-txt output to decide how many parallel agents to deploy for processing documentation

FAQ

What order should I run the scripts in?

Always run detect-topic first, then fetch-docs, and finally analyze-llms-txt when multiple URLs are returned.

Do the scripts require special tokens or API keys?

No. Scripts are designed for zero-token execution; environment variables are loaded from local .env files for configuration.