One change
How Claude Code works
how-claude-code-works
Nearest release: v2.1.240, published 3 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
how-claude-code-works Changed · +1 / -35 lines
### Be specific upfront ### Give Claude something to verify against ### Explore before implementing
from line 163
## Work effectively with Claude Code -These tips help you get better results from Claude Code. +These tips help you get better results from Claude Code. For more on specific prompts, verification, and planning, see [Best practices](/docs/en/best-practices). ### Ask Claude Code for help
from line 198
* **Press `Esc`** to stop Claude immediately. The running tool call is canceled and Claude waits for your next instruction. If you have messages queued, Claude Code [sends them next](/docs/en/interactive-mode#queue-messages-while-claude-works). * **Type a correction and press `Enter`** to send it without stopping the running tool. Claude reads it as soon as the current action completes and adjusts before deciding its next step. - -### Be specific upfront - -The more precise your initial prompt, the fewer corrections you'll need. Reference specific files, mention constraints, and point to example patterns. - -```text theme={null} -The checkout flow is broken for users with expired cards. -Check src/payments/ for the issue, especially token refresh. -Write a failing test first, then fix it. -``` - -Vague prompts work, but you'll spend more time steering. Specific prompts like the one above often succeed on the first attempt. - -### Give Claude something to verify against - -Claude performs better when it can check its own work. Include test cases, paste screenshots of expected UI, or define the output you want. - -```text theme={null} -Implement validateEmail. Test cases: '[email protected]' → true, -'invalid' → false, '[email protected]' → false. Run the tests after. -``` - -For visual work, paste a screenshot of the design and ask Claude to compare its implementation against it. - -### Explore before implementing - -For complex problems, separate research from coding. Press `Shift+Tab` until the status bar shows `⏸ plan mode on`, then ask Claude to analyze the codebase first: - -```text theme={null} -Read src/auth/ and understand how we handle sessions. -Then create a plan for adding OAuth support. -``` - -Review the plan, refine it through conversation, then let Claude implement. This two-phase approach produces better results than jumping straight to code. ### Delegate, don't dictate