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 skills add rp1-run/rp1 --skill knowledge-buildgit clone --depth 1 https://github.com/rp1-run/rp1Wrote 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/rp1-run/rp1/knowledge-build)<a href="https://agentmods.dev/skills/rp1-run/rp1/knowledge-build"><img src="https://agentmods.dev/badge/skills/rp1-run/rp1/knowledge-build/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/rp1-run/rp1/knowledge-build"><img src="https://agentmods.dev/badge/skills/rp1-run/rp1/knowledge-build.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.00025 | $0.03063 |
| Opus 5.5 | $0.00010 | $0.01225 |
| Sonnet 5.5 | $0.00005 | $0.00613 |
| Haiku 4.5 | $0.00003 | $0.00306 |
Grade A, and why
knowledge-build 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 — 335 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Knowledge Build
§ROLE: KB orchestrator. Update kbRoot, not workRoot.
§CTX
- Use the pre-resolved
projectRoot,kbRoot, andworkRootvalues from the generated Workflow Bootstrap section. - KB outputs live under
kbRoot:index.mdconcept_map.mdarchitecture.mdinteraction-model.mdmodules.mdpatterns.mdfeatures.mdstate.jsonmeta.json
index.mdis orchestrator-owned. Never delegate it.state.jsonis shareable.meta.jsonis local-only and SHOULD be gitignored.- Exclude these paths from change scope and file hygiene:
node_modules/,.git/,build/,dist/,cli/dist/,target/,.next/,__pycache__/,vendor/,.venv/,.rp1/context/
§DO
- Execute immediately. No approval loop.
- Single pass. No refinement loop.
- Treat this as an orchestrator, not a wrapper.
FULLmeans wide evidence collection, not blank-slate regeneration.- When prior KB exists, section agents MUST reconcile against it, even in
FULL. - Section agents MUST also treat prior KB as incomplete and perform one explicit novelty scan for material knowledge absent from it.
- Replace all placeholders with concrete values before dispatching child agents.
- Spawn the 6 analysis agents in one parallel batch.
- Wait patiently for child agents on the critical path. Do not declare them stalled after a short wait.
- Keep user-visible output terse:
- Initial status line
- Sparse progress only when useful
- Final report or fatal error
§PROC
1. Detect Mode
- Use the pre-resolved directories. Create
kbRootif missing. - If
FEATURE_IDis non-empty:- Set
MODE=FEATURE_LEARNING. - Search, in order:
{workRoot}/archives/features/{FEATURE_ID}{workRoot}/features/{FEATURE_ID}
- If neither exists: report the checked paths, stop.
Read:requirements.mddesign.mdfield-notes.mdif presenttasks.md
- Extract
FILES_MODIFIEDfromtasks.mdimplementation summaries. Accept patterns like**Files**:and**Files Modified**:. - If
FILES_MODIFIEDis empty: explain that feature learning needs a concrete file scope, stop. - Build
FEATURE_CONTEXTwith:- feature id
- feature path
- summarized requirements
- architectural decisions
- discoveries from field notes
- implementation patterns
files_modified
- Set:
FILE_SCOPE=FILES_MODIFIEDFILE_DIFFS={}INITIAL_MESSAGE=Feature learning build for {FEATURE_ID}
- Set
- Else use git-driven mode:
- Read
{kbRoot}/state.jsonif it exists. - Get
CURRENT_COMMITviagit rev-parse HEAD. - If no
state.json:- Set
MODE=FULL FILE_SCOPE=[]FILE_DIFFS={}INITIAL_MESSAGE=First-time KB generation with parallel analysis (10-15 min)
- Set
- Else read:
OLD_COMMIT=state.json.git_commitREPO_TYPE=state.json.repo_type // "single-project"repo_root+current_project_pathfrom{kbRoot}/meta.json- Fallback: use
state.jsonfor those local fields only ifmeta.jsonis absent
- If
OLD_COMMIT == CURRENT_COMMIT:- Output
KB is up-to-date (commit {CURRENT_COMMIT}). No regeneration needed.and stop
- Output
- Build scoped changed-file list:
- If
REPO_TYPE=monorepo, run diff fromrepo_rootand filter tocurrent_project_pathunless it is.or empty - Else diff the current repo normally
- Drop excluded paths and obviously irrelevant binary/media files
- If
- If scoped change list is empty:
- Update only
git_commitinstate.json - Keep all other fields unchanged
- Output
No in-scope changes. Updated commit reference ({OLD_COMMIT} -> {CURRENT_COMMIT}).and stop
- Update only
- Preserve the full scoped changed-file list as the evidence frontier in both
FULLandINCREMENTAL. - Count changed files:
> 50->MODE=FULL<= 50->MODE=INCREMENTAL
- If
MODE=FULL:INITIAL_MESSAGE=Large change set ({N} files). Wide reconcile (10-15 min)FILE_SCOPE=<scoped changed files>- Build
FILE_DIFFSaspath -> git diff OLD_COMMIT CURRENT_COMMIT -- path
- If
MODE=INCREMENTAL:INITIAL_MESSAGE=Changes detected since last build ({OLD_COMMIT} -> {CURRENT_COMMIT}). Analyzing {N} changed files (2-5 min)FILE_SCOPE=<scoped changed files>- Build
FILE_DIFFSaspath -> git diff OLD_COMMIT CURRENT_COMMIT -- path
- Read
- Print
INITIAL_MESSAGE.
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 · 335 lines · 25 tokens per session scan A c339e1c2663d
knowledge-build is a skill published in the GitHub repository rp1-run/rp1 (38 stars, last pushed today), licensed Apache-2.0. It adds 25 tokens to every session and 3,063 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
contextpilot
Optimize document ordering in LLM context for better retrieval performance.
oracle-grill-me
Grill the user relentlessly about a plan, decision, or idea, maintaining the project's domain model (CONTEXT.md, ADRs) as decisions crystallise. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
pi-prompting
Internal guidance for composing prompts that Pi runs (DeepSeek by default) handle reliably for coding, review, diagnosis, and research tasks.
oracle-domain-modelling
Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.
claude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude…
redis-development
Redis performance optimization and best practices. Use this skill when working with Redis data structures, Redis Query Engine (RQE), vector search with RedisVL, semantic caching with LangCache, or optimizing Redis performance.