knowledge-priming

knowledge-priming is a skill for Claude Code, Codex from techygarg/lattice. It costs 111 tokens per session (591 once invoked), scanned A, original, MIT.

A workflow for loading project-specific information such as the technology stack, architecture, folder layout, trusted sources, and coding conventions. It reads the configured knowledge-base document when one exists.

In plain words
What is it for?
Use it before project design, implementation, or review when the repository has a knowledge-base document or its technical context needs to be identified.
Why use it?
It prevents coding work from relying only on generic assumptions about an unfamiliar project. If no knowledge base exists, it reports that and continues with general assumptions.

Skill for Claude CodeCodex

Part of the lattice plugin — 33 skills, 2 agents shipped together

Install

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.

agentmods
npx agentmods add skills/techygarg/lattice/knowledge-priming
Any agent
npx skills add techygarg/lattice --skill knowledge-priming
Clone the repo
git clone --depth 1 https://github.com/techygarg/lattice

Made for: Claude Code, Codex.

Or install lattice, the plugin that ships this one along with the rest of its 33 skills, 2 agents.

Wrote 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.

agentmods badge for knowledge-priming

README.md
[![agentmods](https://agentmods.dev/badge/skills/techygarg/lattice/knowledge-priming.svg)](https://agentmods.dev/skills/techygarg/lattice/knowledge-priming)
Your own site
<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>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 591 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 4d ago against content hash 5eff15f6079a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

plugins/lattice/skills/knowledge-priming/SKILL.md · 49 lines

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

  1. Look for .lattice/config.yaml in the repo root.
  2. If found, check paths.knowledge_base for a custom document path.
  3. If a document exists at that path, read the full document.
  4. STOP: Apply the loaded document as ambient context before any design, implementation, or review work begins.
  5. 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".
  6. If there is no config file or no paths.knowledge_base key → 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.md manually and reference it in .lattice/config.yaml under paths.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

Read the full file on GitHub · 49 lines

Changes

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.

  1. 4d ago First seen · 49 lines · 111 tokens per session scan A 5eff15f6079a

Subscribe to this mod's changes

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.

Related

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…

backchainai/backchain-plugins · 107 tokens

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…

backchainai/backchain-plugins · 97 tokens

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.

mjunaidca/mjs-agent-skills · 35 tokens

memory-consolidate

Consolidate L1 memory atoms into L2 scene blocks and L3 persona. Invoked by the memory-consolidator agent, or manually via /memory-consolidate.

baodq97/tencentdb-agent-memory · 41 tokens

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…

baodq97/tencentdb-agent-memory · 92 tokens

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.

baodq97/tencentdb-agent-memory · 0 tokens