knowledge-priming-refiner

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

A guided process for creating a project knowledge-base document for an AI coding assistant. The document records the project's identity, technology, architecture, structure, and trusted sources.

In plain words
What is it for?
Use it to onboard an AI assistant, set up a new project, or create or revise .lattice/standards/knowledge-base.md.
Why use it?
It gives future coding work reliable project context instead of leaving the assistant to guess from generic practices. This can reduce mismatches with the repository's actual conventions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

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-refiner
Any agent
npx skills add techygarg/lattice --skill knowledge-priming-refiner
Clone the repo
git clone --depth 1 https://github.com/techygarg/lattice

Made for: Claude Code.

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-refiner

README.md
[![agentmods](https://agentmods.dev/badge/skills/techygarg/lattice/knowledge-priming-refiner.svg)](https://agentmods.dev/skills/techygarg/lattice/knowledge-priming-refiner)
Your own site
<a href="https://agentmods.dev/skills/techygarg/lattice/knowledge-priming-refiner"><img src="https://agentmods.dev/badge/skills/techygarg/lattice/knowledge-priming-refiner.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,672 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.1 $0.00084 $0.01672
Opus 5 $0.00042 $0.00836
Sonnet 5 $0.00017 $0.00334
Haiku 4.5 $0.00008 $0.00167

Measured 6d ago against content hash 75d2ef848df6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

knowledge-priming-refiner 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 6d 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.

skills/knowledge-priming-refiner/SKILL.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Knowledge Priming Refiner

Purpose

This refiner facilitates a structured conversation to create a project-specific knowledge base document. The document captures the project's identity -- its tech stack, architecture, directory layout, and the trusted sources that shaped how the team works. Think of it as answering one question: "What does AI need to know about this project to avoid defaulting to generic internet patterns?"

This is not about how to write good code -- that is handled by the clean-code atom (coding principles), architecture atom (structural rules), and domain-driven-design atom (domain modeling). Knowledge priming covers what those skills cannot know: which framework, which version, which docs to trust, and how the repo is organized.

What This Produces

  • Output: .lattice/standards/knowledge-base.md (or custom path from .lattice/config.yaml -> paths.knowledge_base)
  • Mode: Override is the standard approach -- every project's knowledge base is unique, so there are no generic defaults to overlay on. Overlay mode is available for selective revisions of an existing document.
  • Config key: paths.knowledge_base in .lattice/config.yaml
  • Template: Read ./assets/template.md for the full document structure and interview guidance comments
  • Consumed by: The knowledge-priming atom loads this document via config resolution and provides it as ambient project context to all skills and molecules

Scope Boundary

Knowledge priming captures project identity and technical context. It deliberately excludes concerns covered by other skills:

Concern Where It Belongs Not In Knowledge Priming
Language idioms (error handling, type system, naming, testing patterns, DI) language-idioms document No language-level patterns or idioms
Coding style, naming principles, function design clean-code atom No code examples, no naming rules
Architectural layers, dependency direction architecture atom No structural rules
Domain modeling, aggregate design domain-driven-design atom No DDD patterns
Code-level anti-patterns (god functions, deep nesting) clean-code atom No coding anti-patterns

Read the full file on GitHub · 118 lines

Files

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.

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. 6d ago First seen · 118 lines · 84 tokens per session scan A 75d2ef848df6

Subscribe to this mod's changes

knowledge-priming-refiner is a skill published in the GitHub repository techygarg/lattice (185 stars, last pushed yesterday), licensed MIT. It adds 84 tokens to every session and 1,672 once invoked, about $0.0004 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

learn-from-fix

Capture Elixir/Ecto/LiveView lessons and Hex API rules. Use after corrections or when asked to document learning, record a lesson, prevent a fixed mistake, or remember package guidance with --library.

oliver-kriska/claude-elixir-phoenix · 46 tokens

compound

Capture solved problems as searchable solution docs. Use after fixing bugs, when "that worked", or after successful /phx:review or /phx:investigate.

oliver-kriska/claude-elixir-phoenix · 36 tokens

recall

Recall prior work from past sessions — how a bug was fixed, what was decided, where a pattern lives. Use when asked 'have we done this before' or 'how did I fix X' in Elixir/Phoenix work. ccrider MCP when available, else git + solution docs.

oliver-kriska/claude-elixir-phoenix · 64 tokens

assigns-audit

Inspect LiveView socket assigns for memory bloat — missing temporaryassigns, unused assigns, unbounded lists needing streams, memory estimates. Use when LiveView memory grows or you need to add temporaryassigns.

oliver-kriska/claude-elixir-phoenix · 47 tokens

compound-docs

Searchable Elixir/Phoenix/Ecto solution documentation system with YAML frontmatter. Builds institutional knowledge from solved problems. Use when consulting past solutions before investigating new issues.

oliver-kriska/claude-elixir-phoenix · 38 tokens

name-your-business

Generate, refine, compare, and when needed validate distinctive names for startups, AI products, developer tools, protocols, open-source projects, apps, product families, local businesses, services, companies, nonprofits, and other organizations. Use when asked to name or rename a business, brand, product, venture…

tamdogood/builder-essential-skills · 156 tokens