prompt-diff
Skill2 starsChanged 3 months agoMITView on GitHub
Compare two versions of the system prompt (or any other
In this repository4 other files it gives its agents.
- add-toolSkill
- agent-evalSkill
- deploy-agentSkill
- trace-debugSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Ask exactly one clarifying question if any input is missing.
- Distinctive: line 38
Keep them in the repo tree so future runs can be re-diffed.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
prompt-diff
Purpose: give the user evidence — not vibes — that prompt A is better than prompt B for the workload the evals actually cover.
When to fire
- The user says: "which prompt is better", "A/B this prompt", "diff prompts", "compare prompt versions", "should I use prompt X or Y".
- The user pasted two prompt strings, or pointed at two prompt files, or
is comparing HEAD vs a previous commit of
./agent/prompts/system.ts.
Inputs you need
Before starting, confirm:
- Prompt A — the baseline. Usually the current
SYSTEM_PROMPTexport from./agent/prompts/system.ts. - Prompt B — the candidate. Either a string the user provided or another commit / file to read.
- Case set — default to everything under
./evals/cases/. If the user wants a subset, filter bytagson each case.
Ask exactly one clarifying question if any input is missing.
Steps
- Save both prompts into temp files under
eval-results/prompts/:prompt.A.txtprompt.B.txtKeep them in the repo tree so future runs can be re-diffed.
- Run the suite twice, once per prompt. The runner reads
SYSTEM_PROMPTat import time, so patch the import via an env override rather than editing the file. Use this pattern:
(If the env override isn't wired yet, tell the user — do NOT editAGENT_SYSTEM_PROMPT_FILE=eval-results/prompts/prompt.A.txt \ npm run eval:ci mv eval-results/summary.json eval-results/summary.A.json AGENT_SYSTEM_PROMPT_FILE=eval-results/prompts/prompt.B.txt \ npm run eval:ci mv eval-results/summary.json eval-results/summary.B.jsonsystem.tsand commit it silently.) - Produce the diff. For each case ID, report:
- Pass status: A ✓ vs B ✗ (regression), A ✗ vs B ✓ (improvement), equal (skip in report).
- Step count delta.
- Duration delta (informational only — don't optimize on it).
- Tool-call set delta (did B start using or stop using a tool?).
- Summarize in this shape:
Prompt A: <passed>/<total> avg steps <n> Prompt B: <passed>/<total> avg steps <n> B wins on: <case ids> A wins on: <case ids> No difference: <count> - Recommend. State a recommendation (adopt B, keep A, mixed — need more cases) and back it with the numbers, not adjectives.
Definition of done
- Both prompts stored in
eval-results/prompts/for reproducibility. - Both summary JSONs kept, not overwritten.
- Report includes at least one concrete case per "wins on" bucket, with the failure message quoted.
- You did NOT overwrite
./agent/prompts/system.tswithout an explicit user instruction.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

