Claude Code everyday workflows
Most days you do the same handful of things: understand code, fix something, change something, test it, ship it. Here is a short set of prompts and habits for each, with the flags and shortcuts that save time. The wording of the prompts is yours to change; the pattern is what matters.
Learn a codebase
Start wide, then narrow. Each question builds on the last answer.
give me an overview of this codebase
explain the main architecture patterns here
how is authentication handled?
find the files that handle login, then trace a login from the page to the database
Use the words your project uses, and ask for a short glossary of its own terms. For how Claude explores on its own, see how Claude Code works.
Fix a bug
Give Claude the command that reproduces the problem and the error it prints. Say whether it happens every time or only sometimes. Then ask for options before edits:
npm test fails with the error below. Suggest two or three possible causes and how you would check each.
(then) apply the second fix and run the test again
Refactor in small steps
Ask for the change and the check in the same breath, and keep each step small enough to review.
find deprecated API calls in this repo
refactor utils.js to use modern syntax and keep the behaviour the same
run the tests for the files you changed
If a step goes wrong, rewind to before it.
Write tests
which functions in this file have no tests?
add tests for them, following the style of the existing test files
now add cases for edge conditions: empty input, boundaries, errors
run the new tests and fix any that fail
Claude reads your existing tests and follows their framework and style, so point it at a good example. Be specific about what behaviour should be checked.
Open a pull request
You can ask directly ("create a pr") or go step by step: summarize the change, create the PR, then ask for a better description. Read the result before you submit and ask Claude to point out risks. As we read it, Claude Code links the session to the pull request when Claude creates it with gh pr create (or glab mr create on GitLab), and claude --from-pr 1234, with your own number, opens the session picker filtered to the sessions linked to that PR.
Documentation, images and notes
- Docs: ask which functions lack comments, name the style you want (JSDoc, docstrings), then ask for examples and a check against your project's standards.
- Images: drag a picture into the window, paste it with Ctrl+V (Alt+V on Windows and WSL), or give a file path. Useful for an error screenshot, a design mockup or a diagram.
- Not just code: Claude Code works in any folder. Run it in a notes folder or a pile of markdown files to search and reorganize them.
Point at files with @
Type @ and a path to include a file or folder without waiting for Claude to go and read it: explain the logic in @src/utils/auth.js. A file is included when it fits the read limit (a text file over 256KB is not); a folder gives a listing, not contents. It also pulls in the CLAUDE.md files in that file's directory and its parents. You can reference MCP resources the same way, as @server:resource.
One caution: because an @ reference makes no tool call, your PreToolUse hooks don't run for it. If you use hooks to control what Claude may read, add a Read deny rule for those paths too (see the permissions starter and the hooks guide). The docs also describe an environment variable, CLAUDE_CODE_DISABLE_FILE_MENTIONS, that stops @ references from including content; it needs a recent version.
Pick up tomorrow
claude --continue # the most recent session in this folder
claude --resume # choose from a list (or /resume inside a session)
If there is nothing to continue, Claude Code says so and exits. For a clean restart with a summary, see the handoff note.
Plan first, then edit
When you want to review the plan before anything touches disk, use plan mode: start with claude --permission-mode plan, or press Shift+Tab in a session until the status bar shows plan mode. Claude reads and proposes; it edits after you approve. More in permission modes.
Keep your main chat clean
Reading a lot of files fills the context. Hand the exploring to a helper: use a subagent to investigate how token refresh works in our auth code. It reads in its own window and sends back a summary. See writing a subagent.
Two sessions at once
claude --worktree feature-auth starts a session in its own checkout on its own branch; run it with another name in a second terminal for a parallel one. The repository needs at least one commit first. See worktrees.
Use it in a pipeline
git log --oneline -20 | claude -p "summarize these recent commits"
The -p flag runs once and prints, so it fits scripts, hooks and CI. More in running Claude Code from a script.
Run it on a schedule
The docs list four places a recurring task can live:
- Cloud scheduled tasks: run even when your computer is off, and can also start from an API call or a GitHub event.
- Desktop scheduled tasks: run on your machine, so they can touch local files and uncommitted changes.
- GitHub Actions: for jobs tied to repository events or a cron schedule that lives next to your workflow config.
/loop: quick polling while a CLI session stays open.
A scheduled task can't ask you questions, so write the prompt like a brief: what success looks like and what to do with the result.
All the guides are in the guides index; for the habits behind these prompts see best practices. This follows Anthropic's common workflows documentation as we read it in October 2026. We are not affiliated with Anthropic. We wrote this from the documentation and have not tested every case. Flags and features change between versions, and where this page and the documentation disagree, the documentation wins.
See also: Run Claude on a schedule with /loop · Work toward a goal with /goal · Slash commands worth knowing.
The free loop-stop skill gives long tasks a limit and a stop rule. If you want a second pair of eyes on your CLAUDE.md and settings, the Tune-Up Kit is a checklist for exactly that.