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
24votes
2answers
2.8kviews

Output contract that makes the model write code future-me won't hate

My gripe isn't that AI code is wrong, it's that it is unmaintainable: 80-line functions, clever one-liners, no seams for testing, magic numbers everywhere. It passes review by looking confident. I sto
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
24votes
2answers
3.4kviews

Low-poly procedural terrain in three.js that regenerates from a seed with a flat-shaded look

I was chasing that faceted low-poly island aesthetic. My first attempts used a smooth normal PlaneGeometry so it looked like melted plastic, not crisp facets. Also the terrain wasn't reproducible so I
24votes
2answers
3.0kviews

Prompt that writes the migration AND a reversible down-migration, not just the ALTER

Models are great at spitting out ALTER TABLE statements and terrible at remembering that migrations run on live data with existing rows. I got burned adding a NOT NULL column with no default to a tabl
23votes
2answers
2.9kviews

Prompt for a log-tailing CLI that parses, filters, and summarizes without loading the whole file

I wanted a small tool to slice gigabyte-sized JSON-lines logs by level and time range and print a summary, but the first version the model gave me did open(f).read() and json.loads on the whole thing,
23votes
2answers
4.2kviews

Support-agent system prompt with escalation rules that actually hand off cleanly

I build customer support bots and the recurring failure is the bot pretending it can do things it can't (issue refunds, change a subscription) and then dead-ending the user. Or the opposite: it escala
23votes
2answers
2.7kviews

Real-time metrics dashboard with sparkline gauges over a websocket feed

I was building a live ops board that streams a few dozen metrics over a websocket, each shown as a number plus a rolling sparkline. The naive build re-rendered the entire React tree on every message a
23votes
2answers
2.8kviews

System prompt to give a chatbot a consistent personality without it getting cutesy

Giving a bot "personality" usually means it starts every message with a quip and an emoji and becomes exhausting by the third turn. I wanted a distinct, dry voice that stays out of the way. The approa
22votes
0answers
2.3kviews

Planning-loop prompt that makes an agent decompose before it touches any tools

Our agents were too eager. Given a task they'd immediately start editing files, then discover halfway through that the approach was wrong and thrash. Latency and token cost ballooned from all the back
22votes
1answers
4.6kviews

How I prompt a platformer jump that feels like Celeste, not like a brick

The single biggest reason AI platformers feel bad is the jump. You get gravity, you get a jump impulse, and it's stiff and unforgiving. The magic is all the invisible assists that pro platformers ship
22votes
2answers
4.1kviews

One-shot prompt that scaffolds a Next.js 14 App Router SaaS that actually compiles

I kept asking for "a Next.js SaaS starter" and getting a pile of files that referenced components that didn't exist, mixed the pages and app routers, and threw 40 type errors on first pnpm build. The
22votes
1answers
2.2kviews

Debugging an intermittent asyncio race the model kept papering over

Had a flaky test that failed maybe 1 in 30 runs. Every model I tried "fixed" it by adding an await asyncio.sleep(0.1) somewhere, which is not a fix, it is a bribe. The real bug was two coroutines muta
22votes
2answers
2.9kviews

One-shot prompt that builds a complete SaaS landing page with pricing table

I kept iterating on landing page prompts and finally landed on one that reliably produces a polished SaaS landing page in a single shot: hero, feature grid, pricing table, FAQ, and footer, all respons
22votes
2answers
3.2kviews

One-shot three.js hyperspace starfield that stays 60fps on a laptop trackpad

I wanted the classic warp-speed starfield but every naive attempt spawned 20k separate Mesh objects and my fans took off. The trick was forcing the model to reach for InstancedMesh (or a single Points