Common workflows - Anthropic (original) (raw)

Each task in this document includes clear instructions, example commands, and best practices to help you get the most from Claude Code.

Understand new codebases

Get a quick codebase overview

Suppose you’ve just joined a new project and need to understand its structure quickly.

Find relevant code

Suppose you need to locate code related to a specific feature or functionality.


Fix bugs efficiently

Suppose you’ve encountered an error message and need to find and fix its source.


Refactor code

Suppose you need to update old code to use modern patterns and practices.


Work with tests

Suppose you need to add tests for uncovered code.


Create pull requests

Suppose you need to create a well-documented pull request for your changes.

Handle documentation

Suppose you need to add or update documentation for your code.


Work with images

Suppose you need to work with images in your codebase, and you want Claude’s help analyzing image content.

Use extended thinking

Suppose you’re working on complex architectural decisions, challenging bugs, or planning multi-step implementations that require deep reasoning.


Resume previous conversations

Suppose you’ve been working on a task with Claude Code and need to continue where you left off in a later session.

Claude Code provides two options for resuming previous conversations:


Run parallel Claude Code sessions with Git worktrees

Suppose you need to work on multiple tasks simultaneously with complete code isolation between Claude Code instances.


Use Claude as a unix-style utility

Add Claude to your verification process

Suppose you want to use Claude Code as a linter or code reviewer.

Add Claude to your build script:

Pipe in, pipe out

Suppose you want to pipe data into Claude, and get back data in a structured format.

Pipe data through Claude:

Control output format

Suppose you need Claude’s output in a specific format, especially when integrating Claude Code into scripts or other tools.


Create custom slash commands

Claude Code supports custom slash commands that you can create to quickly execute specific prompts or tasks.

For more details, see the Slash commands reference page.

Create project-specific commands

Suppose you want to create reusable slash commands for your project that all team members can use.

Add command arguments with $ARGUMENTS

Suppose you want to create flexible slash commands that can accept additional input from users.

Create personal slash commands

Suppose you want to create personal slash commands that work across all your projects.


Next steps

Claude Code reference implementationClone our development container reference implementation.