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 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 — 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.
- 1mo 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 4mo 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.
Other skills, from other repositories
rag-architecture
Build retrieval-augmented generation systems that ground LLMs in your data.
memory-systems
This skill should be used for persistent semantic memory in agent systems: cross-session knowledge retention, entity tracking, temporal validity, graph or vector retrieval, memory consolidation, and memory benchmark selection. Route file-backed scratchpads to filesystem-context, handoff summaries to…
graphify
Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community…
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.
llmwiki
Build and use a persistent, citation-traceable knowledge wiki from documents, research papers, notes, or project documentation. Use for llmwiki projects, retrieving reusable evidence for an agent task, or compiling a corpus for repeated questions. A one-off file read or live web search does not need a wiki.
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.