Learn Claude Code by Building DevPulse · Prompts

Every prompt, ready to copy

Every prompt and command from the series, in order, exactly as we used them when building DevPulse (recorded 29 Oct 2026, Claude Code 2.1.312). Type it in your own words first; copy only if you are stuck or behind. Your answers from Claude will differ a little; that is normal.

Chapter 0 · Getting set up

Read the chapter →
Windows · PowerShell
irm https://claude.ai/install.ps1 | iex
Mac · Terminal
curl -fsSL https://claude.ai/install.sh | bash

Installs Claude Code. Windows: PowerShell, not the (x86) one. Then open a new terminal.

Type in PowerShell (Mac: Terminal)
claude --version

You should see a version number and (Claude Code). "Not recognized"? See the PATH fix in the install guide.

Windows · PowerShell
mkdir C:\code\hello
cd C:\code\hello
claude
Mac · Terminal
mkdir -p ~/code/hello
cd ~/code/hello
claude

The first start signs you in: choose Claude account with subscription, then trust the folder.

Type in PowerShell (Mac: Terminal)
claude doctor

The health check, outside Claude: "No installation issues found".

Type into Claude Code
Create a file called hello.txt with one line about what I want to build.

Your first request. Guess first: will it ask before creating the file?

Chapter 1 · A first DevPulse page

Read the chapter →
Windows · PowerShell
mkdir projects\devpulse
cd projects\devpulse
claude
Mac · Terminal
mkdir -p projects/devpulse
cd projects/devpulse
claude

Claude Code works inside one folder. Trust it: it is your own.

Type into Claude Code
Make me a single web page called DevPulse where I can type what I worked on today and how many minutes it took, and see today's list. Plain HTML, CSS and JavaScript.

Says what, for whom, and the technology. It does not say how to save: watch what Claude decides alone.

Windows · type into Claude Code
! start index.html
Mac · type into Claude Code
! open index.html

! runs a terminal command without leaving Claude.

Type into Claude Code
Add a weekly summary under the list

Press Esc after a few seconds: Claude stops, and your words come back.

Type into Claude Code
@index.html explain this file in three lines

@ points at one file; Tab picks it from the list.

Type into Claude Code
List every decision you made in index.html that I did not ask for.

The homework. Guess first: three, or ten?

Chapter 2 · Tasks saved in a file, and a Week view

Read the chapter →
Press
Shift+Tab

Press it until the footer says plan mode on.

Type into Claude Code
Plan DevPulse properly before any code. Tasks have a title, a tag and minutes. Save them in data/tasks.json through a small Python server that uses only the standard library. Two views: Today (add, list, mark done) and Week (hours per day and a streak of days with at least one task). Ask me questions if anything is unclear.

"Ask me questions" is what makes plan mode ask. Answer them while you are at the screen.

Type into Claude Code
One change: show minutes as 1 h 30 min everywhere in the app.

After choosing "Tell Claude what to change" on the plan. Then approve with "Yes, manually approve edits".

Windows · PowerShell
cd projects\devpulse
python server.py
Mac · Terminal
cd projects/devpulse
python3 server.py

In a second terminal tab (Ctrl+Shift+T; Mac: Cmd+T). Then open http://127.0.0.1:8000.

Chapter 3 · Project rules Claude remembers

Read the chapter →
Type into Claude Code
Add an edit button to each task, to change its title, tag and minutes.

In a new session: watch it rediscover the project. Esc, then Esc Esc to rewind.

Type into Claude Code
/init

Writes CLAUDE.md from what it sees in the code.

Type into Claude Code
Add our rules to CLAUDE.md: the server uses only the Python standard library; the front end is plain JavaScript in index.html with no npm packages or frameworks; run the app with python server.py; run the tests with python test_server.py; times always show as "1 h 30 min".

The decisions only you know. Keep them short: every line is read in every session.

Type into Claude Code
remember that I like short commit messages

Auto memory: about you, not the project. Check with /memory and /context.

Chapter 4 · Undo, and git

Read the chapter →
Type into Claude Code
Give DevPulse a modern makeover.

A big change on purpose, so we can undo it. Then /diff, and Esc Esc → Restore code and conversation.

Type into Claude Code
Set up git for this project. Keep data/tasks.json and Python caches out of git, and commit what we have.

Your tasks stay private. If git asks for your name: git config --global user.name and user.email, once.

Type into Claude Code
/plugin

