How to Use Claude Code
Claude Code is a terminal assistant that understands normal conversation. You talk to it like you would talk to another developer, and it helps with your code.
Prerequisites
Installation required - You need to install Claude Code first. See the installation guide for setup instructions.
Claude subscription - You'll need a Claude Pro, Claude Max, or API key to use Claude Code.
Your First Session
Step 1: Start Claude Code - Open your terminal, go to any folder with code, and type:
claude
Step 2: Ask simple questions - Start with basic questions to get comfortable:
- "What files are in this directory?" - Claude will list and explain your files
- "Can you explain what this code does?" - Claude will read and explain any file
- "Help me understand this function" - Claude will break down how code works
Step 3: Claude asks permission - Before making changes to files or running commands, Claude will ask "Can I proceed?"
Basic Commands
Getting help - Essential commands to know:
/help
- Show all available commands/clear
- Start a fresh conversation (Claude forgets previous context)/init
- Create a CLAUDE.md file to help Claude understand your project/compact
- Clean up the conversation to save space/exit
- Close Claude Code
Permission settings - Control how Claude asks for approval:
Shift+Tab
- Change how Claude asks permission (try pressing it to see different modes)
What You Can Do
Understanding code - Perfect for beginners:
"Can you walk me through this file step by step?"
"What does this function do?"
"Why is this code written this way?"
Getting help with problems - When you're stuck:
- "I'm getting an error, can you help?" - Claude will help debug issues
- "How do I add a new feature here?" - Claude will guide you through changes
- "Can you make this code cleaner?" - Claude will suggest improvements
Learning as you go - Use Claude to learn:
"Can you explain this pattern?"
"What's a better way to write this?"
"Can you show me an example of how this works?"
See Also: Getting Started|What is Claude Code|Write Better Prompts
Try asking Claude "What files are in this directory?" as your first question. This helps you get comfortable with how Claude responds and shows you what it can see in your project.
Create a CLAUDE.md file with /init
to dramatically improve Claude's understanding of your project. Claude follows instructions in CLAUDE.md more strictly than regular chat messages, helping it remember your coding style, project structure, and preferences across all sessions. This makes Claude much more helpful and consistent.