Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Common workflows changedcommon-workflows

Nearest release: v2.1.304, published 6 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 20 Oct 2026 02:25 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 20 Oct 2026 18:37 UTC.

Upstream edited
Recorded here
Lines+306added
Lines−326removed
From line 25 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits16to this page, all time

The whole hunk

from line 25, old and new numbered
/
lines

The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.

from line 25
2525 
2626Suppose you've just joined a new project and need to understand its structure quickly.
2727 
28<Steps>
29 <Step title="Navigate to the project root directory">
30 ```bash theme={null}
31 cd /path/to/project
32 ```
33 
34 Replace `/path/to/project` with the path to your project.
35 </Step>
36 
37 <Step title="Start Claude Code">
38 ```bash theme={null}
39 claude
40 ```
41 </Step>
42 
43 <Step title="Ask for a high-level overview">
44 ```text wrap theme={null}
45 give me an overview of this codebase
46 ```
47 </Step>
48 
49 <Step title="Dive deeper into specific components">
50 ```text wrap theme={null}
51 explain the main architecture patterns used here
52 ```
53 
54 ```text wrap theme={null}
55 what are the key data models?
56 ```
57 
58 ```text wrap theme={null}
59 how is authentication handled?
60 ```
61 </Step>
62</Steps>
63 
64<Tip>
65 Tips:
66 
67 * Start with broad questions, then narrow down to specific areas
68 * Ask about coding conventions and patterns used in the project
69 * Request a glossary of project-specific terms
70</Tip>
28**1. Navigate to the project root directory**
29 
30```bash theme={null}
31cd /path/to/project
32```
33 
34Replace `/path/to/project` with the path to your project.
35 
36**2. Start Claude Code**
37 
38```bash theme={null}
39claude
40```
41 
42**3. Ask for a high-level overview**
43 
44```text wrap theme={null}
45give me an overview of this codebase
46```
47 
48**4. Dive deeper into specific components**
49 
50```text wrap theme={null}
51explain the main architecture patterns used here
52```
53 
54```text wrap theme={null}
55what are the key data models?
56```
57 
58```text wrap theme={null}
59how is authentication handled?
60```
61 
62> [!TIP]
63>
64> Tips:
65>
66> * Start with broad questions, then narrow down to specific areas
67> * Ask about coding conventions and patterns used in the project
68> * Request a glossary of project-specific terms
7169 
7270#### Find relevant code
7371 
7472Suppose you need to locate code related to a specific feature or functionality.
7573 
76<Steps>
77 <Step title="Ask Claude to find relevant files">
78 ```text wrap theme={null}
79 find the files that handle user authentication
80 ```
81 </Step>
82 
83 <Step title="Get context on how components interact">
84 ```text wrap theme={null}
85 how do these authentication files work together?
86 ```
87 </Step>
88 
89 <Step title="Understand the execution flow">
90 ```text wrap theme={null}
91 trace the login process from front-end to database
92 ```
93 </Step>
94</Steps>
95 
96<Tip>
97 Tips:
98 
99 * Be specific about what you're looking for
100 * Use domain language from the project
101 * Install a [code intelligence plugin](/docs/en/plugins/code-intelligence) for your language to give Claude precise "go to definition" and "find references" navigation
102</Tip>
74**1. Ask Claude to find relevant files**
75 
76```text wrap theme={null}
77find the files that handle user authentication
78```
79 
80**2. Get context on how components interact**
81 
82```text wrap theme={null}
83how do these authentication files work together?
84```
85 
86**3. Understand the execution flow**
87 
88```text wrap theme={null}
89trace the login process from front-end to database
90```
91 
92> [!TIP]
93>
94> Tips:
95>
96> * Be specific about what you're looking for
97> * Use domain language from the project
98> * Install a [code intelligence plugin](/docs/en/plugins/code-intelligence) for your language to give Claude precise "go to definition" and "find references" navigation
10399 
104100***
105101 
from line 103
107103 
108104Suppose you've encountered an error message and need to find and fix its source.
109105 
110<Steps>
111 <Step title="Share the error with Claude">
112 ```text wrap theme={null}
113 I'm seeing an error when I run npm test
114 ```
115 </Step>
116 
117 <Step title="Ask for fix recommendations">
118 ```text wrap theme={null}
119 suggest a few ways to fix the @ts-ignore in user.ts
120 ```
121 </Step>
122 
123 <Step title="Apply the fix">
124 ```text wrap theme={null}
125 update user.ts to add the null check you suggested
126 ```
127 </Step>
128</Steps>
129 
130<Tip>
131 Tips:
132 
133 * Tell Claude the command to reproduce the issue and get a stack trace
134 * Mention any steps to reproduce the error
135 * Let Claude know if the error is intermittent or consistent
136</Tip>
106**1. Share the error with Claude**
107 
108```text wrap theme={null}
109I'm seeing an error when I run npm test
110```
111 
112**2. Ask for fix recommendations**
113 
114```text wrap theme={null}
115suggest a few ways to fix the @ts-ignore in user.ts
116```
117 
118**3. Apply the fix**
119 
120```text wrap theme={null}
121update user.ts to add the null check you suggested
122```
123 
124> [!TIP]
125>
126> Tips:
127>
128> * Tell Claude the command to reproduce the issue and get a stack trace
129> * Mention any steps to reproduce the error
130> * Let Claude know if the error is intermittent or consistent
137131 
138132***
139133 
from line 137
143137 
144138For porting an entire codebase to a new language, see [how Anthropic runs large-scale code migrations with Claude Code](https://claude.com/blog/ai-code-migration) on the blog.
145139 
146<Steps>
147 <Step title="Identify legacy code for refactoring">
148 ```text wrap theme={null}
149 find deprecated API usage in our codebase
150 ```
151 </Step>
152 
153 <Step title="Get refactoring recommendations">
154 ```text wrap theme={null}
155 suggest how to refactor utils.js to use modern JavaScript features
156 ```
157 </Step>
158 
159 <Step title="Apply the changes safely">
160 ```text wrap theme={null}
161 refactor utils.js to use ES2024 features while maintaining the same behavior
162 ```
163 </Step>
164 
165 <Step title="Verify the refactoring">
166 ```text wrap theme={null}
167 run tests for the refactored code
168 ```
169 </Step>
170</Steps>
171 
172<Tip>
173 Tips:
174 
175 * Ask Claude to explain the benefits of the modern approach
176 * Request that changes maintain backward compatibility when needed
177 * Do refactoring in small, testable increments
178</Tip>
140**1. Identify legacy code for refactoring**
141 
142```text wrap theme={null}
143find deprecated API usage in our codebase
144```
145 
146**2. Get refactoring recommendations**
147 
148```text wrap theme={null}
149suggest how to refactor utils.js to use modern JavaScript features
150```
151 
152**3. Apply the changes safely**
153 
154```text wrap theme={null}
155refactor utils.js to use ES2024 features while maintaining the same behavior
156```
157 
158**4. Verify the refactoring**
159 
160```text wrap theme={null}
161run tests for the refactored code
162```
163 
164> [!TIP]
165>
166> Tips:
167>
168> * Ask Claude to explain the benefits of the modern approach
169> * Request that changes maintain backward compatibility when needed
170> * Do refactoring in small, testable increments
179171 
180172***
181173 
from line 175
183175 
184176Suppose you need to add tests for uncovered code.
185177 
186<Steps>
187 <Step title="Identify untested code">
188 ```text wrap theme={null}
189 find functions in NotificationsService.swift that are not covered by tests
190 ```
191 </Step>
192 
193 <Step title="Generate test scaffolding">
194 ```text wrap theme={null}
195 add tests for the notification service
196 ```
197 </Step>
198 
199 <Step title="Add meaningful test cases">
200 ```text wrap theme={null}
201 add test cases for edge conditions in the notification service
202 ```
203 </Step>
204 
205 <Step title="Run and verify tests">
206 ```text wrap theme={null}
207 run the new tests and fix any failures
208 ```
209 </Step>
210</Steps>
178**1. Identify untested code**
179 
180```text wrap theme={null}
181find functions in NotificationsService.swift that are not covered by tests
182```
183 
184**2. Generate test scaffolding**
185 
186```text wrap theme={null}
187add tests for the notification service
188```
189 
190**3. Add meaningful test cases**
191 
192```text wrap theme={null}
193add test cases for edge conditions in the notification service
194```
195 
196**4. Run and verify tests**
197 
198```text wrap theme={null}
199run the new tests and fix any failures
200```
211201 
212202Claude can generate tests that follow your project's existing patterns and conventions. When asking for tests, be specific about what behavior you want to verify. Claude examines your existing test files to match the style, frameworks, and assertion patterns already in use.
213203 
from line 209
219209 
220210You can create pull requests by asking Claude directly ("create a pr for my changes"), or guide Claude through it step-by-step:
221211 
222<Steps>
223 <Step title="Summarize your changes">
224 ```text wrap theme={null}
225 summarize the changes I've made to the authentication module
226 ```
227 </Step>
228 
229 <Step title="Generate a pull request">
230 ```text wrap theme={null}
231 create a pr
232 ```
233 </Step>
234 
235 <Step title="Review and refine">
236 ```text wrap theme={null}
237 enhance the PR description with more context about the security improvements
238 ```
239 </Step>
240</Steps>
212**1. Summarize your changes**
213 
214```text wrap theme={null}
215summarize the changes I've made to the authentication module
216```
217 
218**2. Generate a pull request**
219 
220```text wrap theme={null}
221create a pr
222```
223 
224**3. Review and refine**
225 
226```text wrap theme={null}
227enhance the PR description with more context about the security improvements
228```
241229 
242230To find the session later, run `claude --from-pr 1234` with your own PR number, which opens the session picker filtered to sessions linked to that PR, or paste the PR URL into the [`/resume` picker](/docs/en/sessions#use-the-session-picker) search. Claude Code links the session to the PR when Claude creates it with `gh pr create` or `glab mr create`, and when Claude [works on an existing PR](/docs/en/agent-view#pull-request-status).
243231 
244<Tip>
245 Review Claude's generated PR before submitting and ask Claude to highlight potential risks or considerations.
246</Tip>
232> [!TIP]
233>
234> Review Claude's generated PR before submitting and ask Claude to highlight potential risks or considerations.
247235 
248236### Handle documentation
249237 
250238Suppose you need to add or update documentation for your code.
251239 
252<Steps>
253 <Step title="Identify undocumented code">
254 ```text wrap theme={null}
255 find functions without proper JSDoc comments in the auth module
256 ```
257 </Step>
258 
259 <Step title="Generate documentation">
260 ```text wrap theme={null}
261 add JSDoc comments to the undocumented functions in auth.js
262 ```
263 </Step>
264 
265 <Step title="Review and enhance">
266 ```text wrap theme={null}
267 improve the generated documentation with more context and examples
268 ```
269 </Step>
270 
271 <Step title="Verify documentation">
272 ```text wrap theme={null}
273 check if the documentation follows our project standards
274 ```
275 </Step>
276</Steps>
277 
278<Tip>
279 Tips:
280 
281 * Specify the documentation style you want (JSDoc, docstrings, etc.)
282 * Ask for examples in the documentation
283 * Request documentation for public APIs, interfaces, and complex logic
284</Tip>
240**1. Identify undocumented code**
241 
242```text wrap theme={null}
243find functions without proper JSDoc comments in the auth module
244```
245 
246**2. Generate documentation**
247 
248```text wrap theme={null}
249add JSDoc comments to the undocumented functions in auth.js
250```
251 
252**3. Review and enhance**
253 
254```text wrap theme={null}
255improve the generated documentation with more context and examples
256```
257 
258**4. Verify documentation**
259 
260```text wrap theme={null}
261check if the documentation follows our project standards
262```
263 
264> [!TIP]
265>
266> Tips:
267>
268> * Specify the documentation style you want (JSDoc, docstrings, etc.)
269> * Ask for examples in the documentation
270> * Request documentation for public APIs, interfaces, and complex logic
285271 
286272***
287273 
from line 283
297283 
298284Suppose you need to work with images in your codebase, and you want Claude's help analyzing image content.
299285 
300<Steps>
301 <Step title="Add an image to the conversation">
302 You can use any of these methods:
303 
304 1. Drag and drop an image into the Claude Code window
305 2. Copy an image and paste it into the CLI with `Ctrl+V`, or with [`Alt+V` on Windows and WSL](/docs/en/interactive-mode#general-controls)
306 3. Provide an image path to Claude, for example "Analyze this image: /path/to/your/image.png"
307 </Step>
308 
309 <Step title="Ask Claude to analyze the image">
310 ```text wrap theme={null}
311 What does this image show?
312 ```
313 
314 ```text wrap theme={null}
315 Describe the UI elements in this screenshot
316 ```
317 
318 ```text wrap theme={null}
319 Are there any problematic elements in this diagram?
320 ```
321 </Step>
322 
323 <Step title="Use images for context">
324 ```text wrap theme={null}
325 Here's a screenshot of the error. What's causing it?
326 ```
327 
328 ```text wrap theme={null}
329 This is our current database schema. How should we modify it for the new feature?
330 ```
331 </Step>
332 
333 <Step title="Get code suggestions from visual content">
334 ```text wrap theme={null}
335 Generate CSS to match this design mockup
336 ```
337 
338 ```text wrap theme={null}
339 What HTML structure would recreate this component?
340 ```
341 </Step>
342</Steps>
343 
344<Tip>
345 Tips:
346 
347 * Use images when text descriptions would be unclear or cumbersome
348 * Include screenshots of errors, UI designs, or diagrams for better context
349 * You can work with multiple images in a conversation
350 * Image analysis works with diagrams, screenshots, mockups, and more
351 * When Claude references images (for example, `[Image #1]`), `Cmd+Click` (Mac) or `Ctrl+Click` (Windows/Linux) the link to open the image in your default viewer
352</Tip>
286**1. Add an image to the conversation**
287 
288You can use any of these methods:
289 
2901. Drag and drop an image into the Claude Code window
2912. Copy an image and paste it into the CLI with `Ctrl+V`, or with [`Alt+V` on Windows and WSL](/docs/en/interactive-mode#general-controls)
2923. Provide an image path to Claude, for example "Analyze this image: /path/to/your/image.png"
293 
294**2. Ask Claude to analyze the image**
295 
296```text wrap theme={null}
297What does this image show?
298```
299 
300```text wrap theme={null}
301Describe the UI elements in this screenshot
302```
303 
304```text wrap theme={null}
305Are there any problematic elements in this diagram?
306```
307 
308**3. Use images for context**
309 
310```text wrap theme={null}
311Here's a screenshot of the error. What's causing it?
312```
313 
314```text wrap theme={null}
315This is our current database schema. How should we modify it for the new feature?
316```
317 
318**4. Get code suggestions from visual content**
319 
320```text wrap theme={null}
321Generate CSS to match this design mockup
322```
323 
324```text wrap theme={null}
325What HTML structure would recreate this component?
326```
327 
328> [!TIP]
329>
330> Tips:
331>
332> * Use images when text descriptions would be unclear or cumbersome
333> * Include screenshots of errors, UI designs, or diagrams for better context
334> * You can work with multiple images in a conversation
335> * Image analysis works with diagrams, screenshots, mockups, and more
336> * When Claude references images (for example, `[Image #1]`), `Cmd+Click` (Mac) or `Ctrl+Click` (Windows/Linux) the link to open the image in your default viewer
353337 
354338***
355339 
from line 341
357341 
358342Use @ to quickly include files or directories without waiting for Claude to read them.
359343 
360<Steps>
361 <Step title="Reference a single file">
362 ```text wrap theme={null}
363 Explain the logic in @src/utils/auth.js
364 ```
365 
366 This includes the content of the file in the conversation when it fits the [Read tool](/docs/en/tools-reference#read-tool-behavior)'s token limit, 25,000 tokens by default. A text file larger than 256KB isn't included.
367 </Step>
368 
369 <Step title="Reference a directory">
370 ```text wrap theme={null}
371 What's the structure of @src/components?
372 ```
373 </Step>
374 
375 <Step title="Reference MCP resources">
376 ```text wrap theme={null}
377 Show me the data from @github:repos/owner/repo/issues
378 ```
379 
380 This fetches data from connected MCP servers using the format @server:resource. See [MCP resources](/docs/en/mcp#use-mcp-resources) for details.
381 </Step>
382</Steps>
383 
384<Tip>
385 Tips:
386 
387 * File paths can be relative or absolute
388 * Type `@` to open a path suggestion menu, then press Enter or Tab to accept the highlighted path and Enter again to send the message
389 * @ file references add `CLAUDE.md` in the file's directory and parent directories to context
390 * Directory references show file listings, not contents
391 * You can reference multiple files in a single message (for example, "@file1.js and @file2.js")
392</Tip>
344**1. Reference a single file**
345 
346```text wrap theme={null}
347Explain the logic in @src/utils/auth.js
348```
349 
350This includes the content of the file in the conversation when it fits the [Read tool](/docs/en/tools-reference#read-tool-behavior)'s token limit, 25,000 tokens by default. A text file larger than 256KB isn't included.
351 
352**2. Reference a directory**
353 
354```text wrap theme={null}
355What's the structure of @src/components?
356```
357 
358**3. Reference MCP resources**
359 
360```text wrap theme={null}
361Show me the data from @github:repos/owner/repo/issues
362```
363 
364This fetches data from connected MCP servers using the format @server:resource. See [MCP resources](/docs/en/mcp#use-mcp-resources) for details.
365 
366> [!TIP]
367>
368> Tips:
369>
370> * File paths can be relative or absolute
371> * Type `@` to open a path suggestion menu, then press Enter or Tab to accept the highlighted path and Enter again to send the message
372> * @ file references add `CLAUDE.md` in the file's directory and parent directories to context
373> * Directory references show file listings, not contents
374> * You can reference multiple files in a single message (for example, "@file1.js and @file2.js")
393375 
394376To stop `@` references from including file contents and directory listings in your message, set [`CLAUDE_CODE_DISABLE_FILE_MENTIONS=1`](/docs/en/env-vars#variables) in your shell or user settings. Claude then receives the paths you referenced with a note to read them using its file tools. The variable requires Claude Code v2.1.299 or later, and Claude Code ignores it in project and local settings.
395377 
from line 390
408390| [GitHub Actions](/docs/en/github-actions) | Your CI pipeline | Tasks tied to repo events like opened PRs, or cron schedules that should live alongside your workflow config. |
409391| [`/loop`](/docs/en/scheduled-tasks) | The current CLI session | Quick polling while a session is open. `--resume` and `--continue` restore unexpired fixed-interval loops. |
410392 
411<Tip>
412 When writing prompts for scheduled tasks, be explicit about what success looks like and what to do with results. The task runs autonomously, so it can't ask clarifying questions. For example: "Review open PRs labeled `needs-review`, leave inline comments on any issues, and post a summary in the `#eng-reviews` Slack channel."
413</Tip>
393> [!TIP]
394>
395> When writing prompts for scheduled tasks, be explicit about what success looks like and what to do with results. The task runs autonomously, so it can't ask clarifying questions. For example: "Review open PRs labeled `needs-review`, leave inline comments on any issues, and post a summary in the `#eng-reviews` Slack channel."
414396 
415397***
416398 
from line 426
444426what are the limitations of Claude Code?
445427```
446428 
447<Note>
448 Claude provides documentation-based answers to these questions. For hands-on demonstrations, run `/powerup` for interactive lessons with animated demos, or refer to the specific workflow sections above.
449</Note>
450 
451<Tip>
452 Tips:
453 
454 * Ask specific questions to get detailed answers
455 * Claude can explain complex features like MCP integration, enterprise configurations, and advanced workflows
456</Tip>
429> [!NOTE]
430>
431> Claude provides documentation-based answers to these questions. For hands-on demonstrations, run `/powerup` for interactive lessons with animated demos, or refer to the specific workflow sections above.
432 
433> [!TIP]
434>
435> Tips:
436>
437> * Ask specific questions to get detailed answers
438> * Claude can explain complex features like MCP integration, enterprise configurations, and advanced workflows
457439 
458440***
459441 
from line 491
509491 
510492## Next steps
511493 
512<CardGroup cols={2}>
513 <Card title="Best practices" icon="lightbulb" href="/docs/en/best-practices">
514 Patterns for getting the most out of Claude Code
515 </Card>
516 
517 <Card title="Manage sessions" icon="rotate-left" href="/docs/en/sessions">
518 Resume, name, and branch conversations
519 </Card>
520 
521 <Card title="Worktrees" icon="code-branch" href="/docs/en/worktrees">
522 Run isolated parallel sessions
523 </Card>
524 
525 <Card title="Extend Claude Code" icon="puzzle-piece" href="/docs/en/features-overview">
526 Add skills, hooks, MCP, subagents, and plugins
527 </Card>
528</CardGroup>
494> **[Best practices](/docs/en/best-practices)**
495>
496> Patterns for getting the most out of Claude Code
497 
498> **[Manage sessions](/docs/en/sessions)**
499>
500> Resume, name, and branch conversations
501 
502> **[Worktrees](/docs/en/worktrees)**
503>
504> Run isolated parallel sessions
505 
506> **[Extend Claude Code](/docs/en/features-overview)**
507>
508> Add skills, hooks, MCP, subagents, and plugins
529509 
Feedback