prompt-reframe

prompt-reframe is a skill for Claude Code, Codex from greyok00/slimtoken. It costs 88 tokens per session (1,148 once invoked), scanned A, original, MIT.

A deterministic prompt-cleaning toolkit that turns long or repetitive requests into shorter, clearer instructions for a language model. It can also classify the request’s broad domain.

In plain words
What is it for?
Use it to prepare prompts for batch jobs, embedded model applications, or small CPU-only environments where an extra model call is undesirable.
Why use it?
It removes conversational filler, repeated points, and unnecessary context before the request reaches the model. This is useful when prompts are long or many requests need a consistent format.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/greyok00/slimtoken/prompt-reframe
Any agent
npx skills add greyok00/slimtoken --skill prompt-reframe
Clone the repo
git clone --depth 1 https://github.com/greyok00/slimtoken

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prompt-reframe

README.md
[![agentmods](https://agentmods.dev/badge/skills/greyok00/slimtoken/prompt-reframe.svg)](https://agentmods.dev/skills/greyok00/slimtoken/prompt-reframe)
Your own site
<a href="https://agentmods.dev/skills/greyok00/slimtoken/prompt-reframe"><img src="https://agentmods.dev/badge/skills/greyok00/slimtoken/prompt-reframe.svg" alt="Measured on agentmods" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,148 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00088 $0.01148
Opus 5 $0.00044 $0.00574
Sonnet 5 $0.00018 $0.00230
Haiku 4.5 $0.00009 $0.00115

Measured 5d ago against content hash 516c82c71edd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prompt-reframe scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/reframe.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/prompt-reframe/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

prompt-reframe

A pure-CPU toolkit for tightening natural-language prompts. No LLM roundtrip; every stage is a deterministic transform that runs in microseconds. Lives in slimtoken.prompt_reframe and is also exposed as a standalone MCP server (slimtoken-reframe-mcp).

When to use

  • The user prompt is full of "can you basically just..." and repeats itself; the actual ask is buried.
  • A batch job needs to fan out N requests with consistent shape; the rewriter gives every prompt the same terse form.
  • A product embeds a model and the system prompt is bloated.
  • You'd like to know the domain of a request (business / code / osint / cybersecurity / professional / general) before deciding which system prompt to attach.
  • You're a small CPU environment (edge device, serverless cold start, batch worker) and can't afford to call a model just to paraphrase.

When NOT to use

  • The prompt is already short (< 80 words) and clean. The reframe is a no-op there; you'd just be paying CPU for nothing.
  • The user wants the model to handle nuance, hedging, or conversational style. The rewriter strips style on purpose.
  • You need a semantic rewrite that the input doesn't already contain. Use an LLM for that; this toolkit only works with sentences that already exist in the input.

How to use

Default — the Python API (works anywhere slimtoken is installed):

from slimtoken.prompt_reframe import (
    classify_domain, reframe_prompt, shrink_prompt,
    minify_prompt, build_system, frame_prompt,
)

domain = classify_domain(user_prompt)
tight = shrink_prompt(user_prompt, mode='balanced')   # ~50 words
system = build_system(domain, role='generalist', style='terse')

# Or one call for the full pipeline:
reframed, system, domain = frame_prompt(user_prompt, mode='balanced')

Fallback — CLI (when you just want to see the effect):

python -m slimtoken.prompt_reframe "your rambling prompt here"
python -m slimtoken.prompt_reframe smoke               # built-in tests
python -m slimtoken.prompt_reframe json "your prompt"   # machine-readable

Read the full file on GitHub · 115 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 115 lines · 88 tokens per session scan A 516c82c71edd

Subscribe to this mod's changes

prompt-reframe is a skill published in the GitHub repository greyok00/slimtoken (4 stars, last pushed 11d ago), licensed MIT. It adds 88 tokens to every session and 1,148 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.