13votes
0answers
1.6kviews

Stop conditions and loop budget for a ReAct agent so it terminates instead of spinning

Classic ReAct thought/action/observation loop. Two failure modes: it either declares victory too early (before the task is actually verified) or it never stops, re-checking the same thing while convin
12votes
0answers
1.5kviews

Getting a local model to one-shot a Flappy clone with tuned, fair difficulty

I wanted to see how far a local open-weight model could get on a full playable game in one prompt, no follow-ups. Flappy Bird is a good test: simple, but the pipe gap and spacing tuning is what makes
7votes
1answers
1.0kviews

What's the best prompt structure for getting Python scripts with proper error handling?

Every generated Python script I get is happy-path only: no retries, bare excepts, crashes on the first weird input. I've been experimenting with a checklist-style prompt suffix that forces defensive c
25votes
1answers
3.6kviews

Prompt for an agent that reviews PRs and actually finds real bugs, not style nits

I run this as the system prompt for a code-review agent hooked to our CI. Before this, 90% of its comments were style nitpicks nobody wanted. The reframing that fixed it: make the agent predict runtim
16votes
1answers
5.3kviews

Prompt that makes Claude generate a playable Snake game with juice and screen shake

Most snake-game prompts give you a joyless gray grid. I wanted arcade feel: particles, screen shake, an actual difficulty curve. After a lot of trial and error the prompt below consistently produces a
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
10votes
0answers
2.3kviews

System prompt for a customer support agent that knows when to escalate

We shipped a support agent and the biggest problem wasn't wrong answers, it was confident wrong answers on questions it had no business answering. This system prompt made escalation behavior reliable.
7votes
0answers
1.6kviews

Prompt that turns any CSV into an interactive explorable chart page

Drop a CSV in, get a self-contained exploration UI out. The prompt below produces a page that infers column types, picks sensible defaults, and lets you switch dimensions. I use it weekly for one-off
21votes
0answers
4.2kviews

Three.js solar system with orbit controls from a single prompt - sharing what finally worked

Getting a correct-feeling solar system out of one prompt is surprisingly hard: you either get planets orbiting at the same speed or a camera stuck inside the sun. This prompt gets the scale relationsh
12votes
0answers
2.0kviews

How do I prompt for a Next.js dashboard that doesn't look like every other admin template?

Every time I ask for "a dashboard in Next.js" I get the same shadcn-flavored gray boxes. I built a genuinely distinctive analytics dashboard using the prompt below, which forces an editorial, print-in
47votes
3answers
5.3kviews

Reduced-motion-first system prompt so every animation ships with a safe fallback

We had animations scattered across the codebase and maybe half respected prefers-reduced-motion. Auditing after the fact is miserable. I wanted motion to be safe by construction, not by review. So I m
51votes
2answers
6.3kviews

A reusable system prompt for consistent design direction across a whole landing page

The hardest part of prompting UI isn't any single section, it's consistency. Ask for a hero, then a pricing block, then a footer in separate turns and you get three subtly different design languages:
26votes
3answers
6.5kviews

One-shot prompt for a dashboard data table that isn't the same shadcn gray boxes

Every dashboard prompt I tried gave me the identical gray-card-with-a-number-and-a-tiny-line-chart layout, and a table that was just a styled div with none of the behavior that makes a table useful. I
20votes
1answers
5.2kviews

Bounding concurrency in an asyncio scraper so I stop opening 5000 sockets at once

I asked for an async version of a fetcher and the model gleefully did await asyncio.gather([fetch(u) for u in urls]) over 5000 URLs. It opened every connection simultaneously, the event loop thrashed,
29votes
1answers
5.0kviews

Above-the-fold prompt that actually converts without a single dark pattern

I write landing pages for a living and I refuse to ship fake countdown timers, "14 people are viewing this", or manipulative confirmshaming. But when I ask AI for "high-converting" copy it reaches str