explaingit

li-bailiang/prompt-refine-skill

21PowerShellAudience · developerComplexity · 1/5LicenseSetup · easy

TLDR

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.

Mindmap

mindmap
  root((prompt-refine-skill))
    What it does
      Rewrites prompts per model
      Stays invisible to user
      Verbose diff mode
    Supported Models
      Claude XML style
      GPT plain text style
      Gemini and Llama
    Supported Tools
      Claude Code
      Cursor
      GitHub Copilot
    Design
      Zero dependencies
      No extra network calls
      Single git clone install
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Automatically reformat your prompts so Claude receives XML-structured requests and GPT receives plain-text goal-instructions without you changing anything.

USE CASE 2

Use verbose mode to learn what prompt structure each AI model prefers by seeing before-and-after diffs of your requests.

USE CASE 3

Install once into Claude Code or Cursor and get better AI answers on vague or ambiguous questions without rewriting them manually.

Tech stack

PowerShell

Getting it running

Difficulty · easy Time to first run · 5min

Single git clone into your AI tool's skills folder, zero runtime dependencies and no network calls.

MIT license, use freely for any purpose, including commercial, as long as you keep the copyright notice.

In plain English

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.

Copy-paste prompts

Prompt 1
I use both Claude Code and Cursor daily. Show me how to install prompt-refine-skill in each tool and explain how the model-routing logic decides which format to apply.
Prompt 2
Enable verbose mode in prompt-refine-skill and show me an example of how a vague coding request looks before and after refinement for Claude vs GPT.
Prompt 3
I want to add a custom strategy for a new AI model in prompt-refine-skill. Walk me through adding a strategy file and registering it.
Open on GitHub → Explain another repo

← li-bailiang on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.