librarian

Build a local index and search the PAI knowledge base with weighted keyword matching.

1|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/matt-fell-ai/PAI --skill librarian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: librarian
Source: https://github.com/matt-fell-ai/PAI/tree/main/skills/Librarian
Command: npx skills add https://github.com/matt-fell-ai/PAI --skill librarian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Librarian provides deep search and retrieval across the PAI knowledge base, helping you locate past solutions, related code, and project context quickly.

Core Features & Use Cases

  • Concept Search: Rapidly locate ideas or patterns across History and Skills.
  • Context Retrieval: Pull relevant background for onboarding or troubleshooting.
  • Linkage & Reuse: Automatically relate new tasks to prior decisions.

Quick Start

  • pai run Librarian search "OAuth handling"
  • pai run Librarian context "project-x"

Frequently Asked Questions about librarian

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search across my project history and past solutions?

Search your knowledge base by running indexed queries across History, Skills, and Memory. Librarian builds a local index using keyword matching and returns the top 5 most relevant results with relevance scores, letting you quickly locate past decisions, code patterns, and project context without manual browsing.

Can I find related code and conceptually similar solutions from previous work?

Yes. Librarian performs weighted keyword matching across your indexed knowledge base to surface conceptually related code, prior implementations, and linked decisions. It filters noise from system directories and ranks results by relevance, making it easy to discover reusable patterns and avoid duplicating effort.

What search methods does Librarian use to index my knowledge base?

Librarian builds a local index using ripgrep if available for speed, otherwise falls back to Python's os.walk for filesystem traversal. It applies weighted keyword matching against indexed content, filters common noise directories, and returns ranked results so retrieval is both fast and accurate.

Does Librarian work with large project histories and multiple domains?

Yes. Librarian indexes across History, Skills, and Memory domains simultaneously, handling searches that span multiple knowledge sources. The weighted ranking system scales to large histories and returns the top 5 results, so you get the most relevant matches even in complex, multi-domain projects.

Can I use Librarian to pull context for onboarding or troubleshooting?

Yes. Search by project name, topic, or problem type to retrieve relevant background information and prior solutions. Librarian surfaces linked decisions and contextual details from your knowledge base, making it ideal for quick onboarding, debugging, and understanding why past choices were made.