Discover → search commit-commands → check it is by Anthropic → Install for you (user scope).

Type into Claude Code
Show today's total time in the browser tab title, like "DevPulse - 2 h 50 min".

A small change, to commit.

Type into Claude Code
/commit-commands:commit

Writes the commit message and commits. Then ! git log --oneline.

Chapter 5 · Tests for the streak

Read the chapter →
Type into Claude Code
Move the streak calculation out of index.html into streak.js so it can be tested, and write tests for it in streak.test.js with node's built-in test runner. Include a task logged at 00:30 India time (set TZ=Asia/Kolkata in the test). Don't change how the streak works.

"Don't change how the streak works" keeps the move separate from any fix.

Type into Claude Code
! node --test

Run the tests yourself: pass, fail, and how many.

Type into Claude Code
Show me why the 00:30 test matters: change ymd to use toISOString() for a moment, run node --test and show me what fails, then put it back.

Breaks the code on purpose to see what the test protects.

Type into Claude Code
/output-style learning

Claude leaves the key part as TODO(human) for you to write.

Type into Claude Code
Add a best streak, the longest run of days ever, under the streak on the Week view.

Find TODO(human) in streak.js and write bestStreak yourself.

Type into Claude Code
I wrote bestStreak. Check it, add tests for it, and run them.

Claude checks your code. Then /verify, and /output-style default when you are done.

Chapter 6 · A lighter model and a shorter context

Read the chapter →
Type into Claude Code
/usage

Your plan's bars, and when they reset.

Type into Claude Code
/model

Move to Sonnet and press s: this session only. Then /effort.

Type into Claude Code
Read the project and list the open bugs and rough edges you can find, most serious first. Don't change anything.

One big question. Run /context before and after: watch Messages.

Type into Claude Code
/compact keep the DevPulse decisions and the open bug list

Same task, still going: shrink it, and say what to keep.

Type into Claude Code
/btw what does accept edits mode allow?

A side question that is not added to the conversation.

Type into Claude Code
/clear

Something unrelated: start clean. Files, CLAUDE.md and memory stay.

Chapter 7 · A standup skill

Read the chapter →
Type into Claude Code
/simplify streak.js

A built-in skill. Type / to see the others.

Type into Claude Code
Create a project skill called standup in .claude/skills/standup/SKILL.md. It reads data/tasks.json and the git log since yesterday and writes a three-line standup (Yesterday, Today, Blockers) to data/standup.md.

Says where it lives, what it reads, and exactly what it writes.

Type into Claude Code
! cat .claude/skills/standup/SKILL.md

Read what it wrote. Forward slashes: on Windows ! runs Git Bash.

Type into Claude Code
/standup

Your own command.

Type into Claude Code
Add a Standup panel to the Today view that shows data/standup.md.

Then restart the server and refresh.

Chapter 8 · A standup that runs on its own

Read the chapter →
Type in PowerShell (Mac: Terminal)
git log --since=yesterday --oneline | claude -p "turn this into a three-line standup"

Headless: pipe text in, get the answer, done.

Type in PowerShell (Mac: Terminal)
claude -p "Read data/tasks.json and the git log since yesterday; write a three-line standup to data/standup.md" --allowedTools "Read,Write,Bash(git log:*)"

Only the tools it needs.

Type into Claude Code
Wrap that headless standup command in standup.ps1, so I can run it with .\standup.ps1 from this folder. Keep the same allowed tools.

A new session cannot see your terminal history: give it the exact command when it asks.

Windows · PowerShell
.\standup.ps1
Mac · Terminal
Ask for standup.sh instead, then: ./standup.sh

One command, every morning.

Chapter 9 · A code reviewer of our own

Read the chapter →
Type into Claude Code
Use the Explore subagent to find where the streak is calculated and what calls it.

A built-in, read-only helper with its own context.

Type into Claude Code
Create a project subagent called code-reviewer in .claude/agents/code-reviewer.md. Read-only tools (Read, Grep, Glob), model sonnet. It reviews for bugs, security and readability and reports findings with file and line, most serious first.

Read-only, so it can judge but not change. Restart Claude Code afterwards.

Type into Claude Code
Use the code-reviewer subagent to review server.py.

Findings with file:line, most serious first.

Type into Claude Code
Fix finding 1 and add a test for it, then run the tests.

One fix at a time, with a test.

Chapter 10 · Claude sees the app

