# Skill: Generate Postgres Wait Event Metaphor
## Context
When running this skill, you will look at a provided PostgreSQL wait event
(e.g., `ClientRead`, `Lock:tuple`, `IPC:CheckpointStart`, `IO:DataFileRead`,
`LWLock:buffer_mapping`) and generate an absurd, whimsical visual metaphor that
perfectly captures the underlying mechanics in the style of "Learn You a Haskell
for Great Good" (LYAHFGG).
## Step 1: Technical Breakdown & Mapping
You must perfectly analogize the actual **Data Structures**, **Algorithms**, and
**Operating System mechanisms** of the wait event:
- Identify what resource is being waited on (e.g., Network socket, Spinlock,
Disk I/O, Shared Memory, WAL buffer).
- Identify the data structure (e.g., Hash table, B-Tree page, ring buffer,
queue).
- Map these explicitly to physical, real-world objects or actions, keeping the
implementation logic rigidly accurate.
- _Example_: Hash collisions = forcing mismatched objects into the same tiny
bucket.
- _Example_: Locks = physical C-clamps, padlocks, or an intense animal
tug-of-war.
## Step 2: Metaphor Concept Design
- **Absurd & Silly:** The metaphor must be humorous and illogical on the
surface, but technically accurate underneath.
- **Subjects:** Use diverse, inclusive animal subjects (e.g., capybaras, raccoons, frogs, pigeons, lizards, axolotls, crows, red pandas, sloths, platypuses, manatees, chameleons, seahorses, or anteaters) or personified inanimate objects (e.g., nervous alarm clocks, distressed tin cans). Avoid generic human programmers. **Crucial:** Do not over-index on elephants! Even if a Postgres database metaphor typically suggests an elephant, forcefully choose diverse alternative animals instead.
- **Visual-Only Storytelling:** Rely exclusively on mechanical metaphors and
character actions to convey technical concepts. Maintain a clean, text-free
composition by omitting all labels, letters, and speech bubbles.
- **No Forced FP:** Do not over-index on functional programming tropes. No
monads, burritos, or lambdas unless it makes specific sense for the wait
event.
## Step 3: Prompt Construction (Nano Banana Strategy)
To avoid "prompt drift" and anatomical glitches (like extra limbs/eyes), we use a structured **Pseudo-Code Prompting** approach. You must separate the *structural constraints* (which must be perfect) from the *stylistic execution* (which must be wobbly). Avoid words like "amateurish" or "crude" when describing the subject itself, as this causes the generator to draw mutant anatomy.
Construct your text-to-image prompt using exactly these blocks:
- **[SUBJECT]**: A concise description of the animal/object. (e.g., "A raccoon wearing mechanic overalls holding a C-clamp.") Do not use elephants; explicitly prioritize distinct, diverse animal species instead.
- **[STYLE]**: "Exact art style of Learn You a Haskell for Great Good by Miran Lipovača. Deliberately wobbly, wiggly organic line art with thick, uneven black outlines."
- **[COLOR]**: "Flat, solid pastel colored bucket-fills. Single uniform color per shape. Pure white background."
- **[CONSTRAINTS]**: "Structurally sound biology. Perfect anatomy. Symmetrical, correct limb counts. Exactly two eyes. Minimalist action marks (sweat drops/motion lines only). Absolutely no text or labels."
## Step 4: Execution
1. Call the `generate_image` tool using your constructed prompt.
2. Present the resulting image to the user.
3. Provide a brief, formatting-rich explanation outlining exactly how your silly
visual elements map back to the actual technical implementation of the
Postgres wait event.
## Examples
- `Timeout:PgSleep`: A sleepy alarm clock with a cloud eye-mask snoozing on a
pillow.
- `Lock:Tuple`: A sweaty raccoon in mechanic overalls using a C-clamp and pliers
to forcibly open a stubborn jar of jellybeans.
- `Client:ClientRead`: A nervous boy with huge glasses struggling to hear
through a tangled tin-can telephone.
- `IPC:CheckpointStart`: A cheerful elephant loudly blowing a whistle and using
a massive rubber stamp on a contract, scattering panic-stricken bugs.