Sandbox
@mfarzanansari/prompt-polish

Prompt rewrite skill for Claude model guides

Prompt Polish rewrites rough prompts into cleaner prompts tailored to a chosen Claude model. It routes the input to the right doctrine file, trims extra wording, and keeps the task unchanged while filling gaps with bracketed placeholders when needed.

42 stars8 forksUpdated 1mo ago
Who it's for

Builders who want their agent to turn rough requests into model-specific prompts without relying on generic prompt advice.

What it delivers

You can hand an untidy prompt to your agent and get back a copy-ready version that fits the target model better.

What it does

Model-specific routing

Maps model names like Fable 5 and Opus 4.8 to separate doctrine files.

Prompt diagnosis

Classifies the input by form, task class, missing intent, and unnecessary noise before rewriting.

Tiered rewriting

Chooses the smallest rewrite level that fits, from light touch to a fuller harness-style prompt.

Hard task gate

Keeps the original task intact, blocks invented details, and preserves unknowns as bracketed placeholders.

Official source grounding

Bases each rewrite on Anthropic’s published prompting guides rather than generic prompt folklore.

Skills CLI install path

Supports installation through `npx skills add` and direct cloning for Claude Code and Codex.

How to get it

  1. 1With the skills CLI — works for Claude Code, Codex, Cursor, Windsurf, and every other…
    npx skills add mfarzanansari/prompt-polish
  2. 2Or clone directly
    # Claude Code
    git clone https://github.com/mfarzanansari/prompt-polish ~/.claude/skills/prompt-polish
    
    # Codex CLI
    git clone https://github.com/mfarzanansari/prompt-polish ~/.codex/skills/prompt-polish
  3. 3Any of these shapes work
    prompt-polish/FABLE 5/review my api code and fix whatever is broken
    prompt-polish/OPUS 4.8/build me a landing page for my coffee brand
    prompt polish / fable / summarize this contract for my cofounder
    polish this for Opus: extract the line items from these invoices

README

prompt-polish

An agent skill that rewrites rough prompts into polished, model-specific prompts — grounded in the official Anthropic prompting guides, not prompt-engineering folklore.

prompt-polish/[MODEL]/[YOUR ROUGH PROMPT]

Why

Most prompt advice is model-agnostic, which makes it wrong for any specific model. Frontier models have diverged: Claude Fable 5 degrades when you micromanage it — the official guide says prompts written for prior models are often too prescriptive and hurt output quality. Claude Opus 4.8 follows instructions so literally that implicit scope is a bug. The same "improvement" helps one model and breaks the other.

prompt-polish encodes each model's official prompting guide as a separate doctrine file and routes your prompt through the right one. No folklore, no cargo-cult — every transformation traces to a published source.

The second idea it encodes: polishing is mostly subtraction. Modern models rarely fail from missing instructions. They fail from missing intent, instruction noise, and habits carried over from older models. The polished prompt is the smallest set of words that makes the target model's defaults work in your favor.

Install

With the skills CLI — works for Claude Code, Codex, Cursor, Windsurf, and every other agent it supports:

npx skills add mfarzanansari/prompt-polish

Add -g for a global (user-level) install instead of per-project, and update later with npx skills update prompt-polish.

Or clone directly:

# Claude Code
git clone https://github.com/mfarzanansari/prompt-polish ~/.claude/skills/prompt-polish

# Codex CLI
git clone https://github.com/mfarzanansari/prompt-polish ~/.codex/skills/prompt-polish

Optional Praxis companion

Praxis Workflow OS defines and approves workflow or task contracts. Prompt Polish can optionally materialize an approved contract as a concise prompt for a supported named model. Praxis remains fully useful without Prompt Polish, and Prompt Polish remains fully useful without Praxis; each project is installed and versioned independently.

To use both globally:

npx skills add mfarzanansari/praxis-workflow-os --skill '*' -g
npx skills add mfarzanansari/prompt-polish -g

When handing off from Praxis, label the input as an approved Praxis contract and include the target model, task form, constraints, approval gates, and done-condition. Prompt Polish adapts the wording without redesigning the workflow.

Usage

Any of these shapes work:

prompt-polish/FABLE 5/review my api code and fix whatever is broken
prompt-polish/OPUS 4.8/build me a landing page for my coffee brand
prompt polish / fable / summarize this contract for my cofounder
polish this for Opus: extract the line items from these invoices

You get back the polished prompt in a copy-ready code block — plus, only when material, a Fill in: line for placeholders you need to complete and a one-line Note: (for example, a refusal-risk warning or an API effort recommendation that can't live inside a prompt). No lecture about what was changed unless you ask.

How it works

  1. Parse and route — model aliases resolve to one doctrine file; only that file is loaded.
  2. Diagnose — the raw prompt is classified by form (one-off message vs. system/harness prompt), class (ask · build · agent · review · design · pipeline), gaps (missing intent, deliverable, done-condition), and noise (instructions the target model makes redundant).
  3. Size — three tiers: light touch, structured, full agentic harness. The smallest tier that fits wins; a two-line question never becomes an operating manual.
  4. Rewrite — using the doctrine file's decision table and snippet library of official, Anthropic-tested language.
  5. Gate — a hard gate guarantees the task is never changed, nothing is invented (unknowns become [BRACKETED PLACEHOLDERS]), and no chain-of-thought-extraction language survives.
prompt-polish/
├── SKILL.md               # model-agnostic contract: parsing, diagnosis, tiers, gates
├── references/
│   ├── fable-5.md         # Claude Fable 5 doctrine
│   └── opus-4-8.md        # Claude Opus 4.8 doctrine (also serves 4.7 requests)
└── agents/
    └── openai.yaml        # Codex interface metadata

Supported models

ModelDoctrineSource
Claude Fable 5 (claude-fable-5)references/fable-5.mdPrompting Claude Fable 5
Claude Opus 4.8 (claude-opus-4-8)references/opus-4-8.mdPrompting Claude Opus 4.8
Claude Opus 4.7routes to opus-4-8.mdclosest published doctrine; noted in output

Unsupported models are declined honestly — the skill never fakes model-specific guidance.

Design principles

  1. Official doctrine only. Every transformation traces to a published guide. Adding a model starts with finding its guide, never with writing rules from memory.
  2. Polishing is subtraction. Every instruction in the output must change the target model's behavior, or it gets deleted.
  3. Smallest tier that fits. Inflation — turning a question into an agent operating manual — is treated as a bug, not thoroughness.
  4. Never drift the task. Same task, better odds. The hard gate rejects rewrites that add deliverables, audiences, or quality bars the user never asked for.
  5. Placeholders over inventions. What only the user knows becomes a bracketed placeholder. Nothing is ever fabricated to make a prompt look complete.

Extending to a new model

  1. Find the model's official prompting guide.
  2. Distill it into references/<model-slug>.md following the existing structure: model profile → free-by-default list → decision table → snippet library → skeletons → final check.
  3. Add an alias row to the routing table in SKILL.md.

License

MIT

Files in the repo

Repository payload8 top-level entries
  • agents
  • references
  • .gitignore
  • CHANGELOG.md
  • LICENSE
  • README.md
  • SKILL.md
  • VERSION

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k

Agent skill for beautiful, verifiable architecture, workflow, sequence, data-flow, and lifecycle diagrams—self-contained HTML with motion and crisp export.

57k
ayghri/
i-have-adhd

A skill to stop your coding agent from burying the answer. ADHD-friendly output.

38k