context-builder

A project-documentation assistant that creates or updates a three-level set of context documents for a codebase. The levels provide a short overview first, followed by progressively more detailed project knowledge.

In plain words
What is it for?
Use it to initialise, update, or validate project context documentation, including an AGENT.md file, a knowledge base, and detailed documents.
Why use it?
It gives coding agents consistent project background while limiting how much documentation they need to read at once.

Agent

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 agents/hamr0/agentic-toolkit/context-builder
Clone the repo
git clone --depth 1 https://github.com/hamr0/agentic-toolkit
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,375 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00009 $0.01375
Opus 5 $0.00005 $0.00687
Sonnet 5 $0.00002 $0.00275
Haiku 4.5 $0.00001 $0.00137

Measured yesterday against content hash 4360752f97e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

context-builder 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 yesterday.

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.

Origin

This is a copy

100% identical to context-builder — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

ai/subagentic/ampcode/agents/context-builder.md · 145 lines

How it starts

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

You are a Context Initialization Specialist. Create a 3-tier progressive disclosure documentation system that minimizes token waste.

Invocation Modes

Mode Trigger Description
Init *init Full setup: scan → create all tiers
Update *update Update existing tiers, preserve structure
Validate *validate Check limits and anti-patterns only

Commands

Command Description
*help Show available commands
*exit Exit persona

Workflow Visualization

digraph ContextBuilder {
  rankdir=TB;
  node [shape=box, style=filled, fillcolor=lightblue];

  start [label="START", fillcolor=lightgreen];
  determine_mode [label="Mode?", shape=diamond];

  // Scan phase
  scan [label="Scan existing docs\n& project type"];
  exists [label="AGENT.md\nexists?", shape=diamond];

  // Update path
  read_existing [label="Read existing\nAGENT.md"];
  merge_update [label="Merge updates\npreserve structure"];
  update_tiers [label="Update Tier 2/3\nif needed"];

  // Create path
  create_t3 [label="Create Tier 3\ndocs/*.md"];
  create_t2 [label="Create Tier 2\nKNOWLEDGE_BASE.md"];
  create_t1 [label="Create Tier 1\nAGENT.md"];

  // Validation
  validate [label="Validate limits\n& anti-patterns"];
  pass [label="Pass?", shape=diamond];
  emergency [label="Compress content", fillcolor=yellow];
  attempts [label="3+ attempts?", shape=diamond];
  halt [label="HALT\nManual fix needed", fillcolor=red];
  done [label="DONE", fillcolor=lightgreen];

  start -> determine_mode;
  determine_mode -> scan [label="init"];
  determine_mode -> scan [label="update"];
  determine_mode -> validate [label="validate"];

  scan -> exists;
  exists -> read_existing [label="YES"];
  exists -> create_t3 [label="NO"];

  read_existing -> merge_update;
  merge_update -> update_tiers;
  update_tiers -> validate;

  create_t3 -> create_t2;
  create_t2 -> create_t1;
  create_t1 -> validate;

  validate -> pass;
  pass -> done [label="YES"];
  pass -> emergency [label="NO"];
  emergency -> attempts;
  attempts -> validate [label="NO"];
  attempts -> halt [label="YES"];
}

Read the full file on GitHub · 145 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. yesterday First seen · 145 lines · 9 tokens per session scan A 4360752f97e8

Subscribe to this mod's changes

context-builder is an agent published in the GitHub repository hamr0/agentic-toolkit (22 stars, last pushed 2d ago), licensed Apache-2.0. It adds 9 tokens to every session and 1,375 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to context-builder, differing in 0 lines, and is treated as a copy.

Related

Other agents, from other repositories

i18n

你是一个精通 Vue3 国际化架构的前端专家(专注于 Vue3 + TypeScript + Composition API)。同时,你也是一位专业的 UI/UX 翻译专家,擅长将中文界面语言翻译为地道、简洁的英文。.

zhimaAi/chatwiki · 7 tokens

podcast-producer-agent

Takes a topic or guest and produces a complete episode package — concept, research brief, interview questions (or solo script), intro and outro scripts, ad reads, show notes, and episode descriptions — ready for the host to record.

ur-grue/autopunk-media-skills · 5 tokens

pr-crisis-response-agent

Takes a crisis situation briefing and produces a complete crisis communications package — from an immediate holding statement through full crisis statement, FAQ document, spokesperson briefing, internal staff memo, and (where appropriate) proactive media outreach and a formal press release — ready for the comms team…

ur-grue/autopunk-media-skills · 5 tokens

magazine-editor-agent

Takes a draft magazine article and produces a complete editorial package — structural diagnosis, register cleanup, copy edits, house style compliance, fact-check checklist, headline options, and pull quotes — ready for the editor to sign off before layout.

ur-grue/autopunk-media-skills · 4 tokens

youtube-channel-operator-agent

Takes a video concept — from a loose topic or a fully formed idea — and produces a complete production package: script, optimized titles, thumbnail brief, SEO description, and chapter timestamps. Everything a creator needs between "I want to make a video about X" and sitting down in front of the camera.

ur-grue/autopunk-media-skills · 5 tokens

documentary-development-agent

Takes a one-line documentary idea and produces a complete development package — logline, pitch treatment, broadcaster pitch, and festival synopses — ready to send to commissioners, funders, or festival programmers.

ur-grue/autopunk-media-skills · 4 tokens