PromptTailor
Model-aware prompt rewriting for Claude Code. Write a rough request — get it rewritten the way your current Claude model works best.
Why
Claude Fable 5, Opus 5, Sonnet 5, and Haiku respond best to different prompt styles — Fable wants goals and constraints in prose (no step lists), Opus over-verifies if you tell it to double-check, Haiku wants small numbered steps. PromptTailor keeps these differences as data (model profiles), detects which model you're running, and rewrites your rough request to match — also routing by task intent (fix / build / research / refactor / docs).
Your input language is preserved: English in → English out, Korean in → Korean out.
Example
$ prompt-tailor "fix the login bug asap, users keep getting logged out" --model fable-5
Users are repeatedly logging out unexpectedly. Before fixing, investigate: exact reproduction steps (when and under what conditions does this happen?), when this started, relevant error logs or console messages, and the login/session management code structure.
Once you've identified the reproduction path and root cause, apply the minimum fix to prevent unintended logouts. Scope: session and login logic only — do not modify other features.
Validation: confirm the issue no longer reproduces through direct testing, or verify that related tests pass.
Notice what happened: vague urgency ("asap") became an investigation directive, a scope boundary, and a validation criterion — and nothing was invented. Unknowns become investigation steps; any added specifics are tagged as assumptions.
Install
As a Claude Code plugin (recommended):
/plugin marketplace add Createyouracccount/PromptTailor
/plugin install prompt-tailor@prompt-tailor
This gives you the /pm command with no path setup.
As a CLI / MCP server:
git clone https://github.com/Createyouracccount/PromptTailor.git
cd PromptTailor
pip install . # installs `prompt-tailor` and `prompt-tailor-mcp`
Requirements: Python 3.10+, the claude CLI installed and logged in (no separate API key). Verified on macOS/Linux; Windows untested.
Usage
prompt-tailor "rough request" --model fable-5 # rewrite for a target model
prompt-tailor "rough request" --json # JSON output
prompt-tailor "rough request" --concise # faster, condensed meta-prompt
Inside Claude Code — /pm rough request: rewrites for your session's detected model, shows a one-line change summary, then executes the rewritten request. In auto mode, add the permission rule printed by claude-code/install.sh so prompts containing risky-looking words (e.g. "docker prune") aren't false-positive blocked — the backend only rewrites text.
Hook auto mode (opt-in) — rewrite every prompt automatically via a UserPromptSubmit hook. Run bash claude-code/install.sh for the settings snippet. Escape hatch: include #raw in a prompt to pass it through untouched. Prompts under 6 tokens or over 800 chars are skipped; if a rewrite doesn't finish within 28s it fails open (your original prompt goes through).
Cursor / any MCP client — a built-in stdio MCP server exposes refine_prompt(raw, target_model, concise):
// ~/.cursor/mcp.json
{ "mcpServers": { "prompt-tailor": { "command": "prompt-tailor-mcp" } } }
claude mcp add prompt-tailor -- prompt-tailor-mcp # register in Claude Code
How it's validated
Every design decision in this repo is backed by measured experiments (blind pairwise LLM judging, ledgered in LOOP_LOG.md):
- Golden set of 20 rough prompts: 20/20 judged better than the original (clarity 5.0, fidelity 4.8, actionability 5.0) — EVAL.md
- Model profiles produce structurally different rewrites: 5/5
- Intent routing beat profile-only rewriting 4–1–1 in pairwise comparison
- Latency: ~15–30s per rewrite via
claude -p(the price of needing no API key)
Honest caveats live in EVAL.md: small n, single LLM judge, "better prompt" ≠ proven higher task success rate.
Development
python3 -m unittest discover tests # 37 offline tests, no LLM calls
python3 eval/run_eval.py # golden-set evaluation (spawns claude)
Project docs (Korean): PLAN.md · ARCHITECTURE.md · RESEARCH.md · gate criteria in GATES.md.
License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prompt_tailor-0.1.0.tar.gz.
File metadata
- Download URL: prompt_tailor-0.1.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a77066580b35c89ce31f917204f8713c5a4fa07a7baae0d2d0d8b9f4214c658a
|
|
| MD5 |
ea7364b0595c4985187c710527db9e09
|
|
| BLAKE2b-256 |
0f06aa7fe57ad1cf169e4adba6710b881dea0c4a470ca81809604bbc91b3be6a
|
Provenance
The following attestation bundles were made for prompt_tailor-0.1.0.tar.gz:
Publisher:
publish.yml on Createyouracccount/PromptTailor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prompt_tailor-0.1.0.tar.gz -
Subject digest:
a77066580b35c89ce31f917204f8713c5a4fa07a7baae0d2d0d8b9f4214c658a - Sigstore transparency entry: 2475237026
- Sigstore integration time:
-
Permalink:
Createyouracccount/PromptTailor@4d6b0b30b8ee62c6627baeaa459676c1a1dc2532 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Createyouracccount
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d6b0b30b8ee62c6627baeaa459676c1a1dc2532 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file prompt_tailor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prompt_tailor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2478eb53085f0303c6c3e399b0504301a7a77175d67fa23226bab0379e51e195
|
|
| MD5 |
57a63f40d821bee2882c8ce0aecd3f34
|
|
| BLAKE2b-256 |
3f3765e0e838c29bd823681a6bef1d2208b0580656b4a5ae3b2b5bdad2cb89d9
|
Provenance
The following attestation bundles were made for prompt_tailor-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Createyouracccount/PromptTailor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prompt_tailor-0.1.0-py3-none-any.whl -
Subject digest:
2478eb53085f0303c6c3e399b0504301a7a77175d67fa23226bab0379e51e195 - Sigstore transparency entry: 2475237061
- Sigstore integration time:
-
Permalink:
Createyouracccount/PromptTailor@4d6b0b30b8ee62c6627baeaa459676c1a1dc2532 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Createyouracccount
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d6b0b30b8ee62c6627baeaa459676c1a1dc2532 -
Trigger Event:
workflow_dispatch
-
Statement type: