$ chip ~/vibe-drops

prompt-playbook_

Is your prompt the reason the model keeps missing? Tap the weak prompt, then the strong one — and see exactly what changed.

Interactive take on The Prompt Engineering Playbook for Programmers by Addy Osmani.

01 / the two-second demo

A function meant to index users by ID throws TypeError: Cannot read property 'id' of undefined. Two prompts, two answers. Tap each to reveal.

tap a card to reveal its answer

$ diff poor.txt improved.txt

02 / pick your job

Osmani structures the playbook around three jobs. Pick one to see its pattern, then the builder below will follow it.

$ debug

Fix a bug

Describe symptoms precisely, then steer the model through the code.

$ refactor

Clean up code

Name what "better" means — the model can't read your mind.

$ feature

Build something new

Plan first, then build in small, checkable steps.

$ rescue — the response missed anyway

03 / assemble your prompt

Fill what applies. The builder turns it into a prompt that follows the playbook — and tells you which principles you used.

prompt.txt

    

principles applied

The seven principles, in one line each
  1. Rich context. The model knows only what you hand it — language, framework, code, errors.
  2. Specific goal. Name the insight you want, not just the symptom you're seeing.
  3. Break tasks down. Big jobs get small prompts, built on each other, checked as you go.
  4. Examples of input and output. One example of correct behavior removes most ambiguity.
  5. Roles and personas. Ask it to act as a reviewer, mentor, or expert to set the bar.
  6. Iterate. Coach the first draft — the model remembers the thread, so steer it.
  7. Clean code. Clear names and consistent style in your code give the model better clues.
copied