open-source-librarian — Claude Code subagent
The open-source-librarian subagent investigates open-source libraries and codebases, tracing implementations and linking to exact GitHub lines. Use it for source-level and change-history questions.
no license ★ 1,064 updated 2026-01-21
.claude/agents/open-source-librarian.mdWhat open-source-librarian does
open-source-librarian handles questions about libraries and large repositories. It looks for implementation details, source locations, documentation, issues, pull requests, and the background of code changes. Its answers are based on code evidence and GitHub permalinks rather than a high-level summary.
The configuration gives it file search and reading tools, Bash, WebFetch, LSP, WebSearch, Context7, Exa, and GitHub search, along with TodoWrite and Skill. In Claude Code, place the agent file at .claude/agents/open-source-librarian.md. That GitHub link trail matters when you need to verify the exact lines behind an answer.
What it helps with
- locate a function inside an open-source repository
- explain a library feature from its source code
- trace the background of a codebase change
- back an implementation answer with GitHub line links
Example prompts for the agent
- Explain how React Query implements stale time and link to the relevant source lines.
- Find where Zod checks email formats and provide a GitHub permalink.
- Research the routing change in Next.js and connect the explanation to issues and pull requests.
How to install open-source-librarian
Manually: put the files in place
.claude/agents/open-source-librarian.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/open-source-librarian.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/open-source-librarian.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about open-source-librarian
How do I install open-source-librarian in Claude Code?
Place the agent file at .claude/agents/open-source-librarian.md.
What does open-source-librarian do?
It investigates open-source libraries and repositories, finds source-level implementation details, and supports the explanation with GitHub permalinks.
Which tools does open-source-librarian use?
Its configuration includes file search and reading, Bash, LSP, WebSearch, Context7, Exa, and GitHub search. It also has TodoWrite and Skill.