Read the chapter →
Type in PowerShell (Mac: Terminal)
claude mcp add playwright -- npx -y @playwright/mcp@latest
claude mcp list

Microsoft's open-source browser server. You should see ✓ Connected.

Type into Claude Code
Use the playwright tools to open http://127.0.0.1:8000, resize the window to 390 px wide, take a screenshot and tell me what looks wrong on a phone.

The server must be running in your second tab.

Type into Claude Code
Fix those in index.html with a narrow-screen media query, then check again at 390 px with the playwright tools.

Fix, then look again.

Type in PowerShell (Mac: Terminal)
claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp

A second server, no account needed.

Type into Claude Code
Use the claude-code-docs tools: what is an MCP scope, and which scope did I just use?

Local, project or user: who gets the server.

Chapter 11 · DevPulse tools for Claude

Read the chapter →
Type into Claude Code
/plugin install mcp-server-dev@claude-plugins-official

The official plugin that builds MCP servers.

Type into Claude Code
/mcp-server-dev:build-mcp-server A local stdio server in Python, mcp/devpulse_mcp.py, using the open-source MCP Python SDK in a .venv. Three tools on data/tasks.json: log_task(title, tag, minutes), list_today(), week_summary(). Reuse the validation rules from server.py.

A complete brief, so it can skip its questions. The rule: a stdio server never prints to stdout.

Windows · PowerShell
claude mcp add devpulse -- .venv/Scripts/python.exe mcp/devpulse_mcp.py
claude mcp get devpulse
Mac · Terminal
claude mcp add devpulse -- .venv/bin/python mcp/devpulse_mcp.py
claude mcp get devpulse

Run from the project folder. You should see ✓ Connected.

Type into Claude Code
log 45 minutes on fixing the streak bug, tag backend

Claude calls your log_task tool. Refresh the app.

Type into Claude Code
how did my week go?

Claude calls week_summary.

Chapter 12 · A bug scan in parallel

Read the chapter →
Type into Claude Code
/config

On Pro: switch Dynamic workflows on, and set the size to small. Workflows use many more tokens.

Type into Claude Code
Use a workflow: check each DevPulse file (server.py, index.html, streak.js, mcp/devpulse_mcp.py) for bugs in parallel, then give me one list, most serious first. Don't change any code.

Then /workflows to watch it, and s to save it.

Chapter 13 · Hooks that watch for us

Read the chapter →
Type into Claude Code
Add a Notification hook to .claude/settings.json that beeps on Windows when you need me, and a PostToolUse hook that runs python -m json.tool on data/tasks.json after any edit to it, so a broken file is reported at once.

Restart Claude Code, then /hooks to see both.

Type into Claude Code
To test the hook: use the Edit tool to delete the last closing bracket of data/tasks.json. Then show me what the hook said, and fix the file.

Breaks the file on purpose to see the hook catch it.

Chapter 14 · DevPulse on the internet

Read the chapter →
Type into Claude Code
Create publish.py that builds docs/index.html, a public "What I'm building" page, from tasks tagged public only. Keep data/tasks.json out of git. Then run it.

Only tasks tagged public ever leave your laptop.

Type into Claude Code
Log two tasks tagged public: "Built a Week view with streaks" 90 minutes and "Gave Claude Code its own DevPulse tools" 60 minutes. Then run publish.py again.

Uses your own MCP tools from chapter 11.

Type in PowerShell (Mac: Terminal)
winget install --id GitHub.cli
gh auth login

Do this yourself, in your second tab (Mac: brew install gh). Pick GitHub.com, then "Login with a web browser".

Type into Claude Code
Create a public GitHub repository called devpulse with gh, and push this project to it. Make sure data/ stays out.

data/ must stay out: check it before anything is pushed.

Type into Claude Code
Turn on GitHub Pages for this repository from the main branch, /docs folder, with gh, and give me the live address.

The first build takes a minute or two.

Type into Claude Code
Check that the live page is up and shows no private tasks.

Always check what went public.

Chapter 15 · Claude Code beyond the terminal

Read the chapter →
Type into Claude Code
Change the Add button text to "Log it".

In VS Code's Claude Code panel (Ctrl+Shift+P → Claude Code: Open): see the inline diff.

Type into Claude Code
What does this project do? Answer in three lines. Don't change anything.

In the desktop app's Code tab, or on claude.ai/code with your GitHub repository.