Vibe Coding
Back to Claude Code

Claude Code / Use

Common workflows

Claude Code's common workflows include code base navigation, bug fixing, testing, refactoring, creating commits, and handling PRs.

Common workflows key concepts infographic
Common workflows key concepts infographic

Common workflows

Claude Code's common workflows include code base navigation, bug fixing, refactoring, writing tests, updating documentation, handling PRs, and performing routine maintenance. Every workflow should retain a closed loop of “explore first, then plan, then execute, then verify”.

  • New project: First ask about the structure, entry, running commands and testing methods.
  • Fix bugs: Provide logs, reproduction steps and expected results, write failed tests first and then fix them.
  • Refactoring: Declaring immutable behavior, requiring small steps of diff and regression verification.
  • Write tests: clarify the test framework, boundary scenarios and whether mocking is allowed.

Code base tour

When you ask Claude to explain the code base, don't let him read the entire repository. Give it a goal, like "I need to understand the login flow" or "I want to modify the payment callback."

Please don't change the file yet.
I need to understand the login process. Please read the entry, routing, middleware and tests, the output:
- call chain
- Key documents
- data flow
- Risk points
- Modification suggestions

Fix bug

Bug workflow should include reproduction, location, minimal fix, and verification. Claude is great at reading error output, but you need to ask it to fix the root cause, not hide the error.

1

Recurrence

Provide error logs, input, page paths, command or test failure output.

2

Positioning

Ask Claude to list candidate reasons and documents to look at.

3

Repair

Make minimal changes first to avoid unnecessary refactoring.

4

Verify

Run failed cases, related tests and builds.

PR and review

When used in reviews, have Claude list issues by severity rather than summarizing the diff. Ask it to focus on behavioral regression, security, data boundaries, concurrency, error handling, and test gaps.

Please check the current diff from a code review perspective.
Only real risks are listed, sorted by severity.
Each entry contains: file, problem, impact, recommended fix, and whether testing is required.

Complete usage points

Supplement the core concepts, operation sequences, permission boundaries and verification requirements that are easily compressed and missed in official documents, making it easier for English readers to learn completely by page.

Workflow coverage

The focus of the common workflow page is to put Claude Code into daily engineering actions: code base navigation, bug fixing, writing tests, refactoring, updating documentation, handling PR, and performing routine maintenance. Each type of task should have inputs, execution boundaries, and validation methods.

  • Navigation: Specify the module of interest and require the output of call chain, entry point, key files and risks.
  • Bug fixing: Provide reproduction and logs, requiring you to locate the root cause first and then make minimal repairs.
  • Write tests: illustrate framework, edge cases, mocking strategies and verification commands.
  • Refactoring: declare that the behavior remains unchanged, change in stages, and test each step.
  • Review: List real issues by severity instead of just summarizing the diff.

The more commonly used the workflow is, the more suitable it is to be captured as a command, skill or CLAUDE.md template.

Study Checklist

Put the content on this page into real tasks and use the five dimensions of entry, context, permissions, verification and team rules to check whether you have truly mastered it.

Study Checklist

After reading this page, do not just remember the concept name. You should be able to place "Common workflows" back into a real Claude Code engineering workflow: where the task starts, what context the system loads, which actions need approval, how the result is verified, and how to roll back when it fails.

If this is a portal or platform page, specifically confirm what contexts this portal can access: local files, cloud repositories, browser logins, team messages, external tools, and whether these contexts are sufficient to complete the verification.

  • Be able to describe in your own words the specific problem this page solves, rather than just reciting the title.
  • Able to write a minimal example task with goals, scope, prohibitions, and acceptance criteria.
  • Be able to determine which information should be put into the current prompt and which should be captured as project rules or configurations.
  • Be able to explain which long-term rules should go into CLAUDE.md, and which runtime behavior should be handled by settings, permissions, Hooks, Skills and MCP.
  • Ability to check diffs, command output, test results, screenshots or PR notes after a task is completed instead of just trusting the natural language summary.

If this page is used for team training, ask learners to complete a small task with Claude Code: read and explain first, submit a plan, make the smallest useful change, and close with real verification commands plus human diff review.