library-doc

Index and search library documentation locally for offline use. Invoke when user asks to index docs, search library topics, or list indexed libraries.

16 stars

Best use case

library-doc is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Index and search library documentation locally for offline use. Invoke when user asks to index docs, search library topics, or list indexed libraries.

Teams using library-doc should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/library-doc/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/library-doc/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/library-doc/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How library-doc Compares

Feature / Agentlibrary-docStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Index and search library documentation locally for offline use. Invoke when user asks to index docs, search library topics, or list indexed libraries.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Library Documentation Indexer

## Commands

```bash
# List
python3 ./scripts/list.py                         # all libraries
python3 ./scripts/list.py <library>               # docs in a library
python3 ./scripts/list.py --delete <library>      # delete a library

# Search
python3 ./scripts/search.py "<query>"                       # all libraries
python3 ./scripts/search.py "<query>" --library <library>   # specific library
python3 ./scripts/search.py "<query>" --limit <n>           # limit results

# Read
python3 ./scripts/read.py <library> "<title>"               # by title (exact)
python3 ./scripts/read.py <library> <id>                    # by document ID
python3 ./scripts/read.py <library> "<title>" --lines 1-100 # specific lines

# All commands support --json
```

## Search → Read Workflow

```bash
# 1. Search
python3 ./scripts/search.py "<query>" --library <library>

# 2. Read (use title or ID from search results)
python3 ./scripts/read.py <library> "<title>"
python3 ./scripts/read.py <library> <id>

# 3. For long docs, read in chunks
python3 ./scripts/read.py <library> "<title>" --lines 1-100
python3 ./scripts/read.py <library> "<title>" --lines 100-200
```

## Indexing a Library

### Check for preset first

```bash
python3 ./scripts/presets.py list              # List all available presets
python3 ./scripts/presets.py show <library>    # Show preset details
```

If a preset exists, use it directly (see "Using Presets" below).

### Manual indexing (no preset)

#### Step 1: Clarify what to index

If ambiguous, ask the user:
- Library/framework (ex: React, FastAPI)
- Web API or spec (ex: WebSocket API)
- Different implementations across languages

#### Step 2: Find docs source

Search: `"<library> documentation github"` or `"<library> docs site:github.com"`

Look for:
- Official repo with `docs/`, `content/`, or `pages/` folder
- Dedicated docs repo (`<lib>-docs`, `<lib>.dev`)
- README-only projects

For specific versions: check releases/tags (`v15.0.0`, `15.x`, `docs-v15`)

### Step 3: Identify structure

- **Docs path**: `docs/`, `content/`, `src/content/`, etc.
- **File types**: `.md`, `.mdx`, `.rst`
- **Base URL**: live docs URL (e.g., `https://<library>.dev/docs`)

### Step 4: Clone and index

Naming: `<library>` for latest, `<library>-<version>` for specific version.

CRITICAL: Always use sparse checkout to only download docs.

```bash
cd /tmp && rm -rf <lib>-docs

# clone with sparse checkout
git clone --depth 1 --filter=blob:none --sparse <repo-url> <lib>-docs
cd <lib>-docs && git sparse-checkout set <docs-path>

# verify docs exist
find <docs-path> -type f \( -name "*.md" -o -name "*.mdx" \) | wc -l

# index
find <docs-path> -type f \( -name "*.md" -o -name "*.mdx" \) | \
  python3 ./scripts/index.py <lib> --batch --base-url "<base-url>" --strip-prefix "<docs-path>/"

# cleanup and verify
rm -rf /tmp/<lib>-docs
python3 ./scripts/list.py <lib>
```

## Common Patterns

### Standard docs folder

```bash
cd /tmp && rm -rf <lib>-docs
git clone --depth 1 --filter=blob:none --sparse <repo-url> <lib>-docs
cd <lib>-docs && git sparse-checkout set docs
find docs -type f \( -name "*.md" -o -name "*.mdx" \) | \
  python3 ./scripts/index.py <lib> --batch --base-url "<base-url>" --strip-prefix "docs/"
rm -rf /tmp/<lib>-docs
```

### README-only project

```bash
cd /tmp && rm -rf <lib>-repo
git clone --depth 1 <repo-url> <lib>-repo
cat <lib>-repo/README.md | python3 ./scripts/index.py <lib> -f "README.md" -u "<repo-url>#readme"
rm -rf /tmp/<lib>-repo
```

### Specific version

