A walkthrough of a typical development session building a user settings page.
Load the project context and check the current state:
> /context load dev
> What's the current state of the settings feature? Check the issue and any existing code.
Claude reads the linked issue, scans the codebase for existing settings-related files, and summarizes what exists and what needs to be built.
Ask Claude to create a plan before writing code:
> Plan the implementation for the user settings page. Break it into steps.
Claude produces a task list:
- Add
settingstable migration with user preferences columns. - Create the settings repository and service.
- Add tRPC procedures for get/update settings.
- Build the settings form component with validation.
- Write tests for the service and API layer.
Work through each step, verifying as you go:
> Start with step 1. Create the migration for the settings table.
Claude generates the migration SQL, runs db:migrate, and confirms it applied.
> Now create the repository and service for settings. Follow the existing patterns.
Claude finds the existing UserRepository as a reference, creates SettingsRepository
and SettingsService matching the same patterns.
Write tests for each layer before moving to the next:
> Write unit tests for SettingsService. Cover the happy path and error cases.
Claude creates test file, runs the suite, fixes any failures. Only then moves to the API and UI layers.
For UI work, check the rendered output:
> Start the dev server and take a screenshot of the settings page.
Claude starts the server, navigates to the page with Puppeteer, and shares a screenshot for review.
Before creating the PR, review your own changes:
> Review all the changes in this branch. Check for missing error handling,
type safety issues, and test coverage gaps.
Claude runs git diff main...HEAD, reviews each file, and flags any issues to fix
before the PR.
> Create a PR for this branch. Link it to issue #42.
Claude pushes the branch, creates the PR with a structured description, and links the issue.
Save learnings and context for the next session:
> Wrap up this session. Save what we learned and any follow-up items.
Claude updates the session notes in CLAUDE.md with decisions made, patterns discovered, and pending work for the next session.