context and token optimizer

    1

    A high-density token compression and context management system that reduces prompt overhead by up to 75%.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    context and token optimizer

    Example session with this skill installed

    Activate ultra mode and fix the type error in api/handler.ts where the response object is missing the status property. Use the scratchpad for tracking.

    • Read your context and instructions
    • Compiled the context and token

    Ultra mode active. Updating .scratchpad.md and patching api/handler.ts.

    Deliverable

    
    # Session Memory Scratchpad
    
    ## Goal
    Fix missing `status` property in `api/handler.ts` response.
    
    ## Active Invariants
    - Response shape must include `status: number` and `data: any`.
    
    ## Completed Steps
    - [x] Identified missing property in handler return type.
    
    ## Next Action
    - [ ] Verify fix with `npm run lint`.
    
    // api/handler.ts
    export const handler = async (req: Request): Promise<ApiResponse> => {
      const data = await fetchData();
      // Fixed: added status property
      return { status: 200, data };
    };
    

    Next steps

    1. Run npm run lint to verify the ApiResponse interface matches.
    2. Update .scratchpad.md once linting passes.
    3. Run /caveman off if you require detailed explanations for the next task.

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

    About this skill

    High context usage leads to reasoning degradation and massive token waste. This skill implements a strict context management system that slashes repetitive overhead and prevents the context cliff.

    What it does

    • Token compression provides three density modes to reduce conversational fluff by up to 75% while keeping technical fidelity.
    • Context hierarchy structures prompts into a five-level pyramid from persistent rules to isolated error frames.
    • Proactive compaction uses a zero-dependency Python script to strip whitespace and redundant prose from markdown without breaking code.
    • Structured memory maintains a lightweight .scratchpad.md to track goals and invariants without inflating the active context window.
    • Noise reduction enforces rules to trim stack traces and eliminate redundant summaries before code edits.

    How it works

    1. Use /caveman commands (lite, full, or ultra) to set the communication density for the current session.
    2. Apply the Context Window Hierarchy to load only the specific files or error segments required for the current task.
    3. Run the compression script on project documentation to minimize the footprint of reference materials.
    4. Maintain a .scratchpad.md in the root directory to track cross-task state and completed steps.

    Frameworks & tools

    This skill is language-agnostic. It includes a Python utility for markdown minification and uses standard Markdown for session tracking.

    Why this beats prompting it yourself

    Manual instructions to "be concise" often fail as sessions get longer and the model reverts to verbose defaults. This skill provides a systematic hierarchy and specific commands that force the model to stay within high-density constraints, saving thousands of tokens per hour.

    Use cases

    • Debugging long stack traces by isolating single frames instead of entire log files.
    • Managing large project contexts where reasoning starts to degrade due to the context cliff.
    • Reducing API costs for heavy users of LLM coding agents.
    • Maintaining clear project state during complex, multi-step refactors.

    Known limitations

    Compressed modes may be too brief for users who prefer explanatory prose. The Python compression script requires a local environment to execute.

    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.

    Requires local Python for the compression script. Compressed modes significantly reduce conversational explanations. Memory is persistent within the active session only.

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

    Permissions

    Read Files
    Write Files
    Network Access
    Listed7 days ago

    What's inside

    Frequently Asked Questions

    This skill uses a multi-layered hierarchy and specific density commands to prune conversational fluff and redundant data, preventing the 'context cliff' where AI reasoning declines as the window fills up.

    You will receive the proprietary prompt-engineering framework, the system instruction set for the /caveman commands, and a zero-dependency Python script for markdown compression.

    Yes, the system is language-agnostic and designed to work with any major LLM (like GPT-4, Claude 3.5, or Gemini) that supports custom instructions or system prompts.

    The core context hierarchy works immediately via text prompts, while the proactive compaction tool requires a local Python environment to process your documentation files.

    While high-density modes prioritize technical fidelity, they significantly reduce explanatory prose; users who prefer verbose, step-by-step guidance may find the 'Ultra' mode too brief for their liking.

    By stripping up to 75% of non-essential tokens and repetitive overhead, the skill directly reduces the cost per request for users paying via API usage or token-based subscriptions.

    New in LLM Ops