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 skills/keshrath/agent-knowledge/knowledge-ingestnpx skills add keshrath/agent-knowledge --skill knowledge-ingestgit clone --depth 1 https://github.com/keshrath/agent-knowledgeWhat 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.00096 | $0.02519 |
| Opus 5 | $0.00048 | $0.01260 |
| Sonnet 5 | $0.00019 | $0.00504 |
| Haiku 4.5 | $0.00010 | $0.00252 |
Grade A, and why
knowledge-ingest 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 2d 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 — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.
knowledge-ingest
Populate or update agent-knowledge from a codebase. Tree-sitter extracts structure (zero LLM tokens), then the agent distills clusters into knowledge entries + graph edges via existing MCP tools.
First run: full ingest — scans all files, creates entries from scratch.
Subsequent runs: incremental — only reprocesses files whose SHA256 changed, adds entries for new files, removes entries for deleted files. The .knowledge-ingest-cache.json file in the target directory tracks state between runs.
When to use
- Onboarding a new project — bootstrap the knowledge base so future sessions have context
- After a refactor — re-run to update subsystem boundaries and relationships
- Periodic refresh — re-run after significant changes to keep knowledge current
- Importing documentation — PDFs, architecture diagrams, or external URLs
When NOT to use
- Single-file changes — just write a knowledge entry manually
- No code changes since last ingest — the cache will skip everything anyway (fast no-op)
Procedure
Phase 0 — Validation
- Confirm the target path exists and is a directory.
- Detect project name:
- Check
package.json→namefield - Check
Cargo.toml→[package] name - Check
go.mod→moduleline - Check
pyproject.toml→[project] name - Fall back to directory basename
- Check
- Check for
.knowledge-ingest-cache.jsonin the target directory. If found, load it — this is an incremental run. Report how many files changed since last ingest.
Phase 1 — Structural Extraction (zero tokens)
- Locate the tree-sitter extraction script. It ships with agent-knowledge:
node "<agent-knowledge-repo>/scripts/tree-sitter-extract.mjs" "<target-path>" --exclude "node_modules,dist,.git,vendor,__pycache__,build,target,.venv,coverage" --json
To find <agent-knowledge-repo>, check common locations:
~/.claude/mcp-servers/agent-knowledge/- Or locate via:
dirname $(which agent-knowledge)/../
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2d ago First seen · 225 lines · 96 tokens per session scan A 240e21a406c8
knowledge-ingest is a skill published in the GitHub repository keshrath/agent-knowledge (15 stars, last pushed 4mo ago), licensed MIT. It adds 96 tokens to every session and 2,519 once invoked, about $0.0005 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 skills, from other repositories
mybrain-setup
Use when users want to install or set up MyBrain -- a personal knowledge base with semantic search. Install is always per-project (local MCP scope); the only user-facing choice is which database backend to connect to (Bundled, Docker, Native, or RDS). Detects and offers to remove deprecated user/project/plugin-scoped…
mybrain-overview
Use when users ask about MyBrain, what it does, how it works, what tools are available, or how to use the personal knowledge base. Covers architecture, tools, deployment modes, and usage.
nemotron-retrieval-recipes
Use when planning, debugging, tuning, evaluating, exporting, or deploying public Nemotron embed/rerank retrieval recipes.
wegent-knowledge
Knowledge base management and search tools for Wegent. Provides capabilities to list, create, update, and search knowledge bases and documents using RAG retrieval. Use this skill when the user wants to manage knowledge bases, documents, or search for information programmatically.
karpathy-llm-wiki
Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki quality, 'add to wiki', 'what do I know about', or any mention of 'LLM wiki' or 'Karpathy wiki'.
qdrant-clients-sdk
Qdrant provides client SDKs for various programming languages, allowing easy integration with Qdrant deployments.