lib-docs
Library Documentation Skill
Fetch up-to-date documentation for any library using web search and pre-configured sources.
Quick Reference (Common Sources)
| Library | Primary Source |
|---|---|
| Clojure libs | cljdoc.org/d/{group}/{artifact} |
| HTMX | htmx.org/docs/ |
| Alpine.js | alpinejs.dev/ |
| Tailwind | tailwindcss.com/docs/ |
| DaisyUI | daisyui.com/components/ |
| React | react.dev/reference/ |
For full list: See references/sources.md
Workflow
1. Resolve Documentation Source
Check if library has a pre-configured source in references/sources.md:
- Known library: Use configured URL directly
- Unknown library: WebSearch for
"[library name] official documentation"
2. Fetch Documentation
Use WebFetch with a focused prompt:
WebFetch URL with prompt: "Extract [topic] documentation, API reference, and code examples for [library]"
Tips for effective fetches:
- Target specific pages (API reference, getting started) over landing pages
- Include version if user specified one
- Request code examples explicitly
3. Summarize for User
Return:
- Relevant API/function signatures
- Code examples demonstrating usage
- Link to source for further reading
Fallback: Unknown Libraries
When no pre-configured source exists:
- WebSearch:
"[library] official documentation site" - Identify official source from results (prefer: official site > GitHub > Stack Overflow)
- WebFetch the docs page
- Offer to add the source to
references/sources.mdfor future lookups
Examples
User: "How do I use HoneySQL's where clause?"
- Check sources.md → HoneySQL on cljdoc.org
- WebFetch
https://cljdoc.org/d/com.github.seancorfield/honeysql/with prompt about where clauses - Return examples and API info
User: "lookup docs for some-obscure-lib"
- Check sources.md → not found
- WebSearch for official docs
- WebFetch from search result
- Return docs + offer to save source
Token Efficiency
- Only fetch what's needed for the specific question
- Prefer targeted page URLs over index pages
- Use focused prompts to extract relevant sections
More from brettatoms/agent-skills
alpinejs
AlpineJS best practices and patterns. Use when writing HTML with Alpine.js directives to avoid common mistakes like long inline JavaScript strings.
106janet
Write idiomatic Janet code. Use when writing, refactoring, or reviewing Janet (.janet) code. Covers functional patterns, performance tradeoffs, common gotchas, data structure idioms, PEG parsing, and Janet-specific pitfalls.
10playwright
Browser automation for web testing and interaction. Use for navigating pages, filling forms, clicking elements, taking screenshots, and inspecting page content. Maintains stateful browser session across commands.
9code-symbols
Find and edit symbols in code using ast-grep (tree-sitter based). Use when finding function definitions, class definitions, symbol usages, renaming symbols, or replacing code in JavaScript, TypeScript, Python, Go, Rust, and other languages. NOT for Clojure - use clj-symbols instead.
8browser-tools
Interactive browser automation via Chrome DevTools Protocol. Use when you need to interact with web pages, test frontends, or when user interaction with a visible browser is required.
8github
Work with GitHub using the gh CLI. Use when creating/managing pull requests, reviewing code, managing issues, viewing GitHub Actions runs, creating releases, or making API requests. Triggers on GitHub-related tasks like "create a PR", "list open issues", "check CI status", "merge this PR", or "create a release".
7