Claude Code
Workflows, tips, and skills for getting the most out of Claude Code (a terminal coding assistant).
Commands & Shortcuts
Skills & Capabilities
File Operations
- Read files — Read project files within the configured permissions
- Write files — Create new files or modify existing ones
- Search codebase — Find patterns, usages, and definitions
- Multi-file edits — Coordinate changes across multiple files
Git Operations
- Git status — Check current git state
- Stage changes — Stage files for commit
- Commit — Create commits with meaningful messages
- Branch management — Create, switch, and manage branches
Terminal
- Run commands — Execute shell commands in your project
- Package management — Install dependencies, run scripts
- Build & test — Run builds, tests, and linters
- Server management — Start/stop dev servers
Analysis
- Code explanation — Explain what code does and why
- Bug detection — Find potential bugs and issues
- Dependency analysis — Understand import graphs and dependencies
- Architecture review — Analyze project structure and patterns
Workflows
Planning Before Coding
Use Plan Mode to inspect the project and propose an approach before editing.
- 1Describe what you want to build at a high level
- 2Ask Claude to outline the approach: 'How should I structure this feature?'
- 3Refine the plan before asking for implementation
- 4Use /plan to enter Plan Mode for complex changes
Iterative Development
Build features incrementally, reviewing and testing each step before moving on.
- 1Start with the core functionality
- 2Review the generated code carefully
- 3Test before asking for the next piece
- 4Iterate: 'Now add error handling to this'
Codebase Exploration
Use Claude Code to understand unfamiliar codebases. It can read files and explain patterns.
- 1Ask about structure: 'How is authentication handled in this project?'
- 2Request explanations: 'Explain what this function does'
- 3Ask for related code: 'Show me where this type is used'
Refactoring with Context
Claude Code can refactor across multiple files while maintaining consistency.
- 1Explain the refactoring goal clearly
- 2Reference the files involved
- 3Review changes in aggregate before applying
- 4Test thoroughly after refactoring
Git Integration
Claude Code can stage, commit, and manage git operations with context-aware commit messages.
- 1Make your changes with Claude Code
- 2Ask it to stage and commit: 'Commit these changes with a descriptive message'
- 3Review the commit message before confirming
Tips
Use Plan Mode for complex changes
Use /plan to explore the code and review an approach before implementation. State the constraints and checks the change must pass.
Be Explicit About Context
Tell Claude Code which files are relevant: 'Looking at src/auth.ts and src/middleware.ts, how should I add rate limiting?'
Review Generated Code
Always review before accepting. Claude Code is powerful but not infallible. Check edge cases and error handling.
Use CLAUDE.md for Project Rules
Create a CLAUDE.md file in your project root with coding standards, patterns, and preferences Claude should follow.
# CLAUDE.md example ## Coding Standards - Use TypeScript strict mode - Prefer async/await over .then() - Add JSDoc comments to public functions ## Patterns - See /lib/api for API route patterns - Use Zod for validation
Iterate in Small Steps
Keep each task small enough to review. Include the expected behavior and the checks that confirm it.
Provide Examples
Show Claude Code existing patterns: 'Follow the same pattern as the UserCard component'.
Use for Code Review
Ask Claude Code to review your code: 'Review this function for potential bugs or improvements'.
Escape Long Operations
Press Escape to stop Claude Code if it's generating something you don't want. Start over with clearer instructions.
For current features and controls, see the official documentation.