agentleFS
ferhatatagunferhatatagun/prompt-lab/skills/prompt-ab-test/SKILL.md

prompt-ab-test

Skill4 starsChanged 3 days agoMITView on GitHub

Compares two Claude prompts (or two models) on the same input using output, cost and latency instead of gut feeling. Use when the user is iterating on a system prompt, asks which of two prompts or models is better, or wants to know if a shorter prompt loses quality.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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
  1. Distinctive:

    Inputs: use 3-5 representative user messages, not one.

    line 12
  2. Distinctive:

    Criteria before you look: write down what "better" means (correct, on-format, complete, tone) so you do not rationalise afterwards.

    line 13
  3. Distinctive:

    Never send the user's prompts anywhere without agreement.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prompt A/B Test

"Which prompt is better" should come with numbers. Same input, two variants, compared side by side.

Set up the experiment

  1. Variants: A and B each define model, system prompt and (only where supported) temperature. Change one thing at a time.
  2. Inputs: use 3-5 representative user messages, not one. Include a hard or edge case.
  3. Criteria before you look: write down what "better" means (correct, on-format, complete, tone) so you do not rationalise afterwards.

Collect per run

Output text, output tokens, input tokens, estimated cost, time to first token, total time. Take costs from usage and prices from references/models.md of the claude-api-xray or prompt-preflight skill if available; say if prices are an assumption.

Compare

For each input:

  • Cost: ratio, "A is 4.3x cheaper".
  • Speed: TTFT and total time ratio.
  • Length: output tokens ratio; longer is not better by itself.
  • Quality: judge against the criteria you wrote down. Point at concrete differences in the text.

Then aggregate across inputs and give a verdict: winner on cost, on speed, on quality, and the trade-off ("B is 28% cheaper and 41% faster with no loss on the required fields").

Rules

  • Models that reject sampling parameters (most current ones) do not get temperature; do not make it a variable there.
  • Outputs vary run to run. If the verdict is close, repeat before deciding.
  • Never send the user's prompts anywhere without agreement; if running through the API, read the key from the environment and never ask for it in chat.

Side-by-side runner with parallel streaming (bring your own key, nothing leaves the browser): https://prompt-lab-promptly.vercel.app, source github.com/ferhatatagun/prompt-lab.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.