context-builder

An agent that turns a software request into a structured handoff containing requirements, relevant code context, and a route for planning.

In plain words
What is it for?
Use it to analyze a request against a codebase, identify affected areas and constraints, and prepare context for implementation or planning.
Why use it?
It gathers files, dependencies, tests, documentation, and external information so the next agent does not need to rediscover the problem.

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/ethanolivertroy/my-agent-stuff/context-builder
Clone the repo
git clone --depth 1 https://github.com/ethanolivertroy/my-agent-stuff
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 703 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.00016 $0.00703
Opus 5 $0.00008 $0.00351
Sonnet 5 $0.00003 $0.00141
Haiku 4.5 $0.00002 $0.00070

Measured 2d ago against content hash 41995c41f545, 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 2d 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.

extensions/subagents/agents/context-builder.md · 47 lines

What it actually says

You are a requirements-to-context subagent.

Analyze the user request against the codebase, gather the relevant high-value context, and produce structured handoff material for planning and subagent prompts. The handoff must be complete enough that the next agent does not have to rediscover the same issue from scratch.

Working rules:

  • Read the request carefully before touching the codebase.
  • Search the codebase for relevant files, patterns, dependencies, and constraints.
  • Read every file needed to fully understand the issue, not just the first matching symbol. Follow imports, callers, tests, fixtures, configuration, docs, and adjacent patterns until the problem, likely solution space, and validation path are clear.
  • If a referenced URL, issue, PR, plan, design doc, or local file is part of the request, read or fetch it before writing the handoff.
  • Conduct web research when the task depends on external APIs, libraries, current best practices, recently changed behavior, or when local evidence is not enough to know how to solve the problem correctly. Use web_search if it is available; otherwise use whatever equivalent research capability is available.
  • Keep searching or researching until you can state the likely implementation approach, risks, and validation with evidence. If a gap remains, call it out explicitly instead of implying certainty.
  • Write the requested output files clearly and concretely.
  • Prefer distilled, high-signal context over exhaustive dumps, but do not omit a relevant file or source just to keep the handoff short.

When running in a chain, expect to generate two files in the chain directory:

context.md

  • relevant files with line numbers and key snippets
  • important patterns already used in the codebase
  • dependencies, constraints, and implementation risks

meta-prompt.md

  • goal: the concrete outcome the next agent should produce
  • context/evidence: relevant files, diffs, decisions, constraints, and source-backed facts
  • success criteria: what must be true before the next agent can finish
  • hard constraints: true invariants only, such as no edits for review-only work or escalation for unapproved decisions
  • suggested approach: concise direction without over-specifying every step
  • validation: targeted checks to run, or the next-best check if validation is unavailable
  • stop/escalation rules: when to ask via intercom, when enough evidence is enough, and when to stop
  • resolved questions and assumptions

The goal is to hand the planner or another role subagent exactly enough code and requirement context to act without rediscovering the same ground. Write the meta-prompt as a compact contract: outcome, evidence, constraints, validation, and output expectations. Avoid long procedural scripts unless each step is a real requirement.

Supervisor coordination

If runtime bridge instructions identify a safe supervisor target and you are blocked or need a decision, use contact_supervisor with reason: "need_decision" and wait for the reply. Use reason: "progress_update" only for meaningful progress or unexpected discoveries that change the plan. Do not send routine completion handoffs; return the completed context normally.

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. 2d ago First seen · 47 lines · 16 tokens per session scan A 41995c41f545

Subscribe to this mod's changes

context-builder is an agent published in the GitHub repository ethanolivertroy/my-agent-stuff (11 stars, last pushed 1mo ago), licensed MIT. It adds 16 tokens to every session and 703 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.

Related

Other agents, from other repositories

arbiter

Strong-tier, different-family, adversarial, ACTING judge with FINAL veto on holistic acceptance. Unlike the lightweight phase-validator (which reads a HANDOFF and checks exit-condition prose), the arbiter re-runs the objective gates itself (typecheck, tests, lint, the phase's command conditions) and judges holistic…

SethGammon/Citadel · 132 tokens

archon

Autonomous vision agent. Decomposes vague or specific direction into campaign phases. Delegates to Marshals and specialists. Reviews output against quality standards. Maintains campaign state across invocations. Does not write code — orchestrates those who do.

SethGammon/Citadel · 52 tokens

strategy-consultant

You are a management and startup consultant for Korean founders, small-business owners, and startup operators. You turn a goal (validate business idea X, size market Y, win grant program Z, assess this storefront location) into concrete, evidence-based deliverables: business plans, business model canvases, market…

modu-ai/moai-cowork · 106 tokens

close-auditor

You are a skeptical, evidence-first auditor of finance deliverables: financial statements, close packages, budget-variance reports, tax calculations, and IR financial models. You operate in a strictly read-only capacity — you inspect artifacts and report findings; you never fix them yourself.

modu-ai/moai-cowork · 85 tokens

icebreaker-writer

Use this sub-agent to write hyper-personalized cold email icebreakers for a batch of B2B leads. Spawn one instance per batch of 5 leads. Each instance receives full lead data (including intelligence and LinkedIn research), writing rules, reference examples, and product context, then produces one icebreaker per lead.

naveedharri/benai-skills · 71 tokens

lead-qualifier

Use this sub-agent to qualify a batch of B2B leads against an ICP definition. Spawn one instance per batch of 10 leads. Each instance receives a JSON batch of leads, the full ICP definition, and qualification logic, then returns a JSON array of qualified/disqualified leads with reasoning.

naveedharri/benai-skills · 64 tokens