This is a collection of tips and tricks for using Claude Code.
| Key | Action |
|---|---|
Ctrl+A |
Beginning of line |
Ctrl+E |
End of line |
Ctrl+W |
Delete word |
Ctrl+U |
Delete line |
Ctrl+K |
Delete to end |
↑/↓ |
Previous/Next command |
Tab |
Auto-complete |
Why: Assume you want to be able to read external project to get context, instead of copying information manually from one agent to another. You can just mount multiple directories. Use /add-dir inside Claude Code or --add-dir when starting the agent.
You can use git worktree to create multiple working directories for the same repository. This is useful for parallel development, e.g., working on multiple features or bug fixes simultaneously without needing to switch branches in a single working directory.
Git Commits are free 😅 so please commit often and use meaningful commit messages. This will help you keep track of changes and make it easier to revert back if needed.
You can use the /commit (git commit) command to automate commit creation. This command will do a commit for you.
You can nudge Claude to run bash tasks in the background. For example, you have some long-running tasks and you want claude to see the tasks's output.
Claude is multi-modal and you can input images by pressing alt + v
You can use voice control to interact with Claude Code. Especially useful for ideation and brainstorming sessions.
This is just a shortcut to now leave the conversation and edit the ./CLAUDE.md file manually. You can just use # to add things to the project memory.
- Settings
- Permissions
- MCP Configuration
- Custom Slash Commands
- Sub-Agents
- Output Prompts
- Hooks
You can connect to VSCode or JetBrains IDEs to get context for files and diagnostics.
Claude Code in a way is self-aware of its capabilities. You can ask it to list available tools. See /tools command.
Also /export conversation to a file or clipboard.
The benefit of this approach is that Claude Code is actually aware of what you are doing in bash and can adjust its behavior accordingly.
You can create prompt libraries to organize your prompts. You can have personal, project, and organization level prompt libraries.
https://github.com/ericbuess/claude-code-docs
You may have noticed that Claude gets really confused about its current directory after doing that.
The problem is that cd changes the current working directory permanently (for the rest of the session). So any steps after that will also use the new CWD. Which Claude does not expect.
Anyway they recently added a flag to change this:
export CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1https://github.com/sirmalloc/ccstatusline
https://github.com/viveknair/ccoutputstyles
A structured multi-stage approach for implementing features with Claude Code:
Stage 1: Context Priming
- Provide Claude with proper context about the codebase
- Share requirements and implementation details
- Help Claude understand existing patterns and architecture
Stage 2: Planning
- Use Claude Code's Plan Mode to create an implementation plan
- Review the plan thoroughly before proceeding
- Ensure all edge cases and requirements are covered
Stage 3: Implementation
- Let Claude Code follow the plan autonomously
- Monitor progress and inspect changes as they happen
- Provide additional context or course-correct if needed
Stage 4: Evaluation
- Enable Claude Code to evaluate the task outcome
- Use unit tests and integration tests for validation
- For frontend changes, use Playwright or similar tools to verify visual results
When to use: Complex feature development requiring multiple steps and verification. Ideal for production code where quality and correctness are critical.
💡 Act as a supervisor during implementation - stay engaged but let Claude work through the plan independently.
💡 The evaluation stage is crucial - having automated tests or visual verification tools ready before starting saves time and ensures quality.
flowchart LR
subgraph Developer
D1[Provide context:<br/>codebase, requirements,<br/>patterns]
D2[Review plan<br/>thoroughly]
D3[Monitor progress<br/>and inspect changes]
D4{Course<br/>correction<br/>needed?}
D5[Provide additional<br/>context/guidance]
D6[Review results &<br/>approve feature]
end
subgraph Claude_Code[Claude Code]
C1[Understand context<br/>and requirements]
C2[Create implementation<br/>plan using Plan Mode]
C3{Plan<br/>approved?}
C4[Implement feature<br/>autonomously]
C5[Run evaluation:<br/>Unit tests<br/>Integration tests<br/>E2E tests]
C6{Tests<br/>pass?}
C7[Analyze failures<br/>and suggest fixes]
end
Start([Start]) --> D1
D1 --> |Context| C1
C1 --> C2
C2 --> D2
D2 --> C3
C3 --> |No| C2
C3 --> |Yes| C4
C4 --> D3
D3 --> D4
D4 --> |Yes| D5
D5 --> |Additional context| C4
D4 --> |No| C5
C5 --> C6
C6 --> |No| C7
C7 --> |Fix| C4
C6 --> |Yes| D6
D6 --> End([Complete])
style Developer fill:#e1f5ff
style Claude_Code fill:#ffe1e1
There's a file modification bug in Claude Code. The workaround is: always use complete absolute Windows paths with drive letters and backslashes for ALL file operations. Apply this rule going forward, not just for this file.
https://www.reddit.com/r/ClaudeCode/comments/1nj49vz/claude_file_has_been_unexpectedly_modified_but/
- Use
/create-prd(create project requirement document) to create a Product Requirements Document (PRD) based on user input. - Use
/generate-tasks(generate tasks from PRD) to create a task list from the PRD. - Use
/process-task-list(process task list) to manage and track task progress.
Or use spec-kit for more details.
When to use: Greenfield projects, PoC development, pet projects
💡 This is a new methodology and might not give you best results with complex production code bases. Be careful with your time and feel free to throw away code that you don't like and iterate. Also, since much work is delegated to LLM the result and applicability heavily depends on LLM at use.
- Pipe Mode: Use Claude as a Unix utility:
claude -p ""orecho '' | claude -p "" - Integration: Combine with existing development tools and scripts
- Automation: Chain Claude commands for repeated workflows
When to use: When you want to integrate Claude into your CI/CD pipelines or automate repetitive tasks. For example, you can do some decision making as part of your CI/CD workflow based on structured output from Claude.