Common workflows changedcommon-workflows
Nearest release: v2.1.307, published 3 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 22 Oct 2026 00:01 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 22 Oct 2026 18:07 UTC.
Upstream edited
Recorded here
Lines+19added
Lines−19removed
From line
2
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits17to this page, all time
The whole hunk
from line 2, old and new numbered
/
from line 2
22
33> Step-by-step guides for exploring codebases, fixing bugs, refactoring, testing, and other everyday tasks with Claude Code.
44
5This page collects short recipes for everyday development. For higher-level guidance on prompting and context management, see [Best practices](/docs/en/best-practices).
5This page collects short recipes for everyday development. For higher-level guidance on prompting and context management, see [Best practices](/docs/en/best-practices.md).
66
77This page covers:
88
from line 19
1919
2020### Understand new codebases
2121
22For configuring Claude Code in a monorepo or large codebase, see [Monorepos and large repos](/docs/en/large-codebases).
22For configuring Claude Code in a monorepo or large codebase, see [Monorepos and large repos](/docs/en/large-codebases.md).
2323
2424#### Get a quick codebase overview
2525
from line 95
9595>
9696> * Be specific about what you're looking for
9797> * 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
98> * Install a [code intelligence plugin](/docs/en/plugins/code-intelligence.md) for your language to give Claude precise "go to definition" and "find references" navigation
9999
100100***
101101
from line 227
227227enhance the PR description with more context about the security improvements
228228```
229229
230To 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).
230To 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.md#pull-request-status).
231231
232232> [!TIP]
233233>
from line 347
347347Explain the logic in @src/utils/auth.js
348348```
349349
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.
350This includes the content of the file in the conversation when it fits the [Read tool](/docs/en/tools-reference.md#read-tool-behavior)'s token limit, 25,000 tokens by default. A text file larger than 256KB isn't included.
351351
352352**2. Reference a directory**
353353
from line 361
361361Show me the data from @github:repos/owner/repo/issues
362362```
363363
364This fetches data from connected MCP servers using the format @server:resource. See [MCP resources](/docs/en/mcp#use-mcp-resources) for details.
364This fetches data from connected MCP servers using the format @server:resource. See [MCP resources](/docs/en/mcp.md#use-mcp-resources) for details.
365365
366366> [!TIP]
367367>
from line 373
373373> * Directory references show file listings, not contents
374374> * You can reference multiple files in a single message (for example, "@file1.js and @file2.js")
375375
376To stop `@` references from including file contents and directory listings, set [`CLAUDE_CODE_DISABLE_FILE_MENTIONS`](/docs/en/env-vars#variables) to `1` in your shell or in the [`env` block](/docs/en/env-vars#set-variables-in-settings-files) of user settings or [managed settings](/docs/en/managed-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.
376To stop `@` references from including file contents and directory listings, set [`CLAUDE_CODE_DISABLE_FILE_MENTIONS`](/docs/en/env-vars#variables) to `1` in your shell or in the [`env` block](/docs/en/env-vars#set-variables-in-settings-files) of user settings or [managed settings](/docs/en/managed-settings.md). 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.
377377
378378Your [`PreToolUse` hooks](/docs/en/hooks#pretooluse) don't run when Claude Code includes a file you reference with `@`, because it makes no tool call. If you rely on those hooks to control what Claude reads, block specific paths or stop `@` references from including files:
379379
from line 390
390390
391391| Option | Where it runs | Best for |
392392| :- | :- | :- |
393| [Cloud scheduled tasks](/docs/en/routines) | Cloud, Anthropic-managed by default | Tasks that should run even when your computer is off. Can also trigger on API calls or GitHub events in addition to a schedule. Configure at [claude.ai/code/routines](https://claude.ai/code/routines). |
394| [Desktop scheduled tasks](/docs/en/desktop-scheduled-tasks) | Your machine, via the desktop app | Tasks that need direct access to local files, tools, or uncommitted changes. |
395| [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. |
393| [Cloud scheduled tasks](/docs/en/routines.md) | Cloud, Anthropic-managed by default | Tasks that should run even when your computer is off. Can also trigger on API calls or GitHub events in addition to a schedule. Configure at [claude.ai/code/routines](https://claude.ai/code/routines). |
394| [Desktop scheduled tasks](/docs/en/desktop-scheduled-tasks.md) | Your machine, via the desktop app | Tasks that need direct access to local files, tools, or uncommitted changes. |
395| [GitHub Actions](/docs/en/github-actions.md) | Your CI pipeline | Tasks tied to repo events like opened PRs, or cron schedules that should live alongside your workflow config. |
396396| [`/loop`](/docs/en/scheduled-tasks) | The current CLI session | Quick polling while a session is open. `--resume` and `--continue` restore unexpired fixed-interval loops. |
397397
398398> [!TIP]
from line 452
452452claude --continue
453453```
454454
455This resumes the most recent session in the current directory; if there isn't one yet, it prints `No conversation found to continue` and exits. Use `claude --resume` to choose from a list, or `/resume` from inside a running session. See [Manage sessions](/docs/en/sessions) for naming, branching, and the full picker reference.
455This resumes the most recent session in the current directory; if there isn't one yet, it prints `No conversation found to continue` and exits. Use `claude --resume` to choose from a list, or `/resume` from inside a running session. See [Manage sessions](/docs/en/sessions.md) for naming, branching, and the full picker reference.
456456
457457## Run parallel sessions with worktrees
458458
from line 462
462462claude --worktree feature-auth
463463```
464464
465Run the same command with a different name in a second terminal to start an isolated parallel session. In a repository with no commits, the command fails with `Failed to resolve base branch "HEAD": git rev-parse failed`. See [Worktrees](/docs/en/worktrees) for cleanup, `.worktreeinclude`, and non-git VCS support. To monitor parallel sessions from one screen instead of separate terminals, see [background agents](/docs/en/agent-view).
465Run the same command with a different name in a second terminal to start an isolated parallel session. In a repository with no commits, the command fails with `Failed to resolve base branch "HEAD": git rev-parse failed`. See [Worktrees](/docs/en/worktrees.md) for cleanup, `.worktreeinclude`, and non-git VCS support. To monitor parallel sessions from one screen instead of separate terminals, see [background agents](/docs/en/agent-view.md).
466466
467467## Plan before editing
468468
from line 472
472472claude --permission-mode plan
473473```
474474
475You can also press `Shift+Tab` mid-session until the status bar shows `⏸ plan mode on`. See [Plan mode](/docs/en/permission-modes#analyze-before-you-edit-with-plan-mode) for the approval flow and editing the plan in your text editor.
475You can also press `Shift+Tab` mid-session until the status bar shows `⏸ plan mode on`. See [Plan mode](/docs/en/permission-modes.md#analyze-before-you-edit-with-plan-mode) for the approval flow and editing the plan in your text editor.
476476
477477## Delegate research to subagents
478478
from line 482
482482use a subagent to investigate how our auth system handles token refresh
483483```
484484
485The subagent reads files in its own context window and reports a summary. See [Subagents](/docs/en/sub-agents) for defining custom agents with their own tools and prompts.
485The subagent reads files in its own context window and reports a summary. See [Subagents](/docs/en/sub-agents.md) for defining custom agents with their own tools and prompts.
486486
487487## Pipe Claude into scripts
488488
from line 492
492492git log --oneline -20 | claude -p "summarize these recent commits"
493493```
494494
495See [Non-interactive mode](/docs/en/headless) for output formats, permission flags, and fan-out patterns.
495See [Non-interactive mode](/docs/en/headless.md) for output formats, permission flags, and fan-out patterns.
496496
497497## Next steps
498498
499> **[Best practices](/docs/en/best-practices)**
499> **[Best practices](/docs/en/best-practices.md)**
500500>
501501> Patterns for getting the most out of Claude Code
502502
503> **[Manage sessions](/docs/en/sessions)**
503> **[Manage sessions](/docs/en/sessions.md)**
504504>
505505> Resume, name, and branch conversations
506506
507> **[Worktrees](/docs/en/worktrees)**
507> **[Worktrees](/docs/en/worktrees.md)**
508508>
509509> Run isolated parallel sessions
510510
511> **[Extend Claude Code](/docs/en/features-overview)**
511> **[Extend Claude Code](/docs/en/features-overview.md)**
512512>
513513> Add skills, hooks, MCP, subagents, and plugins
514514
No line in this hunk matches that.