Prerequisites
Before starting, ensure you have:- Installed Claude Code
- Authenticated with your Anthropic account
- A project directory to work in
Start Your First Session
Navigate to your project directory and run:Your First Commands
Ask About Your Code
Start by asking Claude about your codebase:Make a Simple Change
Let’s add a feature:- Analyze your project
- Draft README content
- Show you the proposed file
- Ask for approval before creating it
Reference Specific Files
Use@ to reference files:
Core Workflows
Code Generation
Ask Claude to write code with natural language:- Analyze existing code patterns
- Generate code following your conventions
- Show you the complete implementation
- Wait for approval before writing files
Code Editing
Edit existing files:Git Operations
Use built-in commands for git workflows:- Run
git statusandgit diff - Analyze your changes
- Draft a commit message
- Create the commit
/commit-push-pr- Commit, push, and create a PR- Natural language: “Create a new branch called feature/auth”
Slash Commands
Slash commands provide quick access to common operations:| Command | Description |
|---|---|
/help | Show available commands |
/commit | Create a git commit |
/model | Change AI model |
/clear | Start a new conversation |
/resume | Resume a previous session |
/config | Open configuration |
/bug | Report an issue |
/ to see autocomplete suggestions.
Permission System
Claude Code asks for permission before executing potentially dangerous operations:- Allow once: Just this operation
- Allow for session: All similar operations this session
- Deny: Reject this operation
- Create rule: Add permanent permission rule
The permission system protects you from unintended changes. Review carefully before granting permissions.
Working with Multiple Files
Claude can work across multiple files simultaneously:- Read both files
- Create the new module
- Update imports
- Show you all changes
- Execute after approval
Using Agents
Launch specialized agents for complex tasks:Advanced Features
Background Tasks
Run long operations in the background:Ctrl+B to view background task status.
Session Management
Resume previous conversations:Context Management
View context usage:Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Enter | Send message |
Shift+Enter | New line (multi-line input) |
Ctrl+C | Cancel current operation |
Ctrl+D | Exit Claude Code |
Ctrl+G | Open external editor |
Ctrl+B | View background tasks |
Ctrl+F | Kill all background agents |
Up/Down | Navigate command history |
Tab | Autocomplete |
Example Session
Here’s a complete example workflow:Common Patterns
Feature Development
- Discovery - Clarify requirements
- Exploration - Analyze existing code
- Questions - Resolve ambiguities
- Architecture - Design approaches
- Implementation - Build the feature
- Review - Quality check
- Summary - Document results
Code Review
- Potential bugs
- Performance issues
- Code quality
- Best practices
- Security concerns
Debugging
- Read the file
- Identify the issue
- Suggest fixes
- Explain the root cause
Tips for Success
Troubleshooting
Claude doesn’t find my files
Issue: File references don’t autocomplete or aren’t found Solution: Ensure you’re in the project root or use full pathsChanges aren’t what I expected
Issue: Generated code doesn’t match your request Solution:- Provide more context with @-mentions
- Reference similar existing code
- Iterate with follow-up refinements
Permission prompts are annoying
Issue: Too many permission requests Solution: Create permanent rules:- Choose “Create rule” option
- Define scope (session/project/user)
- Future similar operations auto-approve
Next Steps
Now that you’re familiar with the basics, explore:Core Concepts
Learn how Claude Code works under the hood
Git Workflows
Master git operations with Claude
Task Automation
Create custom commands and agents
Configuration
Customize settings and permissions