More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Context Optimization: More Work Per Window

    1

    Stretch a fixed context window with cache-friendly prefixes, observation masking, deliberate compaction, and sub-agent partitioning — measured before and after, every time.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Context Optimization: More Work Per Window

    Context Optimization: More Work Per Window

    Example session with this skill installed

    My agent sessions keep dying at 85% window usage. The window is full of repeated project instructions, three huge test logs, and long file dumps. I need the session to finish a debugging task in-window without losing the decisions made so far.

    • Read your context and instructions
    • Compiled the context optimization

    Applied to your session — before / after

    Baseline measured first: window 85% full. Top consumers: repeated project instructions (~12%), three test-suite logs (~40%), file dumps (~25%). Quality check: the agent must still state the two confirmed root causes and the fix in progress.

    Step 1 — prefix: the project instructions were frozen byte-identical and moved to the front of every call. Cache reuse now applies across calls; zero quality risk, immediate cost saving.

    Step 2 — masking: each test log was summarized before eliding — "suite A: 2 failures in auth.test.ts lines 41 and 88; suite B: green; suite C: 1 flaky timeout, unrelated" — with retrieval pointers kept. The file dumps were replaced by their extracted findings. Utilization: 85% → 52%.

    Step 3 — compaction: not needed yet. At 52% the window has room; compacting now would risk the decisions for no gain. The rule is compact at ~70%, not at habit.

    Partitioning: also not needed — the debugging task is a single thread and fits. Splitting would add coordination overhead for nothing.

    Result: the session finished in-window, the fix landed, and the quality check passed — both root causes and the in-progress fix survived. The masking record lets any later reader retrieve the full logs. Total token spend per run fell by roughly a third, measured, not estimated.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The window is a fixed size; the work is not. This skill fits more useful reasoning into the same budget, ordered by impact relative to risk: stabilize the prompt prefix so the runtime reuses cached work (zero quality risk), mask tool outputs after extracting what they established (the biggest lever, non-destructive), compact deliberately at about 70% utilization (targeting a 50–70% reduction, with a quality check after), and partition across sub-agents only when the estimated need exceeds 60% of the window and the subtasks are genuinely independent.

    Every step is measured: utilization, cost per run, and a re-runnable quality check, recorded in a template before and after. A decision table tells you which technique fits which signal — and when to do nothing. A worked example takes a 90,000-token debugging session in a 100,000-token window from 90% full back to 55% without losing the root causes. The rubric gates the result: below 6 out of 8, the last step gets rolled back, not waived.

    • It optimizes the window; it cannot enlarge it. A task that genuinely needs more context than the window holds still needs partitioning or durable files.
    • Compaction is lossy by nature — over-aggressive summaries lose load-bearing detail, which is why the quality check after each step is mandatory, not optional.
    • Cache reuse depends on the runtime actually caching prefixes; the technique is standard, but the savings vary by provider.
    • It does not diagnose why a model gets confused in long windows — that is a different problem with different tools.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 3 days ago

    Permissions

    No special permissions declared or detected

    Listed3 days ago

    What's inside

    Frequently Asked Questions

    The prefix. It is free — zero quality risk, pure cost and latency savings — and it should be in place before anything lossy is attempted. Masking is second, compaction third, partitioning last.

    No, if done right. Every masked observation keeps a retrieval pointer to the original, and the extraction summary records what it established. Masking without a pointer is not masking — it is deleting, and the skill forbids it.

    When the task fits in one window, or when subtasks need constant clarification from the parent. Coordination overhead is real: a subtask that pings the parent every few minutes loses more than partitioning gains.

    New in LLM Ops