```bash
cd /tmp && rm -rf <lib>-docs
git clone --branch <tag> --depth 1 --filter=blob:none --sparse <repo-url> <lib>-docs
cd <lib>-docs && git sparse-checkout set <docs-path>
find <docs-path> -type f \( -name "*.md" -o -name "*.mdx" \) | \
  python3 ./scripts/index.py <lib>-<version> --batch --base-url "<base-url>" --strip-prefix "<docs-path>/"
rm -rf /tmp/<lib>-docs
```

## Using Presets

For popular libraries, use the preset for correct repo/path/URL:

```bash
python3 ./scripts/presets.py show react   # Show preset config

# Then use the preset values:
cd /tmp && rm -rf react-docs
git clone --depth 1 --filter=blob:none --sparse https://github.com/reactjs/react.dev react-docs
cd react-docs && git sparse-checkout set src/content
find src/content -type f \( -name "*.md" -o -name "*.mdx" \) | \
  python3 ./scripts/index.py react --batch --base-url "https://react.dev" --strip-prefix "src/content/"
rm -rf /tmp/react-docs
```

Available presets: react, nextjs, vue, svelte, nuxt, angular, astro, remix, tailwind, shadcn, express, fastapi, django, flask, hono, nestjs, rails, laravel, bun, node, deno, typescript, python, rust, go, prisma, drizzle, supabase, redux, zustand, tanstack-query, vitest, playwright, jest, pytest, vite, langchain, openai, anthropic, docker, kubernetes, and more.

## Troubleshooting

- **0 docs indexed**: check docs path exists after sparse checkout
- **No .md files**: try `.mdx`, `.rst`, or check actual extension
- **Wrong URLs**: check live docs site structure
- **Re-indexing**: just run again, documents are upserted by path
- **Large doc chunking**: files >8KB auto-split by ## headings; use --no-chunk to disable

Related Skills

library-writer

16
from diegosouzapw/awesome-omni-skill

This skill should be used when writing software libraries, packages, or modules following battle-tested patterns for clean, minimal, production-ready code. It applies when creating new libraries, refactoring existing ones, designing library APIs, or when clean, dependency-minimal library code is needed. Triggers on requests like "create a library", "write a package", "design a module API", or mentions of professional library development.

Library Management

16
from diegosouzapw/awesome-omni-skill

User library, favorites, and reading progress

lang-elm-library-dev

16
from diegosouzapw/awesome-omni-skill

Elm-specific library/package development patterns. Use when creating Elm packages, designing pure functional APIs, configuring elm.json for libraries, writing documentation comments, publishing to package.elm-lang.org, or managing semantic versioning in pure functional context. Extends meta-library-dev with Elm tooling and ecosystem patterns.

cl-library-craft

16
from diegosouzapw/awesome-omni-skill

Analyze and generate idiomatic Common Lisp libraries following patterns from Edi Weitz, Marijn Haverbeke, and Eitaro Fukamachi

ash-library-hotfix

16
from diegosouzapw/awesome-omni-skill

Handles emergency hotfix process for critical bugs in ash_cookie_consent library including branch creation, minimal fixes, testing, and rapid release. Use when user asks to "create hotfix", "emergency fix", "patch critical bug", or "hotfix for version".

Analyzing AgentScope Library

16
from diegosouzapw/awesome-omni-skill

This skill provides a way to retrieve information from the AgentScope library for analysis and decision-making.

Advanced Modular Library Design

16
from diegosouzapw/awesome-omni-skill

Design modular libraries with clear package boundaries, feature-first organization, and clean API surfaces. Use when structuring monorepos, defining module boundaries, or designing library APIs.

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

mcp-standards

16
from diegosouzapw/awesome-omni-skill

MCP server standardization patterns for Claude Code plugins. Use when implementing MCP servers, designing tool interfaces, configuring MCP transports, or standardizing MCP naming conventions. Trigger keywords - "MCP", "MCP server", "MCP tools", "MCP transport", "tool naming", "MCP configuration".

mcp-server-evaluations

16
from diegosouzapw/awesome-omni-skill

Test MCP servers for quality and reliability. Verify tool functionality, test error handling, generate tests, and assess response quality with no dependencies other than curl. Use this when validating MCP server implementations, testing OpenAPI-to-MCP conversions, or assessing API tool quality.

mcp-repo-scan

16
from diegosouzapw/awesome-omni-skill

Comprehensive RE-Engine repository health audit, issue resolution, and architectural enhancement through systematic codebase analysis

mcp-patterns

16
from diegosouzapw/awesome-omni-skill

MCP server building, advanced patterns, and security hardening. Use when building MCP servers, implementing tool handlers, adding authentication, creating interactive UIs, hardening MCP security, or debugging MCP integrations.