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.02521 |
| 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 Changed 0d7c01e9a2ce
- 3mo 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 (19 stars, last pushed 5d ago), licensed MIT. It adds 96 tokens to every session and 2,521 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.
knowledge-ingest compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| knowledge-ingestkeshrath/agent-knowledge | Skill | 19 | 5d ago | MIT | A | 96 | Claude Code |
| mybrain-overviewrobertsfeir/mybrain | Skill | 1 | 6mo ago | Apache-2.0 | A | 46 | Claude Code |
| llm-wikiAr9av/obsidian-wiki | Skill | 3.8k | today | MIT | A | 41 | Claude Code |
| wegent-knowledgewecode-ai/Wegent | Skill | 897 | today | Apache-2.0 | A | 60 | Claude Code, Codex |
| karpathy-llm-wikiAstro-Han/karpathy-llm-wiki | Skill | 2.9k | 4mo ago | MIT | A | 67 | Claude Code, Codex |
| kb-memoryfish827-08/rag-kb | Skill | 5 | 21d ago | Apache-2.0 | A | 112 | Claude Code, Codex |
| rag-evalLucasSantana-Dev/hitgate | Skill | 4 | 20d ago | MIT | A | 0 | Claude Code, Codex |