gitmyhub

prompt-refine-skill

Python ★ 84 updated 2d ago

Agent Skill that silently refines prompts for the currently running model

An AI coding assistant add-on that silently rewrites your questions into the format each specific AI model (Claude, GPT, Gemini, Llama) responds to best, then shows you only the final answer.

PowerShellsetup: easycomplexity 1/5

Prompt Refine is an agent skill, a small add-on that you install into an AI coding assistant such as Claude Code, Cursor, or GitHub Copilot. Once activated, it silently rewrites your questions into a format that the specific AI model you are talking to tends to respond to more accurately, then shows you only the final answer. You see the same result you asked for, but the model received a more structured version of your request.

The design choice that distinguishes this from other prompt tools is that it routes by which AI model is currently answering, not by what you are asking. If you are talking to Claude, the skill structures your question in the style Anthropic recommends for Claude, using XML tags to separate the role, context, task, constraints, and success criteria. If you are talking to GPT, it uses OpenAI's preferred plain-text goal-plus-instructions format instead. A writing task never makes Claude behave like GPT, and a coding task never makes GPT behave like Claude. The strategy follows the host model.

For short, clear requests the skill is designed to stay out of the way and preserve your constraints exactly. For vague requests it adds shape: it makes assumptions explicit, flags what is unknown, and avoids inventing facts. You can turn on a verbose mode to see a compact summary of what changed between your original request and the refined version, which is useful for learning what the refinement added.

Installation is a single git clone into a folder that your AI tool watches for skills. The exact folder path differs by tool but a table in the README covers Claude Code, Cursor, Gemini CLI, OpenAI Codex, GitHub Copilot, Windsurf, and CodeBuddy. The skill itself has zero runtime dependencies and makes no extra network calls to a separate optimization service.

Built-in strategy files cover Claude, GPT, Gemini, and Meta Llama. The README describes the strategy for each model family and includes side-by-side examples showing how the same vague request gets reshaped differently depending on which model is active. The project is licensed under MIT.

Where it fits