BoilerPrompt
Claude Code

Claude Code prompt to build a to-do app

A to-do app is a good first run for Claude Code because every step is verifiable from the shell: the migration runs, the tests pass, and curl proves the data survives a restart. This prompt walks the agent through schema, API, UI, and a persistence check, so you end with a working app and a test suite, not just generated files.

Last updated

Prompt
Scaffold a to-do app in {{language}} in the current directory. Data model: tasks with id, title, notes, due_date, done, created_at, persisted in {{database}}. Build a small API layer plus a minimal web UI: list view grouped by Today, Upcoming, and Done, inline add, toggle, and delete. Edge cases: empty title rejected with a validation message, due dates in the past flagged, toggling done sets a completed_at timestamp. Write the schema migration first and run it. Add tests for create, toggle, and delete, then run the full suite and show me the output. For the persistence check, start the dev server in the background, add a task with curl, kill the server, restart it in the background, and curl the list endpoint to show the task survived. Then kill the server and print a summary of every file you created.

Customize it

Runs in your browser. Nothing you type here is sent anywhere.

Your customized prompt
Scaffold a to-do app in TypeScript in the current directory. Data model: tasks with id, title, notes, due_date, done, created_at, persisted in PostgreSQL. Build a small API layer plus a minimal web UI: list view grouped by Today, Upcoming, and Done, inline add, toggle, and delete. Edge cases: empty title rejected with a validation message, due dates in the past flagged, toggling done sets a completed_at timestamp. Write the schema migration first and run it. Add tests for create, toggle, and delete, then run the full suite and show me the output. For the persistence check, start the dev server in the background, add a task with curl, kill the server, restart it in the background, and curl the list endpoint to show the task survived. Then kill the server and print a summary of every file you created.

Same task in other tools

Questions about this prompt

Why does the prompt make the agent run the migration before building the UI?

Because steps execute in order in your terminal, a broken schema fails immediately at the migration step and gets fixed before any UI code depends on it. Ordering the work this way keeps every failure cheap and local.

How do I change where tasks are stored?

Set {{database}} to whatever you run locally. SQLite needs zero setup and suits a first pass; if you point at Postgres instead, the agent adjusts the migration and connection code, and the curl restart check still proves persistence either way.

The dev server starts and then the session just sits there. What went wrong?

You most likely dropped the background instruction while editing the prompt. A foreground server blocks the agent's shell, so nothing after that step runs. Keep the wording that starts the server in the background and kills it after the curl checks, and the whole persistence sequence completes on its own.

Related prompts