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/techygarg/lattice/knowledge-primingnpx skills add techygarg/lattice --skill knowledge-priminggit clone --depth 1 https://github.com/techygarg/latticeWrote 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/techygarg/lattice/knowledge-priming)<a href="https://agentmods.dev/skills/techygarg/lattice/knowledge-priming"><img src="https://agentmods.dev/badge/skills/techygarg/lattice/knowledge-priming.svg" alt="Measured on agentmods" 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 | $0.00111 | $0.00591 |
| Opus 5 | $0.00056 | $0.00296 |
| Sonnet 5 | $0.00022 | $0.00118 |
| Haiku 4.5 | $0.00011 | $0.00059 |
Grade A, and why
knowledge-priming 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 4d 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 — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Knowledge Priming
Config Resolution
- Look for
.lattice/config.yamlin the repo root. - If found, check
paths.knowledge_basefor a custom document path. - If a document exists at that path, read the full document.
- STOP: Apply the loaded document as ambient context before any design, implementation, or review work begins.
- If a path is configured but no document exists at it → tell the user which configured path is missing, then see "When No Document Exists".
- If there is no config file or no
paths.knowledge_basekey → see "When No Document Exists".
When No Document Exists
Inform the user:
No project knowledge base found. AI skills will operate from generic assumptions about tech stack, architecture, and conventions.
To create one, trigger knowledge-priming-refiner — a guided interview (~10 questions) producing a concise document (~50 lines).
You can also create
.lattice/standards/knowledge-base.mdmanually and reference it in.lattice/config.yamlunderpaths.knowledge_base.
Do not block. Continue without the knowledge base.
What the Document Contains
| # | Section | What It Captures |
|---|---|---|
| 1 | Architecture Overview | App type, major components, how they interact |
| 2 | Tech Stack and Versions | Specific technologies with version numbers, including "not X" clarifications |
| 3 | Curated Knowledge Sources | Official docs, trusted blogs, internal references (5–10 max) |
| 4 | Project Structure | Directory layout showing where things live |
| 5 | Project Conventions | Project-specific conventions other skills cannot infer from code |
Scope Boundary
| Concern | Owned By |
|---|---|
| Coding style, naming principles, function design | clean-code atom |
| Architectural layers, dependency direction | architecture atom |
| Domain modeling, aggregate design | domain-driven-design atom |
| Input validation, injection prevention | secure-coding atom |
| Test structure, assertion quality | test-quality atom |
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.
- 4d ago First seen · 49 lines · 111 tokens per session scan A 5eff15f6079a
knowledge-priming is a skill published in the GitHub repository techygarg/lattice (183 stars, last pushed 5d ago), licensed MIT. It adds 111 tokens to every session and 591 once invoked, about $0.0006 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
consolidate
Audit knowledge directories (.memory/, docs/, staging/, archive/) and Claude Code auto memory for stale, misplaced, or duplicated content. Generates an editable cleanup plan file, then executes approved actions after review. Use when: periodic knowledge cleanup, after project milestones, files feel scattered or…
working
Manage ephemeral .memory/ conversation state across multi-day sessions. Checkpoint todos, decisions, and questions; promote artifacts to permanent knowledge; clean up after promotion. Use when: the user says 'checkpoint', 'save working memory', 'promote working memory', 'clean up memory', wants to persist conversation…
memory-systems
Design and implement memory architectures for agent systems. Use when building agents that need to persist state across sessions, maintain entity consistency, or reason over structured knowledge.
memory-consolidate
Consolidate L1 memory atoms into L2 scene blocks and L3 persona. Invoked by the memory-consolidator agent, or manually via /memory-consolidate.
tmem-cli
Inspect/manage the local memory store via the tmem CLI — counts, keyword/hybrid search, view persona, list/open scenes (tmem scene ), recent changes, sync vectors, thresholds, and cross-project search (tmem search --all, tmem projects). Trigger on "how many memories", "show my persona", "what scenes exist", "search…
memory-view
Open the memory visualiser in the browser — a health check on the memory store: is it working, what is wrong, and what to run to fix it. Run manually via /memory-view.