Requirements:
# Install command:
npm install -g @anthropic-ai/claude-code
Don't use `sudo`! If you get errors, check the official documentation for npm permissions setup.
Just type:
claude
The first time you run it, Claude will ask you to log in. You can use:
Navigate to any project folder and type
claude to start
coding together.
cd my-project
claude
It's really that simple! Just talk to Claude like you're talking to another developer.
You: "What does this app do?"
Claude: [Reads your files and explains the project]
You: "There's a bug in login.js where users can't log in with email addresses. Can you fix it?"
Claude: [Finds the file, identifies the issue, proposes a fix]
You: "Create a contact form with name, email, and message fields"
Claude: [Writes the HTML, CSS, and JavaScript for you]
It's really that simple!
These are the commands you'll use most often. Type them in Claude Code
by starting with /
What it does: Clears the conversation history and starts fresh
When to use: After finishing one task and starting a new one
# After building the login feature
/clear
# Now start fresh
You: "Let's build the signup feature now"
What it does: Controls what Claude can do automatically
When to use: To let Claude edit files without asking every time
/permissions add Edit
# Let Claude edit files
/permissions add Bash(git:*)
# Let Claude use git commands
What it does: Creates a CLAUDE.md file to help Claude understand your project
When to use: The first time you use Claude in a new project
/init
# Claude will create a helpful CLAUDE.md file
Escape
Stop Claude if it's going in the wrong direction
Escape Escape
Go back and edit your last message
Shift+Tab
Toggle "auto-accept" mode
Tab
Autocomplete file paths
Perfect for: Learning a new codebase or understanding what something does
You: "How does the user authentication work in this app?"
Claude: [Reads the auth files and explains the flow]
You: "What does the function on line 45 of auth.js do?"
Claude: [Explains that specific function]
Why this is useful: Much faster than reading through files yourself!
Step-by-step bug fixing process
Step 1: Describe the problem
You: "Users are getting a 404 error when they click the 'Save' button"
Step 2: Let Claude investigate
Claude: [Reads relevant files, finds the issue]
Step 3: Review the fix
Claude: "I found the problem - the API endpoint is misspelled. Here's my fix..."
Step 4: Let Claude implement it
You: "That looks good, go ahead and fix it"
Step 5: Test it
You: "Run the app and test if the Save button works now"
Let's build a simple to-do list
Step 1: Ask Claude to make a plan first
You: "I want to build a to-do list app. Make a plan but don't write code yet."
Step 2: Review the plan
Claude: [Proposes: HTML structure, CSS styling, JavaScript for add/remove/check items]
Step 3: Approve and build
You: "Perfect! Go ahead and build it."
Step 4: Test and iterate
You: "Can you make the delete button red and add a 'Clear All' button?"
Pro tip: Always ask for a plan first on bigger tasks!
Claude can do your git work for you
You: "Write a commit message for these changes"
Claude looks at your changes and writes a descriptive message
You: "Create a PR for this feature"
Claude creates the PR with a good description
You: "What changes were made last week?"
Claude searches git history and summarizes
Think of this as "instructions for Claude" about your project. It's like a cheat sheet that Claude reads every time you start a conversation.
# Option 1: Have Claude create it for you
/init
# Option 2: Create it yourself
# Just make a file called CLAUDE.md in your project folder
# My Project ## How to run the app npm start ## How to run tests npm test ## Important files - src/app.js - Main application file - src/auth.js - Handles user login - config.json - App configuration ## Code style rules - Use single quotes for strings - Add comments for complex functions - Always write tests for new features ## Common commands - npm run build - Builds the app - npm run deploy - Deploys to production
Why this helps: Claude will remember these details in every conversation!
Use the # key
during any conversation to save something to CLAUDE.md:
# During your conversation
You: "# Always use async/await instead of promises"
# Claude automatically adds this to CLAUDE.md
# Now Claude will remember this preference!
Problem: Claude gets confused because there's too much old information
Don't do this
You: "Build a login form"
[Claude builds it]
You: "Build a signup form"
You: "Build a checkout page"
You: "Build an admin dashboard"
# Now Claude is confused!
Do this instead
You: "Build a login form"
[Claude builds it]
/clear
You: "Build a signup form"
[Claude builds it]
/clear
Problem: Claude doesn't know exactly what you want
Too vague
❌ "Make it better"
❌ "Fix the bug"
❌ "Add a button"
Much better
✅ "Make the homepage load faster by optimizing the images"
✅ "Fix the bug where the date picker shows the wrong month"
✅ "Add a blue 'Submit' button at the bottom of the form"
Problem: Claude jumps straight to coding and makes mistakes
Not ideal
"Build a complete e-commerce site"
[Claude starts coding immediately and might go wrong direction]
Much better
"I want to build an e-commerce site. Make a plan first, don't write code yet."
[Claude creates a detailed plan]
"The plan looks good. Now let's start with the product listing page."
Problem: You let Claude change lots of files without checking
Solution:
Review changes before approving. Ask Claude what it wants to do first.
Problem: One big request that's hard to complete
Solution:
Break it into smaller tasks. Do one thing at a time.
Instead of typing full file paths, use Tab to autocomplete:
You: "Look at src/[TAB]"
# Claude shows you files in src/ folder
You: "Look at src/auth.js and fix the login bug"
You can drag and drop images right into the chat:
[Drag design mockup into chat]
You: "Build this landing page design"
If Claude is doing something wrong, just press Escape to stop it.
Realize it's going wrong → Press Escape → Give better instructions
You: "Read https://docs.react.dev"
and then help me build a React component
Claude reads the docs and uses current best practices
Don't understand something? Just ask!
You: "You just wrote a complex function. Can you explain what it
does?"
"I don't understand async/await. Can you explain it with an example?"
"What's the difference between let and const?"
"Why would I use a Map instead of an Object?"
You: "Test the login feature and tell me if anything
breaks"
You: "Run the tests and fix anything that fails"
claude # Start Claude Code
/clear # Start fresh conversation
/init # Create CLAUDE.md file
/permissions # Manage what Claude can do
Escape # Stop Claude
Escape Escape # Go back and edit
Shift+Tab # Toggle auto-accept mode
"Explain how this app handles user authentication"
"Fix the bug where the form doesn't validate email addresses"
"Add a 'Delete' button to each item in the list, styled in red"
"Make a plan for adding a shopping cart feature"
"Run the tests and fix anything that's broken"
"Write a commit message for these changes"
Let's build a simple website together to practice!
mkdir my-first-project
cd my-first-project
claude
You: "Let's build a personal portfolio website. Make a plan first."
Claude: [Creates plan with HTML structure, CSS styling, sections for About/Projects/Contact]
You: "Now add some nice CSS styling. Use a modern, clean design with a blue color scheme."
[Claude creates styles.css]
You: "Add a contact form with name, email, and message fields"
[Claude adds the form]
You: "Perfect! Commit these changes with a good commit message"
[Claude commits your work]
• "Can you make it mobile-responsive?"
• "Add a dark mode toggle button"
• "Add some sample projects to the portfolio section"
Solution: Give Claude permission
/permissions add Edit
Solution: Allow specific tools or use "safe YOLO mode"
/permissions add Edit
/permissions add Bash(git:*)
# Or run without asking (use carefully!)
claude --dangerously-skip-permissions
Solution: Start a fresh conversation
/clear
# Then re-explain what you need
Solution: Press Escape twice, then edit your message
Escape Escape
Now you can edit your last message
Solution: Ask for concise answers
You: "Explain this code, but keep it brief"
You: "Just tell me if there are any bugs, be concise"
Connect Claude to other tools (GitHub, databases, etc.)
Create shortcuts for tasks you do often
Use Claude in scripts and CI/CD pipelines
TDD, multi-Claude strategies, and more