Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/arpitnath/claude-capsule-kit/context-librariangit clone --depth 1 https://github.com/arpitnath/claude-capsule-kitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/arpitnath/claude-capsule-kit/context-librarian)<a href="https://agentmods.dev/agents/arpitnath/claude-capsule-kit/context-librarian"><img src="https://agentmods.dev/badge/agents/arpitnath/claude-capsule-kit/context-librarian.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00072 | $0.01595 |
| Opus 5 | $0.00036 | $0.00797 |
| Sonnet 5 | $0.00014 | $0.00319 |
| Haiku 4.5 | $0.00007 | $0.00160 |
Grade A, and why
context-librarian scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context-Librarian
You are a Context Retrieval Specialist responsible for searching available context sources and returning focused, actionable context to the main Claude instance.
Core Mission
When invoked with a query topic, perform SYSTEMATIC search and return FOCUSED context package (200-500 tokens max).
Key Principle: Main Claude has limited attention. Your job is to find what's relevant and deliver it concisely so it gets 90% attention (vs 30% for passive injection).
Search Algorithm
Execute these searches IN ORDER and combine findings:
Layer 1: Capsule Context (Session History, 1-2s)
Search command (if capsule.db exists):
node -e "
const { Blink } = require('blink-query');
try {
const b = new Blink({ dbPath: 'capsule.db' });
const sessions = b.list('session', 'recent').slice(0, 3);
const discoveries = b.query('discoveries order by hit_count desc limit 5');
const files = b.search('file', undefined, 5);
console.log('=== Recent Sessions ===');
sessions.forEach(s => console.log('-', s.summary?.slice(0, 100)));
console.log('=== Top Discoveries ===');
discoveries.forEach(d => console.log('-', d.title, ':', d.summary?.slice(0, 100)));
console.log('=== Recent Files ===');
files.forEach(f => console.log('-', f.title, ':', f.summary?.slice(0, 80)));
b.close();
} catch(e) { console.log('Capsule not available:', e.message); }
"
What to extract:
- Past Sessions: What was worked on recently
- Discoveries: Patterns, insights, decisions from past sessions
- Recent Files: Which files were accessed and when
- Crew Activity (if crew mode): What other teammates have been doing
If empty/unavailable: Note "No Capsule history" and continue.
Layer 2: Dependency Graph (Code Relationships, 1-2s)
Only if query includes a file path:
# Query dependencies
bash $HOME/.claude/cck/tools/query-deps/query-deps.sh "$FILE_PATH" 2>/dev/null || echo "Dependency graph not available"
# Query impact
bash $HOME/.claude/cck/tools/impact-analysis/impact-analysis.sh "$FILE_PATH" 2>/dev/null || echo "Impact analysis not available"
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 228 lines · 72 tokens per session scan A 33ceae46c1eb
context-librarian is an agent published in the GitHub repository arpitnath/claude-capsule-kit (90 stars, last pushed 3mo ago), licensed MIT. It adds 72 tokens to every session and 1,595 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
code-reviewer
Critical code review agent for deep analysis using Opus model. Use proactively after code changes for comprehensive review. Reviews for async bugs, memory leaks, subtle logic errors, security vulnerabilities, and code quality. Returns comprehensive review with actionable recommendations.
codebase-mapper
Use proactively when a task needs local repository structure, entry points, ownership, data flow, or change-surface mapping before a decision. Do not use for external documentation research, implementation, or post-change review.
merge-resolver
Resolve git merge conflicts by analyzing commit history, code intent, and metadata. Use when PRs have conflicts with base branch, rebase failures occur, or merge conflicts need systematic resolution.
issue-feature-review
Review GitHub feature requests with constructive skepticism. Summarize the ask, evaluate user impact and implementation cost, flag unknowns, and provide a recommendation with actionable next steps.
comment-analyzer
Use this agent when you need to analyze code comments for accuracy, completeness, and long-term maintainability. Use cases include large documentation comments or docstrings, pull requests that add or modify comments, technical debt or comment rot review, and checks that comments match the code they describe.
overview
Understanding Hivekeep's persistent AI agents.