21votes
2answers
2.7kviews

Animated SVG flow-field lines that stay crisp at any zoom, seeded and hand-tuned

I love flow fields but canvas ones get blurry when someone zooms the page or exports to print. I wanted the same look as pure SVG paths so it stays vector-crisp forever. My naive prompt drew thousands
10votes
2answers
2.2kviews

Prompt that adds characterization tests before it touches legacy code

I inherited a 12-year-old billing module with zero tests and a maze of nested conditionals. Every time I asked Claude to "refactor this to be cleaner" it happily rewrote the control flow and silently
14votes
1answers
2.7kviews

Guardrail prompt to stop an autonomous coding agent from running destructive commands

My coding agent has shell access in a sandbox, and twice it decided the cleanest fix for a failing test was git reset --hard or rm -rf nodemodules && reinstall mid-task, nuking uncommitted work. Sandb
24votes
2answers
4.2kviews

System prompt for a dark-mode-first design token set that isn't just inverted grays

Every "add dark mode" prompt gives me pure black backgrounds, fff text, and one flat gray for everything. It looks like a terminal, not a product, and the contrast is actually too harsh at night. I tu
36votes
2answers
3.4kviews

Prompt for a typed third-party API client with real retry and error handling, not fetch soup

Every "integrate the Stripe/Notion/whatever API" answer I got was a bare fetch with no timeout, no retry, and a catch (e) { console.log(e) } that swallowed everything. Then it fell over the first time
14votes
2answers
2.2kviews

One-shot D3 time-series line chart that infers types from a messy CSV header

I kept feeding the model a CSV export from our analytics tool and getting a chart where the x-axis was treated as strings, so December sorted before February. The naive prompt ("plot this CSV as a lin
24votes
2answers
2.8kviews

Prompting a multi-step onboarding flow that people actually finish (not a 9-field wall)

Growth eng here. Our old signup was a single screen with nine fields and a 38% completion rate. I wanted AI to help me design a progressive flow, but the naive prompt just gave me the same nine fields
26votes
1answers
2.2kviews

Prompt for a pandas cleaning script that validates the schema before it trusts the CSV

I get monthly CSV exports from a vendor and the columns silently drift: a header gets renamed, a numeric column arrives with stray $ and commas, dates flip between MM/DD and DD/MM. My old script assum
27votes
2answers
2.8kviews

One prompt for a convincing CRT / arcade shader overlay on a canvas game

I wanted my pixel games to look like they're running on an old arcade monitor, not a crisp modern LCD. Most AI attempts gave me faint horizontal lines and called it a CRT, which fools nobody. Asking f
18votes
1answers
2.2kviews

Prompt for docstrings that document the WHY and the gotchas, not just the params

Auto-generated docstrings are useless: they restate the function signature in English. def add(a, b): """Adds a and b.""". Thanks. I wrote a prompt that reads the function body and forces it to docume
11votes
1answers
1.4kviews

Using :has() to restyle a form layout when a checkbox is toggled, no JS state

I have a shipping form with a "billing address same as shipping" checkbox. Toggling it should collapse the billing fields and shift the layout. I was about to reach for JS class toggling out of habit.
30votes
3answers
3.8kviews

Print-ready seeded generative SVG art: one prompt, ten unique pieces from ten seeds

I sell small generative prints, so I need SVG (vector, scales to any paper size) that is fully reproducible from a seed and looks curated across a whole edition, not just one lucky render. Early promp
13votes
0answers
3.1kviews

Prompt for reviewing a diff with severity levels instead of vague nitpicks

Our AI code reviews were noise: a wall of "consider renaming this" and "you could add a comment" mixed in with the occasional actual security bug, all weighted the same. People started ignoring the bo
16votes
2answers
4.0kviews

LLM-as-judge rubric prompt for scoring agent answers without grade inflation

I needed automated evals for an agent and reached for LLM-as-judge. First attempt: "rate this answer 1-10." Everything got a 7 or 8, the scores didn't correlate with human labels, and a slightly longe
18votes
2answers
2.0kviews

Choropleth of US counties with a projection and legend that don't lie

I was mapping a rate per county and the first output used Web Mercator, which visually inflates the northern counties and makes the whole map misleading for anything area-related. It also binned the d