Cursor prompt to build a to-do app
A scoped prompt for spinning up a working to-do app without the feature sprawl agents tend to add. Paste it into Cursor's Agent mode in an empty workspace and you end up with a persisted task list, optimistic toggling, and an undo path, all reviewable as individual diffs before you accept anything.
Last updated
Scaffold a to-do app in this workspace using {{language}} with {{database}} for persistence. Create three parts: a tasks table or collection with id, title, done, and created_at, a data layer in src/lib/tasks with create, toggle, and delete functions, and a single list view at the app root. The list needs an input that adds on Enter, a checkbox that toggles done with an optimistic update, and a delete button that skips confirmation but supports undo for five seconds. Handle the empty state with a short line of copy, not a blank screen. Do not add auth, folders, or tags. Write one test file covering the three data layer functions, nothing UI level. When finished, run that test file from the integrated terminal, start the dev server to confirm a clean compile, then list every file you created or changed so I can review each diff before accepting.Customize it
Runs in your browser. Nothing you type here is sent anywhere.
Scaffold a to-do app in this workspace using TypeScript with PostgreSQL for persistence. Create three parts: a tasks table or collection with id, title, done, and created_at, a data layer in src/lib/tasks with create, toggle, and delete functions, and a single list view at the app root. The list needs an input that adds on Enter, a checkbox that toggles done with an optimistic update, and a delete button that skips confirmation but supports undo for five seconds. Handle the empty state with a short line of copy, not a blank screen. Do not add auth, folders, or tags. Write one test file covering the three data layer functions, nothing UI level. When finished, run that test file from the integrated terminal, start the dev server to confirm a clean compile, then list every file you created or changed so I can review each diff before accepting.
Same task in other tools
Questions about this prompt
Does the agent set up the database, or do I need it running first?
The prompt defines the table shape but does not order a migration run, so whether the agent writes migration files or inlines the schema depends on the stack it picks. Have your database reachable locally before you start, and add one line telling it to apply migrations if you want that step. If the connection fails, agents tend to quietly fall back to in-memory storage, which hides persistence bugs, so watch the terminal output on the first run.
How do I pin this to a specific framework?
Add one line naming the framework at the top and @-mention your package.json so Cursor reads the real dependency list instead of guessing. Referencing an existing component file also anchors the styling conventions it will copy.
The agent keeps adding tags, due dates, or auth anyway. How do I stop it?
Keep the explicit exclusion sentence in the prompt, and when scope creep still shows up, reject just those diffs in the review pane and reply with a request to remove everything outside the spec. Rejecting per file is faster than regenerating the whole app.