Skip to content
librarian logo

Librarian

librarian

Research open-source libraries with evidence-backed answers and GitHub permalinks. Use when the user asks about library internals, needs implementation details with source code references, wants to understand why something was changed, or needs authoritative answers backed by actual code. Excels ...

SKILL.md

Full skill instructions

Librarian

Answer questions about open-source libraries by finding evidence with GitHub permalinks. Every claim backed by actual code.

Execution Model

Pi executes tool calls sequentially, even when you emit multiple calls in one turn. But batching independent calls in a single turn still saves LLM round-trips (~5-10s each). Use these patterns:

PatternWhenActually parallel?
Batch tool calls in one turnIndependent ops (web_search + fetch_content + read)No, but saves round-trips
fetch_content({ urls: [...] })Multiple URLs to fetchYes (3 concurrent)
Bash with & + waitMultiple git/​gh commandsYes (OS-level)

Step 1: Classify the Request

Before doing anything, classify the request to pick the right research strategy.

TypeTriggerPrimary Approach
Conceptual"How do I use X?", "Best practice for Y?"web_search + fetch_content (README/​docs)
Implementation"How does X implement Y?", "Show me the source"fetch_content (clone) + code search
Context/​History"Why was this changed?", "History of X?"git log + git blame + issue/​PR search
ComprehensiveComplex or ambiguous requests, "deep dive"All of the above

Step 2: Research by Type

Conceptual Questions

Batch these in one turn:

  1. web_search: "library-name topic" via Perplexity for recent articles and discussions
  2. fetch_content: the library's GitHub repo URL to clone and check README, docs, or examples

Synthesize web results + repo docs. Cite official documentation and link to relevant source files.

Implementation Questions

The core workflow -- clone, find, permalink:

  1. fetch_content the GitHub repo URL -- this clones it locally and returns the file tree
  2. Use bash to search the cloned repo: grep -rn "function_name", find . -name "*.ts"
  3. Use read to examine specific files once you've located them
  4. Get the commit SHA: cd /​tmp/​pi-github-repos/​owner/​repo && git rev-parse HEAD
  5. Construct permalink: https://github.com/​owner/​repo/​blob/<sha>/​path/​to/​file#L10-L20

Batch the initial calls: fetch_content (clone) + web_search (recent discussions) in one turn. Then dig into the clone with grep/​read once it's available.

Context/​History Questions

Use git operations on the cloned repo:

cd /​tmp/​pi-github-repos/​owner/​repo

# Recent changes to a specific file
git log --oneline -n 20 -- path/​to/​file.ts

# Who changed what and when
git blame -L 10,30 path/​to/​file.ts

# Full diff for a specific commit
git show <sha> -- path/​to/​file.ts

# Search commit messages
git log --oneline --grep="keyword" -n 10

For issues and PRs, use bash:

# Search issues
gh search issues "keyword" --repo owner/​repo --state all --limit 10

# Search merged PRs
gh search prs "keyword" --repo owner/​repo --state merged --limit 10

# View specific issue/​PR with comments
gh issue view <number> --repo owner/​repo --comments
gh pr view <number> --repo owner/​repo --comments

# Release notes
gh api repos/​owner/​repo/​releases --jq '.[0:5] | .[].tag_name'

Comprehensive Research

Combine everything. Batch these in one turn:

  1. web_search: recent articles and discussions
  2. fetch_content: clone the repo (or multiple repos if comparing)
  3. bash: gh search issues "keyword" --repo owner/​repo --limit 10 & gh search prs "keyword" --repo owner/​repo --state merged --limit 10 & wait

Then dig into the clone with grep, read, git blame, git log as needed.

Step 3: Construct Permalinks

Permalinks are the whole point. They make your answers citable and verifiable.

https://github.com/<owner>/<repo>/​blob/<commit-sha>/<filepath>#L<start>-L<end>

Getting the SHA from a cloned repo:

cd /​tmp/​pi-github-repos/​owner/​repo && git rev-parse HEAD

Getting the SHA from a tag:

gh api repos/​owner/​repo/​git/​refs/​tags/​v1.0.0 --jq '.object.sha'

Always use full commit SHAs, not branch names. Branch links break when code changes. Permalinks don't.

Step 4: Cite Everything

Every code-related claim needs a permalink. Format:

The stale time check happens in [`notifyManager.ts`](https://github.com/​TanStack/​query/​blob/​abc123/​packages/​query-core/​src/​notifyManager.ts#L42-L50):

\`\`\`typescript
function isStale(query: Query, staleTime: number): boolean {
  return query.state.dataUpdatedAt + staleTime < Date.now()
}
\`\`\`

For conceptual answers, link to official docs and relevant source files. For implementation answers, every function/​class reference should have a permalink.

Video Analysis

For questions about video tutorials, conference talks, or screen recordings:

// Full extraction (transcript + visual descriptions)
fetch_content({ url: "https://youtube.com/​watch?v=abc" })

// Ask a specific question about a video
fetch_content({ url: "https://youtube.com/​watch?v=abc", prompt: "What libraries are imported in this tutorial?" })

// Single frame at a known moment
fetch_content({ url: "https://youtube.com/​watch?v=abc", timestamp: "23:41" })

// Range scan for visual discovery
fetch_content({ url: "https://youtube.com/​watch?v=abc", timestamp: "23:41-25:00" })

// Custom density across a range
fetch_content({ url: "https://youtube.com/​watch?v=abc", timestamp: "23:41-25:00", frames: 3 })

// Whole-video sampling
fetch_content({ url: "https://youtube.com/​watch?v=abc", frames: 6 })

// Analyze a local recording
fetch_content({ url: "/​path/​to/​demo.mp4", prompt: "What error message appears on screen?" })

// Batch multiple videos with the same question
fetch_content({
  urls: ["https://youtube.com/​watch?v=abc", "https://youtube.com/​watch?v=def"],
  prompt: "What packages are installed?"
})

Use single timestamps for known moments, ranges for visual scanning, and frames-alone for a quick overview of the whole video.

The prompt parameter only applies to video content (YouTube URLs and local video files). For non-video URLs, it's ignored.

Failure Recovery

FailureRecovery
grep finds nothingBroaden the query, try concept names instead of exact function names
gh CLI rate limitedUse the already-cloned repo in /​tmp/​pi-github-repos/ for git operations
Repo too large to clonefetch_content returns an API-only view automatically; use that or add forceClone: true
File not found in cloneBranch name with slashes may have misresolved; list the repo tree and navigate manually
Uncertain about implementationState your uncertainty explicitly, propose a hypothesis, show what evidence you did find
Video extraction failsEnsure Chrome is signed into gemini.google.com (free) or set GEMINI_API_KEY
Page returns 403/​bot blockGemini fallback triggers automatically; no action needed if Gemini is configured
web_search failsCheck provider config; try explicit provider: "gemini" if Perplexity key is missing

Guidelines

  • Vary search queries when running multiple searches -- different angles, not the same pattern repeated
  • Prefer recent sources; filter out outdated results when they conflict with newer information
  • For version-specific questions, clone the tagged version: fetch_content("https://github.com/​owner/​repo/​tree/​v1.0.0")
  • When the repo is already cloned from a previous fetch_content call, reuse it -- check the path before cloning again
  • Answer directly. Skip preamble like "I'll help you with..." -- go straight to findings

More skills from Dicklesworthstone

environment-setup-guide logo
Dicklesworthstone/pi_agent_rust

environment-setup-guide

Guide developers through setting up development environments with proper tools, dependencies, and configurations

1.8K 0
View
exa-policy-guardrails logo
Dicklesworthstone/pi_agent_rust

exa-policy-guardrails

Implement Exa lint rules, policy enforcement, and automated guardrails. Use when setting up code quality rules for Exa integrations, implementing pre-commit hooks, or configuring CI policy checks for Exa best practices. Trigger with phrases like "exa policy", "exa lint", "exa guardrails", "exa be...

1.8K 0
View
documenso-ci-integration logo
Dicklesworthstone/pi_agent_rust

documenso-ci-integration

Configure CI/CD pipelines for Documenso integrations. Use when setting up automated testing, deployment pipelines, or continuous integration for Documenso projects. Trigger with phrases like "documenso CI", "documenso GitHub Actions", "documenso pipeline", "documenso automated testing".

1.8K 0
View
openrouter-model-availability logo
Dicklesworthstone/pi_agent_rust

openrouter-model-availability

Build check model availability and implement fallback chains. Use when building resilient systems or handling model outages. Trigger with phrases like 'openrouter availability', 'openrouter fallback', 'openrouter model down', 'openrouter health check'.

1.8K 0
View
langfuse-enterprise-rbac logo
Dicklesworthstone/pi_agent_rust

langfuse-enterprise-rbac

Configure Langfuse enterprise organization management and access control. Use when implementing team access controls, configuring organization settings, or setting up role-based permissions for Langfuse projects. Trigger with phrases like "langfuse RBAC", "langfuse teams", "langfuse organization"...

1.8K 0
View
cursor-compliance-audit logo
Dicklesworthstone/pi_agent_rust

cursor-compliance-audit

Execute compliance and security auditing for Cursor usage. Triggers on "cursor compliance", "cursor audit", "cursor security review", "cursor soc2", "cursor gdpr". Use when analyzing or auditing cursor compliance audit. Trigger with phrases like "cursor compliance audit", "cursor audit", "cursor".

1.8K 0
View
apollo-ci-integration logo
Dicklesworthstone/pi_agent_rust

apollo-ci-integration

Configure Apollo.io CI/CD integration. Use when setting up automated testing, continuous integration, or deployment pipelines for Apollo integrations. Trigger with phrases like "apollo ci", "apollo github actions", "apollo pipeline", "apollo ci/cd", "apollo automated tests".

1.8K 0
View
python-script logo
Dicklesworthstone/pi_agent_rust

python-script

Create robust Python automation with full logging and safety checks. Use when tasks need complex data processing, authenticated API work, conditional file operations, or error handling beyond simple shell commands.

1.8K 0
View
posthog-multi-env-setup logo
Dicklesworthstone/pi_agent_rust

posthog-multi-env-setup

Configure PostHog across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment secrets, or implementing environment-specific PostHog configurations. Trigger with phrases like "posthog environments", "posthog staging", "po...

1.8K 0
View
ai-agents-architect logo
Dicklesworthstone/pi_agent_rust

ai-agents-architect

Expert in designing and building autonomous AI agents. Masters tool use, memory systems, planning strategies, and multi-agent orchestration. Use when: build agent, AI agent, autonomous agent, tool use, function calling.

1.8K 0
View
insecure-deserialization-checker logo
Dicklesworthstone/pi_agent_rust

insecure-deserialization-checker

Validate insecure deserialization checker operations. Auto-activating skill for Security Fundamentals. Triggers on: insecure deserialization checker, insecure deserialization checker Part of the Security Fundamentals skill category. Use when working with insecure deserialization checker functiona...

1.8K 0
View
path-traversal-finder logo
Dicklesworthstone/pi_agent_rust

path-traversal-finder

Manage path traversal finder operations. Auto-activating skill for Security Fundamentals. Triggers on: path traversal finder, path traversal finder Part of the Security Fundamentals skill category. Use when working with path traversal finder functionality. Trigger with phrases like "path traversa...

1.8K 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View