Stop Paying for Slop: A Deterministic Middleware for LLM Token Optimization
Context windows are getting huge, but token budgets are tightening. Every time your agent iterates in an autonomous loop, you're potentially sending a massive, bloated prompt filled with conversational filler, redundant whitespace, and low-entropy "slop." Today, I've merged the Prompt Token Rewriter
Ross Peili
Context windows are getting huge, but token budgets are tightening. Every time your agent iterates in an autonomous loop, you're potentially sending a massive, bloated prompt filled with conversational filler, redundant whitespace, and low-entropy "slop."
Today, I've merged the Prompt Token Rewriter to the Skillware registry (v0.2.1).
It's a deterministic middleware that aggressively compresses prompts by 50-80% before they ever hit the LLM.
Why does this matter?
- Lower Costs: Pay only for the "signal," not the "noise."
- Faster Inference: Fewer tokens mean less time spent on KV-caching and long generations.
- Deterministic Behavior: Because it uses heuristics rather than another expensive LLM call, your agent behavior stays stable and repeatable.
Three Levels of Aggression
The rewriter includes three presets depending on your use case:
- Low: Normalizes whitespace and line breaks (Safe for strict code).
- Medium: Strips conversational fillers ("please," "could you," "ensure that").
- High: Aggressively removes stop-words and non-essential punctuation (Best for machine-to-machine context).
Join the Registry
We are building a community-driven "App Store" for Agentic Capabilitiesโdecoupling logic from intelligence. If you've built a specialized tool for LLM optimization, governance, or logic, we'd love your contribution!
Check out our Contributing Guide to get started.
Found this useful? Share it!
Read the Full Story
Continue reading on Dev.to
Related Stories
Majority Element
about 2 hours ago
Building a SQL Tokenizer and Formatter From Scratch โ Supporting 6 Dialects
about 2 hours ago
Markdown Knowledge Graph for Humans and Agents
about 2 hours ago

Moving Beyond Disk: How Redis Supercharges Your App Performance
about 2 hours ago