Skip to content
Agentmart
Submit a tool

agent-context-budget

Use when launching parallel or background subagents, or when a handoff, log, or result would be more than a short summary (roughly 2 KB).

Skill by WenyuChiou

IndexedMIT★ 30
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/wenyuchiou-agent-context-budget

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when launching parallel or background subagents, or when a handoff, log, or result would be more than a short summary (roughly 2 KB). Caps return sizes (summary in the reply, detail by path), picks a cheap model tier for mechanical lanes, records durable decisions as proposals, and checkpoints or primes a fresh session before context runs out.

Use cases: finance, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/agent-context-budget

What's inside

Skill name
agent-context-budget
Description
Use when launching parallel or background subagents, or when a handoff, log, or result would be more than a short summary (roughly 2 KB). Caps return sizes (summary in the reply, detail by path), picks a cheap model tier for mechanical lanes, records durable decisions as proposals, and checkpoints or primes a fresh session before context runs out.
License
MIT
Instructions
129 lines in SKILL.md · view on GitHub

Files (3)

  • SKILL.md
  • coord_memory_schema.md · references/
  • harness-loop.md · references/

SKILL.md (first lines)

# agent-context-budget

Keep the primary session small while lanes do the reading and writing. There
is no second budget source: native mode follows the host's limits and the caps
written into each brief; harness mode takes every number from the policy
referenced by the current `TaskCheckpoint`. The "roughly 2 KB" in the
description says when to use this skill; it is not a limit.

Do not use this skill to summarize away unresolved failures, human decisions,
raw scientific evidence, or security findings.

## Before launching lanes

- Put a return cap in every brief: status, short summary, files changed,
  checks run, risks, blockers. Long output goes to a file and the lane returns
  the path. Raw logs, transcripts, and full diffs never come back inline.
- Reading lanes return conclusions with `file:line` references, not file
  dumps. Name exact files and line ranges in the brief.
- Choose model tiers before launch: a cheap tier for mechanical lanes (pattern
  edits, scaffolds, bulk reads), a strong tier for review, verdicts,
  root-cause analysis, security, and governance. Never switch a lane's model
  silently after a failure.
- Background lanes notify on completion. Keep working and read the result
  then; do not poll.
- For a follow-up, continue the lane that already holds the context instead
  of starting a fresh one.

Host mechanics (parallel calls, background runs, per-lane model, return
schemas) are in [native lanes](../../docs/native-lanes.md).

## What goes into a brief

Only decision-relevant material:

- goal and acceptance contract;
- explicit files and tools in scope;
- direct evidence paths;
- current recorded human decisions;
- relevant interfaces or schemas.

Keep raw logs and complete artifacts at their paths. Include a short failure
excerpt only when the next action needs it.

## Before context runs out

Write a fresh-session primer: goal, current state, decisions and who made
them, open questions, evidence paths, next step. Keep unresolved failures,
human decisions, and security findings visible. Compaction changes the active
context, not cumulative usage or failure history.

## Durable decisions (formerly agent-shared-memory)

Memory output is proposal-only. Repository state, current evidence, and
recorded human decisions outrank memory; recall systems are optional caches.
Native mode may write a proposal file and nothing else under `.coord/`;
applying an approved proposal needs the signed approval of harness mode.

- Write a proposal to `.coord/memory-proposals/<proposal-id>.json` with an
  immutable `action` (operation, target_ref, summary, evidence_refs).
- Supersede, archive, and delete need a specific `target_ref`. A proposal
  with no evidence refs stays pending.
- Only an explicit human approval, recorded with actor, decision, timestamp,
  rationale, affected action hash, and trusted-host HMAC authorization, lets a
  proposal be applied. Decline, timeout, and revise are not approval.
- Applying appends one new event to `.coord/memory.yml`.
  It never edits an existing event; a resolution, correction, or
  supersession is a new append-only event.
- Never report an unapproved proposal as a canonical decision. Delegated
  executors never receive the signing key.

Full schema and apply rules:
[references/coord_memory_schema.md](references/coord_memory_schema.md).

## Harness mode

Applies when `AGENT_COLLAB_POLICY` is configured, or a round spans sessions or
tools, runs unattended, or must resume.

1. Validate:

       agent-collab policy validate --policy <policy-ref> --json
       agent-collab checkpoint validate --checkpoint <checkpoint-ref> --json

2. Record the observed metrics in the checkpoint. Never estimate a lower
   number to fit the policy.
3. Before each child spawn and after each returned result, run:

       agent-collab policy evaluate \
         --policy <policy-ref> \
         --checkpoint <checkpoint-ref> \
         --json

4. Obey the decision:
   - `continue` with `spawn_allowed=true`: build the bounded packet.
   - `checkpoint`: write the checkpoint and primer. A v2 slice with
     auto_continue advances atomically under the same goal; v1 returns
     control. For a v2 action-scope `context_compaction_required`, do local
     context maintenance without asking for renewed approval: keep full
     artifacts, acceptance evidence, failures, and authorization; build a
     smaller linked packet or use native compaction; record measured sizes;
     re-evaluate. Do not spawn or advance a slice while this gate is pending.
   - `stop` or `spawn_allowed=false`: do not spawn. Respect the v2 scope; an
     exhausted action still allows safe primary-agent diagnosis.
5. A configured but unreadable policy stops the run. If the harness package is
   unavailable, do not start an autonomous loop; prepare packets for
   human-controlled execution instead.

Multi-cycle loop rules (retry counting, failure identity, no-progress cycles)
are in [references/harness-loop.md](references/harness-loop.md).

Outputs (scratch by default): `.coord/context_<NNN>.md` (shape in
[references/harness-loop.md](references/harness-loop.md)),
`.coord/session_primer.md`, and the updated checkpoint. Promote a checkpoint
snapshot only when the repository needs it for resume, shipping, or
acceptance evidence. Agent boundaries do not imply commits.

## Invariants

- Policy values have one machine-readable source; the stricter of the policy

From WenyuChiou/agent-collab-skills, MIT.

Signals

Stars
30
Forks
7
Open issues
0
Last commit (this folder)
Oct 16, 2026 (12 days ago)
Last release
Sep 4, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from WenyuChiou

Cite this page

agent-context-budget skill. Agent Mart. https://agentmart.dev/skills/wenyuchiou-agent-context-budget (last updated 2026-10-24)