Live Context Optimizer

    by Maulana Ruhaedi Putra

    1

    Audit, prune, and budget LLM context tokens with measured fidelity checks and list-price cost attribution.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Live Context Optimizer

    Example session with this skill installed

    Run a T-audit on transcript.jsonl for model GPT-5. Identify the top token leaks and give me a GO/NO-GO verdict based on a 50k token budget.

    • Read your context and instructions
    • Compiled the live context optimizer

    I have analyzed the provided transcript using the 2026-11-30 price snapshot.

    Token Audit Report: GPT-5

    LayerTokens (measured)Cost (list price)ShareTop Leak
    System Prompt1,200$0.001508.5%Static instructions
    Tool Definitions4,500$0.0056331.8%database_explorer schema
    History2,100$0.0026314.8%Old turns (15+)
    Tool Results5,800$0.0072541.0%Repeated SQL output
    Output550$0.005503.9%N/A
    Total14,150$0.02251100%Tool Results

    Audit Verdict: GO

    • A-01 Token counts: PASS (Measured via tiktoken o200k_base)
    • A-05 Tool-result bloat: REVIEW (Repeated 150-row results detected in database_explorer)
    • A-07 Loop detection: PASS (No repeated identical calls found)
    • A-08 Budget status: PASS (Current: 14,150 / Budget: 50,000)

    Analysis
    The primary leak is the database_explorer tool, which has returned the same schema information multiple times. History turns are starting to accumulate, but remain within safe limits for reasoning quality. Cache hygiene is good, with no dynamic IDs in the system prefix.

    Next steps

    1. Run T-prune to digest the redundant tool results into a single summary.
    2. Enable T-guard with a hard step limit of 25 to prevent future bloat.
    3. Review the database_explorer tool definition to see if the schema can be minified.

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

    About this skill

    Measure where an AI conversation's tokens actually go (real tokenizer, per-layer attribution, list-price cost), prune/summarize the live conversation with a fidelity check that proves no fact was lost, and enforce token/cost budgets, loop guards, cache hygiene, and cross-provider routing from real list prices. Use when tokens run out too fast, when a session's context keeps growing, or for a GO/NO-GO verdict on a conversation's token health with measured before/after numbers.

    Requires transcript in JSONL format. Real counts for Claude/Gemini need API endpoint access. Prices based on 2026-11-30 snapshot. No live invoice syncing.

    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 buying a skill.

    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 4 days ago

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Listed4 days ago

    What's inside

    Frequently Asked Questions

    This skill identifies where tokens are being wasted in long AI sessions by auditing system prompts, tool definitions, and conversation history. It then prunes bloated data and summarizes old turns to reduce recurring costs and prevent reasoning degradation without losing critical facts.

    You must provide a transcript or session log in JSONL format containing the role, layer, and content of each message. The skill also requires you to confirm which model and provider you are using so it can apply the correct tokenization and pricing rules.

    The skill delivers a detailed audit report that ranks the top three token leaks, attributes costs by layer, and provides a GO or NO-GO verdict on session health. If you choose to prune, it also provides a before and after comparison of tokens and costs along with a fidelity check to prove no facts were lost.

    This skill uses a deterministic fidelity check that runs probe questions against both the original and pruned context to ensure numbers, decisions, and file paths remain identical. If the check fails to preserve these verbatim facts, the pruning is automatically reverted.

    The skill cannot verify live billed usage from provider invoices and instead uses a list price snapshot from 2026-11-30. It also does not support active token counting for non-text modalities like video or audio, which are handled using table-based estimates.

    You can ask your agent to run a T-audit to find where tokens are being spent, a T-prune to compress the current conversation for better performance, or a T-guard to set hard stops on your token and cost budgets.

    New in LLM Ops

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.