context-tax-audit

Inventory system prompt, environment info, tool definitions, and per-turn context blocks to identify unnecessary overhead and prompt-cache misalignment.

554|41|Updated Oct 28, 2026
Ready to run
npx skills add https://github.com/MiniMax-AI/mcode-stack --skill context-tax-audit-minimax-ai
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: context-tax-audit
Source: https://github.com/MiniMax-AI/mcode-stack/tree/main/stacks/ronny/skills/context-tax-audit
Command: npx skills add https://github.com/MiniMax-AI/mcode-stack --skill context-tax-audit-minimax-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Agent requests accumulate hidden costs: system prompts, environment variables, skill lists, tool definitions, and per-turn context blocks that may not all be necessary. This Skill helps you audit those costs, find what can be removed or repositioned, and recover cache hit rates by identifying which content changes every request and invalidates the prefix cache. ## Core Features & Use Cases - Inventory Mapping: Capture a real request and list every component besides the user's message with token counts and change frequency. - Necessity Analysis: Write one sentence per component explaining what breaks if you delete it. - Cache Placement Optimization: Identify volatile content sitting in the system prompt (expensive) versus stable content that can stay cached. - Use Case: Your agent's cache hit rate dropped from 80% to 20%. Run this audit to discover that the system prompt includes a timestamp that changes every request, invalidating the entire prefix. Move the timestamp to per-turn context and restore cache performance. ## Quick Start Capture your agent's request assembly code or debug logs, then work through the four-step checklist: inventory all request components, write necessity statements for each, audit cache placement rules, and measure token costs and cache hit rates before and after any changes.

Frequently Asked Questions about context-tax-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does changing the system prompt affect the prompt cache?▼

The prompt cache matches on exact prefix bytes. Any change to the system prompt—including timestamps, variable updates, or reordered sections—invalidates the entire cached prefix. Subsequent requests rebuild from scratch at full token cost.

What context should move from system prompt to per-turn blocks?▼

Anything that changes per request (current time, session ID, dynamic environment state) should move to per-turn context. Keep the system prompt stable for cache reuse, and inject volatile data only where needed in the current turn.

Why does high token count not always mean high cost?▼

Cached tokens cost 90% less than uncached ones. A 10K token system prompt cached across 100 requests is cheaper than a 2K dynamic context injected per turn if the dynamic context breaks the cache 50 times.

How do I measure whether an audit change actually helped?▼

Track three metrics before and after: cache hit rate (percentage of requests served from cache), average cost per turn, and task quality. Compare in the same session length to account for cache warming effects.

What parts of an agent request are never cached?▼

Content attached only to the current request (per-turn reminders, dynamic context blocks, the user's message) never enters the cache and is charged at full price every time. Control their frequency, but understand they cannot be optimized through placement.

Should I include environment info in the system prompt?▼

No. Put stable environment metadata (OS, shell, installed tools) in the system prompt once. Move dynamic state (current working directory, environment variables that change per session) to per-turn context to preserve cache.