AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Context Budget

skill-wde123sadw-agent-preflight-context-budget · by wde123sadw

Control token and attention cost for tasks involving large files, logs, search results, repositories, datasets, tool outputs, long conversations, or repeated context. Use before reasoning over content likely to exceed roughly 2,000 tokens or when output quality degrades from context overload. Reduce at the source first, preserve provenance, use recoverable compression only when beneficial, and re…

No reviews yet
0 installs
37 views
0.0% view→install

Install

$ agentstack add skill-wde123sadw-agent-preflight-context-budget

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-wde123sadw-agent-preflight-context-budget)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Context Budget? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Context Budget

Goal

Give the agent the smallest context that preserves the facts, relationships, and exact evidence required for the task. Optimize correctness before token count.

Estimate the context shape

Identify:

  • source type: code, logs, search results, JSON, table, prose, conversation, or binary-derived text;
  • approximate size and repetition;
  • exact details that must survive;
  • whether the source can be queried again;
  • whether summary, indexing, or compression is reversible;
  • privacy and data-location constraints.

Skip context optimization for short inputs when the overhead would exceed the savings.

Apply the reduction ladder

Use the first sufficient technique:

  1. Prevent — request only needed fields, ranges, pages, files, or time windows.
  2. Filter — search, rank, deduplicate, exclude boilerplate, and isolate errors or changed lines.
  3. Structure — build an index, map, table, or hierarchical summary with source pointers.
  4. Summarize — create a task-specific summary and retain provenance.
  5. Compress — use a documented compressor when the content remains large and the transformation preserves required information.
  6. Retrieve — recover exact source segments before quoting, patching, calculating, approving, or verifying.

Read [compression-policy.md](references/compression-policy.md) before using or recommending a compression system.

Preserve evidence

For every transformed source, retain enough provenance to recover:

  • source path, URL, query, tool call, or record identifier;
  • line, page, row, timestamp, or section when available;
  • transformation type and time;
  • retrieval key or content hash when supported;
  • details intentionally omitted.

Never cite a compressed summary as if it were the original source.

Protect exactness

Retrieve or retain original content for:

  • code patches, commands, API signatures, stack frames, and configuration;
  • legal, policy, contractual, financial, and safety-critical language;
  • credentials and secrets, which should not be sent to a compressor at all;
  • structured data where every field or record matters;
  • evidence used to approve a tool or high-risk action;
  • user-requested quotations and precise citations.

Discover compression tools only when justified

If repeated large-context work reveals a missing compression or retrieval capability:

  1. describe the gap through $capability-gap-analysis;
  2. discover current candidates through $tool-discovery;
  3. review data flow, local/cloud behavior, accuracy evidence, and rollback through $tool-review-gate;
  4. wait for approval before installation or proxy configuration.

Do not claim that an on-demand MCP tool automatically compresses prompts, hidden context, or all model traffic. Distinguish manual tool calls from proxy or middleware interception.

Emit a context plan

For substantial tasks, state:

CONTEXT PLAN
Need: 
Sources: 
Reduction: 
Exact evidence retained: 
Retrieval trigger: 
Expected benefit: 
Integrity risk: 

After substantial compression, report measured savings when the tool provides them. Do not invent a savings percentage.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.