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.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.1 | $0.00025 | $0.03063 |
| Opus 5 | $0.00013 | $0.01532 |
| Sonnet 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 8d 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.
- 8d 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 yesterday), licensed Apache-2.0. It adds 25 tokens to every session and 3,063 once invoked, about $0.0001 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
refine
Transform a brief or prompt into a structured, production-ready prompt via prompt-optimizer. File or text mode.
contextpilot
Optimize document ordering in LLM context for better retrieval performance.
prompt-optimization
Improves LLM-facing context while preserving intent, execution boundaries, and proportional work. Use when creating or reviewing prompts, agent definitions, skill definitions, or other instructions for an LLM.
recipe-eval-prompt
Compares original and optimized prompts through repeated blind paired execution in git worktrees. Use when evaluating prompt improvement effects or learning prompt engineering through concrete examples.
pi-prompting
Internal guidance for composing prompts that Pi runs (DeepSeek by default) handle reliably for coding, review, diagnosis, and research tasks.
local-vram-orchestrator
SRE guidelines and code patterns for VRAM optimization and serialization of local models (LLM, TTS, Whisper, Stable Diffusion, CLIP) on consumer GPUs with limited video memory (e.g. 6GB RTX 4050). Use when running multiple heavy models on one GPU, debugging CUDA out-of-memory (OOM) errors, designing a task queue that…