Skillware adds prompt_rewriter for deterministic token compression in Claude API agent loops

✍️ OpenClawRadar📅 Published: March 25, 2026🔗 Source
Skillware adds prompt_rewriter for deterministic token compression in Claude API agent loops
Ad

Skillware has added a prompt_rewriter skill that reduces Claude API costs in agentic loops by compressing prompts before sending them to the LLM. The middleware uses heuristic compression to cut token usage by 50-80% while maintaining deterministic behavior across iterations.

How it works

The tool operates as middleware that sits between your agent and the Claude API. It applies aggressive compression to prompts before they're sent to the LLM, ensuring you only pay for the signal and not the noise. Because the compression is deterministic, agent behavior remains stable across loops.

Compression levels

  • Low: Normalizes whitespace
  • Medium: Strips conversational fillers (please, ensure, etc.)
  • High: Aggressively removes stop-words and non-essential punctuation

The tool addresses the problem of runaway costs in iterative agent loops where massive context windows lead to massive bills. It's open-source and available on GitHub, with the developer looking for more skills, feedback, ideas, and contributions.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also