- Home
- Skills
- Prompt & Skill Engineering
- prompt slimmer
prompt slimmer
Reduce LLM token costs by 30-60% using a verified measurement, cutting, and behavior-equivalence loop.
Free
Works with the AI Agents you already use
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
| Step | Cut Description | Tokens Saved | Verdict |
|---|---|---|---|
| 1 | Removed redundant Markdown formatting rules | 215 | Equivalent |
| 2 | Consolidated 4 hedging examples into 1 | 310 | Equivalent |
| 3 | Trimmed preamble and "thinking aloud" prose | 151 | Equivalent |
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.mdto ensure the new tone meets brand guidelines. - Run
scripts/equivalence_check.pyagainst 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
- Measure the baseline token count and capture current behavior across a representative input set.
- Cut in small, 5% increments, focusing on low-risk areas like hedging or restated rules.
- Verify using the output-equivalence council for open-ended text or the triage gate for checkable outputs.
- 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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