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/Dqz00116/skill-libnpx agentmods add skills/dqz00116/skill-lib/knowledge-base-cacheWrote 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/dqz00116/skill-lib/knowledge-base-cache)<a href="https://agentmods.dev/skills/dqz00116/skill-lib/knowledge-base-cache"><img src="https://agentmods.dev/badge/skills/dqz00116/skill-lib/knowledge-base-cache/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/dqz00116/skill-lib/knowledge-base-cache"><img src="https://agentmods.dev/badge/skills/dqz00116/skill-lib/knowledge-base-cache.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.00023 | $0.02395 |
| Opus 5.5 | $0.00009 | $0.00958 |
| Sonnet 5.5 | $0.00005 | $0.00479 |
| Haiku 4.5 | $0.00002 | $0.00239 |
Grade A, and why
knowledge-base-cache 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 3mo 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 — 375 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Knowledge Base Cache Skill
Overview
A layered knowledge base system with hot/cold/warm cache tiers and intelligent Working Memory for context management. Reduces API costs through multi-tier caching while supporting unlimited knowledge scale.
When to Use
Use this skill when:
- Managing large knowledge bases that exceed context window limits
- Reducing API costs for frequent knowledge queries
- Implementing multi-tier caching (hot/cold/warm) for knowledge retrieval
- Needing intelligent context assembly with token budget management
- Requiring automatic caching with semantic retrieval capabilities
Do NOT use when:
- Simple, small knowledge bases that fit in a single context window
- One-off queries where caching overhead exceeds savings
- Only basic file storage without caching tiers is needed
Create a structured knowledge repository with layered architecture (hot/cold/warm) and intelligent context management.
Architecture Overview
┌─────────────────────────────────────────────────────────────┐
│ Application Layer │
│ Agent Core │
└──────────────────────────┬──────────────────────────────────┘
│
┌──────────────────────────▼──────────────────────────────────┐
│ Working Memory Layer │
│ • Context Assembly • Token Budget Management │
│ • Multi-Source Coordination • LRU Cache │
└─────────────┬───────────────────────────────────────────────┘
│ Standard Interface KnowledgeSource
┌─────────┼─────────┐
▼ ▼ ▼ (Reserved)
┌───────┐ ┌───────┐ ┌───────┐
│ Hot │ │ Cold │ │ Warm │
│ Cache │ │Storage│ │Vector │
│ Layer │ │ Layer │ │ Layer │
└───┬───┘ └───┬───┘ └───┬───┘
│ │ │
Context Repository Vector DB
Cache Files (Future)
Three-Tier Architecture
| Tier | Technology | Use Case | Status |
|---|---|---|---|
| 🔥 Hot | Context Cache (API) | Full document retrieval, 90% cost savings | ✅ Available |
| ❄️ Cold | Repository Files | Keyword search, browsing, discovery | ✅ Available |
| 🌡️ Warm | Vector DB | Semantic search, precise Q&A | 🔮 Planned |
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.
- 3mo ago First seen · 375 lines · 23 tokens per session scan A b518923cb488
knowledge-base-cache is a skill published in the GitHub repository Dqz00116/skill-lib (22 stars, last pushed 6mo ago), licensed MIT. It adds 23 tokens to every session and 2,395 once invoked, about $0.0001 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-base-cache compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| knowledge-base-cacheDqz00116/skill-lib | Skill | 22 | 6mo ago | MIT | A | 23 | Claude Code, Codex |
| rag-architecturefabioc-aloha/Alex_Skill_Mall | Skill | 6 | yesterday | MIT | A | 20 | Claude Code, Codex |
| memory-systemsfabioc-aloha/Alex_Skill_Mall | Skill | 6 | yesterday | MIT | A | 68 | Claude Code, Codex |
| graphifyGraphify-Labs/graphify | Skill | 156k | yesterday | Apache-2.0 | B | 76 | Claude Code |
| graphifyGraphify-Labs/graphify | Skill | 156k | yesterday | Apache-2.0 | B | 76 | Claude Code |
| llm-wikiAr9av/obsidian-wiki | Skill | 3.8k | today | MIT | A | 41 | Claude Code |
| llmwikiatomicstrata/llm-wiki-compiler | Skill | 2.3k | 3d ago | MIT | A | 66 | Claude Code, Codex |