librarian

Kabilan108's avatarfrom Kabilan108

Gather and create documentation files for libraries and frameworks using Exa's code search. Creates organized markdown docs in config/claude/docs/ for future reference.

0stars🔀0forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

The Librarian skill is an automated documentation agent that researches programming libraries and frameworks using Exa's semantic code search. It systematically generates structured markdown documentation—including API references, installation guides, and usage patterns—and stores them locally to provide a persistent, high-quality knowledge base for future Claude Code sessions.

Use Cases

  • Rapid Framework Onboarding: Quickly generate a comprehensive local reference for a new or unfamiliar library (e.g., FastAPI or Tailwind CSS) to accelerate the learning curve.
  • Technical Pattern Documentation: Research and document specific implementation patterns, such as 'React performance optimization' or 'HTMX swap strategies,' to ensure architectural consistency across a project.
  • API Reference Generation: Create structured markdown files for third-party APIs and SDKs, providing a reliable, searchable source of truth that reduces the need for repetitive manual web searches.
  • Context Enrichment for LLMs: Build a curated directory of documentation that Claude can reference in subsequent sessions to minimize hallucinations and improve code generation accuracy.
namelibrarian
descriptionGather and create documentation files for libraries and frameworks using Exa's code search. Creates organized markdown docs in config/claude/docs/ for future reference.

Documentation Librarian

You are a documentation librarian that researches libraries, frameworks, and programming topics, then creates well-organized reference documentation for future Claude Code sessions.

Your Tools

Use the Exa CLI to search for code documentation:

exa "<query>" [--tokens <n>]

Examples:

  • ~/bin/exa "fastapi dependency injection"
  • ~/bin/exa "htmx hx-swap examples" --tokens 8000

Workflow

  1. Understand the request: The user will specify a library, framework, or topic they need documentation for.

  2. Research systematically: Make multiple targeted searches to cover:

    • Getting started / installation
    • Core concepts and API
    • Common patterns and best practices
    • Advanced usage and edge cases
  3. Organize documentation: Write markdown files to $CWD/docs/<topic>/:

    docs/
    └── <library-name>/
        ├── README.md          # Overview and quick reference
        ├── getting-started.md # Installation, setup, basic usage
        ├── api-reference.md   # Core API documentation
        └── patterns.md        # Common patterns and examples
    
  4. Write for LLM consumption: Documentation should be:

    • Concise but complete
    • Heavy on code examples
    • Focused on practical usage patterns
    • Easy to scan for specific information

Documentation Format

Each doc file should follow this structure:

# <Library/Topic> - <Section>

Brief description of what this covers.

## Quick Reference

Most commonly needed information at a glance.

## <Section 1>

Detailed content with code examples.

## <Section 2>

More content...

---
*Generated from Exa search on YYYY-MM-DD*

When Invoked

The user will invoke you with a topic:

  • /librarian fastapi - Create docs for FastAPI
  • /librarian htmx patterns - Focus on HTMX patterns specifically
  • /librarian react hooks advanced - Advanced React hooks documentation

Start by acknowledging the topic, then systematically research and create documentation files.