Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/keshrath/agent-knowledgenpx agentmods add skills/keshrath/agent-knowledge/knowledge-ingestWrote 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/skills/keshrath/agent-knowledge/knowledge-ingest)<a href="https://agentmods.dev/skills/keshrath/agent-knowledge/knowledge-ingest"><img src="https://agentmods.dev/badge/skills/keshrath/agent-knowledge/knowledge-ingest/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/keshrath/agent-knowledge/knowledge-ingest"><img src="https://agentmods.dev/badge/skills/keshrath/agent-knowledge/knowledge-ingest.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00096 | $0.02519 |
| Opus 5.5 | $0.00038 | $0.01008 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (18 stars, last pushed 18d ago), licensed MIT. It adds 96 tokens to every session and 2,519 once invoked, about $0.0004 per session on Opus 5.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-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.
llm-wiki
Explain and apply the foundational LLM Wiki architecture and knowledge-management strategy. Use for setup, architecture, schema, or organization decisions; operational ingest/query/lint work uses dedicated skills.
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'.
rag-eval
Run the retrieval regression gate against the current repo state and report whether a recent change helped, hurt, or held steady.
knowledge-base-interop
Two-layer knowledge architecture — curate in LLM Wiki, search in Astra KB. Covers input classification, source-to-wiki ingestion, wiki-to-KB export (batch + realtime), semantic chunking, SAG extraction, health checks, and multi-format export.