Install
$ agentstack add skill-wde123sadw-agent-preflight-context-budget ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
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 →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:
- Prevent — request only needed fields, ranges, pages, files, or time windows.
- Filter — search, rank, deduplicate, exclude boilerplate, and isolate errors or changed lines.
- Structure — build an index, map, table, or hierarchical summary with source pointers.
- Summarize — create a task-specific summary and retain provenance.
- Compress — use a documented compressor when the content remains large and the transformation preserves required information.
- 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:
- describe the gap through
$capability-gap-analysis; - discover current candidates through
$tool-discovery; - review data flow, local/cloud behavior, accuracy evidence, and rollback through
$tool-review-gate; - 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.
- Author: wde123sadw
- Source: wde123sadw/agent-preflight
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.