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 Koredotcom/agents-mcp-tools --skill arch-context-budgetgit clone --depth 1 https://github.com/Koredotcom/agents-mcp-toolsWrote 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/koredotcom/agents-mcp-tools/arch-context-budget)<a href="https://agentmods.dev/skills/koredotcom/agents-mcp-tools/arch-context-budget"><img src="https://agentmods.dev/badge/skills/koredotcom/agents-mcp-tools/arch-context-budget/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/koredotcom/agents-mcp-tools/arch-context-budget"><img src="https://agentmods.dev/badge/skills/koredotcom/agents-mcp-tools/arch-context-budget.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.00082 | $0.01215 |
| Opus 5.5 | $0.00033 | $0.00486 |
| Sonnet 5.5 | $0.00016 | $0.00243 |
| Haiku 4.5 | $0.00008 | $0.00121 |
Grade A, and why
arch-context-budget 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 — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context budget
Every turn ends in one model request: a system prompt, the conversation history and the tool list.
Most "the model forgot", "it's slow" and "the bill is high" complaints come from what went into that
request. Find out from the request itself, not from the reply. If the developer has a single bad
session, use arch-explain-session first to find the turn where data was lost.
Gather the evidence
- Pick a long session (20+ turns), or run one with
debug_load_agentanddebug_send_message. - Get the full model requests for turns 1, 5, 10 and 20. The MCP trace tools do not return them:
Live reads cut each value to about 200 characters; historical reads leave out the
LLM prompt, messages and tool list (marked
llmPayloadOmitted). Ask the developer to use Export entire trace on the session page, or open each LLM step's Request view, and read those payloads. - With the MCP tools, locate where cuts happened:
debug_traceswith the session'ssessionIdandtextset to a marker such as_contextLimitedorCOMPACTED FOR CHAT HISTORY. For a session that is not live, passprojectIdandsource: "historical". - In the exported requests, search for the markers
_contextLimited,_summarized,truncated,COMPACTED FOR CHAT HISTORY,Prior response,Prior turn result,Result availableand "unavailable", and for{{context}},{{config.,{{env.and unfilled{{placeholders}}.
Limits and markers are listed in references/context-limits.md.
Two things grow without limit
In release 1.7.3, conversation history and declared session memory have no size cap. History is not trimmed by tokens or message count, and automatic summarization is off. Memory sections are sent in full on every call. Long and multi-agent conversations bloat here first.
Rules that prevent most context bugs
- Make visibility explicit. Declaring
BEHAVIOR: role:puts the agent in explicit mode:## Current Contextthen holds only declared and granted values. One{{context}}in an allow-list agent admits every session value. On an agent that is already live, values it never declared stop reaching the prompt, so declare what it needs and run the eval set before shipping the change. - Shape tool results at the source. Give every tool with more than a few fields a
MODEL_CONTEXT. Without it the platform decides what survives, which is the usual cause of "the model forgot the data it just fetched". Voice never summarizes, so this matters twice as much. - Save, don't hope. On the next turn a tool result becomes a placeholder and a reply that
followed a tool becomes a short preview. Save what later turns need with
on_result: SET. - Keep memory small. Session memory holds IDs and short strings, not objects or lists. Use
RESET: per_activationfor scratch values. - Trim handoffs.
passthe fields, a one-linesummary, andhistory: summary_onlyor a smalllast_n. Keys insideCONTEXT:must be lowercase. - Set compaction once, at project level (by API or project import; Studio edits compaction only inside the voice profile). The policy is resolved once per conversation and is not refreshed on handoff.
- Keep the start of the prompt stable. Identity, rules and tools first; per-turn values later in
memory. A
{{variable}}in GOAL changes the start of the prompt and defeats provider caching. - Keep secrets out of prompt text. Never reference
config.*orenv.*in GOAL, PERSONA, LIMITATIONS, SYSTEM_PROMPT or RESPOND. Credentials belong in auth profiles. - Give the agent the date when it reasons about relative dates; the system prompt has none.
- Set
max_search_tokenson every knowledge-base tool (2,000–4,000 for voice).
What ships with it
2 files 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.
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 · 75 lines · 82 tokens per session scan A afb24cb15e19
arch-context-budget is a skill published in the GitHub repository Koredotcom/agents-mcp-tools (4 stars, last pushed 1mo ago), licensed MIT. It adds 82 tokens to every session and 1,215 once invoked, about $0.0003 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-10-09.
arch-context-budget compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| arch-context-budgetKoredotcom/agents-mcp-tools | Skill | 4 | 1mo ago | MIT | A | 82 | Codex |
| knowledge-ingestopenclaw/openclaw | Skill | 394k | today | MIT | A | 80 | Claude Code, Codex |
| forgetasgeirtj/system_prompts_leaks | Skill | 71k | 3d ago | CC0-1.0 | A | 0 | Claude Code, Codex |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 69k | 6d ago | Apache-2.0 | A | 217 | Claude Code, Codex |
| Cortexdanielmiessler/LifeOS | Skill | 20k | 7d ago | MIT | A | 184 | Claude Code |
| ha-data-storesshiwenwen/hope-agent | Skill | 1.9k | today | MIT | A | 115 | Claude Code, Codex |
| memoryopensquilla/opensquilla | Skill | 7.1k | 6d ago | Apache-2.0 | A | 44 | Claude Code, Codex |