prompt slimmer

    1

    Reduce LLM token costs by 30-60% using a verified measurement, cutting, and behavior-equivalence loop.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    prompt slimmer

    Example session with this skill installed

    My system prompt for this RAG agent is 4,500 tokens. I need to reduce the cost. Use the output-equivalence council to verify that it still answers technical questions correctly.

    • Read your context and instructions
    • Compiled the prompt slimmer

    I have initiated the slimming loop for your RAG system prompt. I identified significant redundancy in the formatting instructions and the safety headers, which were restating standard model behaviors.

    Current Status:

    • Baseline: 4,502 tokens
    • Current: 3,826 tokens
    • Total Savings: 676 tokens (15.01%)
    • Verification: PASSED (Equivalence Council)

    Slimming Report

    StepCut DescriptionTokens SavedVerdict
    1Removed redundant Markdown formatting rules215Equivalent
    2Consolidated 4 hedging examples into 1310Equivalent
    3Trimmed preamble and "thinking aloud" prose151Equivalent

    Verification Results

    The Output-Equivalence Council ran 5 judges across 10 representative RAG queries.

    • Equivalent: 9/10 cases
    • Minor Drift: 1/10 cases (Tone was slightly more concise, but factual accuracy was maintained)
    • Non-Equivalent: 0/10 cases

    Next steps

    • Review the diff in prompts/rag-agent-v2.md to ensure the new tone meets brand guidelines.
    • Run scripts/equivalence_check.py against the full production evaluation set.
    • Deploy the updated prompt to the staging environment for final latency testing.

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

    About this skill

    Prompt bloat is a recurring tax on every LLM call. This skill reduces token counts by 30-60% while ensuring behavior remains identical through rigorous verification. It eliminates the risk of silent regressions by using a structured loop of measurement, incremental cuts, and output-equivalence testing. Whether you are managing a massive system prompt, stuffed RAG contexts, or redundant few-shot examples, this tool provides the discipline to trim costs without degrading quality.

    What it does

    • Token reduction identifies and removes redundant rules, hedging prose, and format specs the model already follows.
    • Behavior verification proves output equivalence using a jury of LLM judges or programmatic eval suites.
    • Regression gating separates real behavior shifts from LLM randomness using a flaky-test triage process.
    • Cost reporting calculates exact token savings and projected monthly ROI based on call volume.

    How it works

    1. Measure the baseline token count and capture current behavior across a representative input set.
    2. Cut in small, 5% increments, focusing on low-risk areas like hedging or restated rules.
    3. Verify using the output-equivalence council for open-ended text or the triage gate for checkable outputs.
    4. Iterate by keeping verified shrinks and reverting any edit that causes a behavior drift.

    Frameworks & tools

    This skill includes standalone Python 3.9+ scripts for CLI-based equivalence checking and test triaging. It is provider-agnostic and works with any testing framework that produces parseable failure lines, including pytest, vitest, and jest.

    Why this beats prompting it yourself

    Manual prompt trimming often leads to "disguised guard" failures where a seemingly minor deletion breaks a specific edge case. This skill replaces guesswork with a mathematical loop that requires empirical proof before any cut is finalized.

    Use cases

    • Shrinking a massive system prompt to fit within a smaller model's context window.
    • Reducing the monthly API bill for high-volume RAG or agentic workflows.
    • Adding a prompt-regression gate to a CI/CD pipeline to prevent cost bloat.
    • Auditing few-shot examples to find the minimum set required for accuracy.

    Known limitations

    This skill is strictly for shrinking prompts without changing behavior. It does not support adding new features or fixing bugs during the slimming process.

    Does not support behavior changes or bug fixes. Requires a representative input set for verification. Verification scripts require Python 3.9+.

    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

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed today

    • Free with an Agensi account

    Requires

    Python

    Permissions

    Terminal / Shell
    Write Files
    Network Access
    Environment Variables
    Read Files
    Listedtoday

    What's inside

    Frequently Asked Questions

    This skill identifies and removes redundant tokens from your prompts while using a verification loop to ensure the model's output remains identical, preventing the quality degradation that often comes with manual trimming.

    Prompt Slimmer is provider-agnostic and works with any LLM, including OpenAI, Anthropic, and open-source models; it integrates into any CI/CD pipeline or testing framework that produces parseable output.

    You receive standalone Python 3.9+ scripts for CLI-based equivalence checking, the regression gating logic, and the automated triage system for managing LLM non-determinism.

    While it works for any prompt, you will see the highest ROI on long system prompts, dense RAG contexts, and high-volume agentic workflows where token savings compound quickly.

    The skill includes a 'flaky-test' triage process that distinguishes between actual behavioral regressions caused by your changes and the natural randomness inherent in LLM outputs.