home / skills / dmdorta1111 / jac-v1 / docs-seeker

This skill discovers and retrieves topic-specific documentation by executing scripts to classify queries, fetch sources, and analyze results for efficient

npx playbooks add skill dmdorta1111/jac-v1 --skill docs-seeker

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

Files (17)
SKILL.md
3.3 KB
---
name: docs-seeker
description: "Search technical documentation using executable scripts to detect query type, fetch from llms.txt sources (context7.com), and analyze results. Use when user needs: (1) Topic-specific documentation (features/components/concepts), (2) Library/framework documentation, (3) GitHub repository analysis, (4) Documentation discovery with automated agent distribution strategy"
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 provides script-first documentation discovery that searches technical docs via the llms.txt standard and context7.com patterns. It runs three executable scripts to detect query type, fetch relevant documentation URLs, and analyze results to recommend an agent distribution strategy. The workflow automates URL construction, fallback handling, and produces categorized outputs for immediate processing.

How this skill works

First, a detector script classifies the user query as topic-specific or general and extracts library and topic keywords. Next, a fetch script constructs context7.com URLs, follows fallback chains (topic → general → error), and writes results to llms.txt. Finally, an analyzer ingests llms.txt, categorizes URLs (critical/important/supplementary), and returns a JSON recommendation for agent distribution and phased processing.

When to use it

  • You need fast, topic-specific documentation (features, components, concepts).
  • You want comprehensive library or framework documentation coverage.
  • You must analyze a GitHub repository or find authoritative docs for a repo.
  • You want automated discovery with suggestions for parallel agent execution.
  • You prefer a script-driven workflow without manual URL construction.

Best practices

  • Always run the three scripts in order: detect → fetch → analyze.
  • Use topic-specific queries for fastest results and fewer URLs.
  • Inspect llms.txt output before launching agents to confirm critical links.
  • Keep .env configuration consistent across environments for predictable fallbacks.
  • Start with a small agent distribution (1–3) for topics, scale to phased multi-agent for broad library searches.

Example use cases

  • Quickly find docs for a UI component: detect topic, fetch 2–3 targeted URLs, read and implement.
  • Gather full framework docs for onboarding: run fetch for general query, analyze ~8+ URLs, deploy 3–7 agents as recommended.
  • Assess a GitHub repo’s docs: use the repository analysis fallback and return categorized links for reviewers.
  • Automate documentation discovery in a CI step: run scripts to populate llms.txt and feed results to downstream tools.
  • Plan a phased migration: analyze docs, categorize critical APIs, and schedule parallel agents to extract details.

FAQ

Do the scripts require tokens or LLM context to run?

No. Scripts are designed for zero-token execution; they build URLs and fetch metadata without loading LLM context.

What if fetch-docs returns an error?

The fetch script implements automatic fallbacks (topic → general → error). Check llms.txt and errors reference for guidance and retry with broader queries.

How does the analyzer recommend agent counts?

It categorizes URLs by importance and suggests distributions (1, 3, 7, or phased) based on totalUrls and content criticality.