Introduction
Welcome to the Claude Code Getting Started Guide! In this comprehensive tutorial, you'll learn how to build a professional portfolio website using Claude Code, Anthropic's powerful AI coding assistant.
What You'll Build
- A responsive portfolio website with modern design
- Professional HTML5, CSS3, and JavaScript code
- Mobile-first responsive layout
- Interactive elements and animations
- Contact form functionality
- Optimized for performance and SEO
Project Details
| Aspect |
Details |
| Estimated Time |
45-60 minutes |
| Skill Level |
Beginner to Intermediate |
| Technologies |
HTML5, CSS3, JavaScript, Git, GitHub Pages |
| Tools Required |
Claude Code, Git, Code Editor (optional), Web Browser |
Prerequisites
System Requirements
- Operating System: Windows 10+, macOS 10.15+, or Linux (Ubuntu 18.04+)
- Terminal/Command Line: PowerShell (Windows), Terminal (macOS/Linux)
- Internet Connection: Required for downloading tools and deploying
- Web Browser: Chrome, Firefox, Safari, or Edge (latest versions)
Required Accounts
Verify Your Setup
Before proceeding, verify you have the necessary tools installed:
Check Git Installation
# Check if Git is installed
git --version
# Expected output: git version 2.x.x
Check Node.js (Optional but Recommended)
# Check if Node.js is installed
node --version
npm --version
# Expected output: v18.x.x or higher
Note: If Git is not installed, download it from
git-scm.com. Node.js is optional but recommended for local development servers.
Installation & Setup
Step 1: Install Claude Code
macOS/Linux Installation
# Install using curl
curl -fsSL https://claude.ai/install.sh | bash
# Or using npm (if you have Node.js)
npm install -g @anthropic/claude-code
Windows Installation
# Using PowerShell
iwr https://claude.ai/install.ps1 | iex
# Or using npm (if you have Node.js)
npm install -g @anthropic/claude-code
Step 2: Verify Installation
# Verify Claude Code is installed
claude --version
# Expected output: claude-code v1.x.x
Step 3: Authentication
- Go to claude.ai and sign in
- Navigate to your account settings
- Generate an API key for Claude Code
- Authenticate Claude Code:
# Authenticate with your API key
claude auth login
# Follow the prompts to enter your API key
Success! You should see a confirmation message that Claude Code is authenticated and ready to use.
Your First Project
Step 1: Create Project Directory
# Create and navigate to your project directory
mkdir my-portfolio
cd my-portfolio
# Initialize the directory
claude init
Step 2: Generate Your Portfolio
Use this specific prompt with Claude Code to generate a professional portfolio:
claude create "Build me a professional portfolio website with the following specifications:
1. Modern, responsive design with clean aesthetics
2. Header with navigation menu (Home, About, Projects, Contact)
3. Hero section with personal introduction and call-to-action
4. About section with skills and experience
5. Projects section showcasing 3 sample projects with descriptions
6. Contact section with a working contact form
7. Footer with social media links
8. Mobile-first responsive design
9. Smooth scrolling and subtle animations
10. SEO optimized with proper meta tags
11. Use a professional color scheme (blues and grays)
12. Include placeholder content that I can easily customize
Please create this as a complete website with HTML, CSS, and JavaScript in separate files."
Step 3: Review Generated Files
Claude Code will generate the following structure:
my-portfolio/
index.html # Main HTML file
styles.css # Stylesheet
script.js # JavaScript functionality
assets/ # Images and resources
placeholder-images/
README.md # Project documentation
Step 4: Test Your Website
# Start a local development server
claude serve
# Or use Python if available
python -m http.server 8000
# Or use Node.js if available
npx serve .
Open your browser and navigate to http://localhost:8000 to view your portfolio.
Tip: Take screenshots of your website on different devices to document your progress!
Adding IDE Integration
Install Cursor IDE
- Download Cursor from cursor.sh
- Install the application on your system
- Open Cursor and navigate to your project folder
Connect Claude Code to Cursor
# In your project directory
claude integrate cursor
# This will configure Cursor to work with Claude Code
Verify Integration
- Open your project in Cursor
- Look for the Claude Code extension in the extensions panel
- Try using Ctrl+Shift+P (Cmd+Shift+P on Mac) and search for "Claude"
- You should see Claude Code commands available
Using Claude in Cursor
- Ctrl+K: Quick Claude Code command
- Ctrl+Shift+K: Open Claude Code chat panel
- Right-click: Context menu with Claude options
Pro Tip: Use Claude directly in Cursor to make real-time edits and improvements to your portfolio!
Git & GitHub Deployment
Step 1: Initialize Git Repository
# Initialize Git in your project directory
git init
# Add all files to staging
git add .
# Make your first commit
git commit -m "Initial commit: Create portfolio website
- Add responsive HTML structure
- Implement modern CSS styling
- Include interactive JavaScript features
- Set up project documentation"
Step 2: Create GitHub Repository
- Go to GitHub.com and sign in
- Click the "+" icon and select "New repository"
- Repository name:
my-portfolio
- Description: "Professional portfolio website built with Claude Code"
- Set to Public (required for GitHub Pages)
- Do NOT initialize with README (you already have files)
- Click "Create repository"
Step 3: Generate Personal Access Token
- Go to GitHub Settings � Developer settings � Personal access tokens
- Click "Generate new token (classic)"
- Name: "Claude Code Portfolio"
- Expiration: 90 days (or as needed)
- Select scopes:
repo, workflow
- Click "Generate token"
- Important: Copy the token immediately (you won't see it again)
Step 4: Push to GitHub
# Add remote repository (replace YOUR_USERNAME with your GitHub username)
git remote add origin https://github.com/YOUR_USERNAME/my-portfolio.git
# Push your code to GitHub
git branch -M main
git push -u origin main
# When prompted for password, use your Personal Access Token
Step 5: Enable GitHub Pages
- Go to your repository on GitHub
- Click on "Settings" tab
- Scroll down to "Pages" section
- Under "Source", select "Deploy from a branch"
- Branch:
main, Folder: / (root)
- Click "Save"
<� Congratulations! Your portfolio is now live at:
https://YOUR_USERNAME.github.io/my-portfolio
Making Updates
To update your live website:
# Make your changes, then:
git add .
git commit -m "Update portfolio content"
git push
# Changes will appear on your live site within a few minutes
Next Steps & Advanced Features
Customize Your Portfolio
- Personal Content: Replace placeholder text with your actual information
- Projects: Add your real projects with screenshots and descriptions
- Branding: Customize colors, fonts, and styling to match your personal brand
- Images: Add professional headshot and project images
- Resume: Add a downloadable PDF resume link
Advanced Claude Code Features
- Component Generation:
claude create component "contact-form"
- Code Refactoring:
claude refactor "improve performance"
- Bug Fixing:
claude fix "responsive layout issues"
- Testing:
claude test "add unit tests"
- Documentation:
claude document "add code comments"
Project Ideas to Try Next
- Blog Website: Create a personal blog with multiple pages
- E-commerce Store: Build a simple online store interface
- Dashboard App: Create a data visualization dashboard
- Landing Page: Design a product landing page
- Web Application: Build a todo app or calculator
Recommended Learning Path
- Master the basics with your portfolio (you're here!)
- Learn advanced CSS with animations and layouts
- Explore JavaScript frameworks (React, Vue)
- Backend development with Node.js
- Database integration and full-stack apps
Troubleshooting
Installation Issues
Claude Code Not Found
Problem: claude: command not found
Solutions:
- Restart your terminal/command prompt
- Check PATH environment variable:
echo $PATH
- Reinstall Claude Code using the installer
- Try using the full path:
/usr/local/bin/claude
Permission Denied Errors
Problem: Permission denied during installation
Solutions:
- Windows: Run PowerShell as Administrator
- macOS/Linux: Use
sudo if necessary
- Check folder permissions:
ls -la
Authentication Problems
Invalid API Key
Problem: Authentication failed
Solutions:
- Generate a new API key from claude.ai
- Clear cached credentials:
claude auth logout
- Re-authenticate:
claude auth login
- Check for typos in the API key
Git & GitHub Issues
Remote Repository Errors
Problem: fatal: remote origin already exists
Solution: git remote remove origin then add it again
Authentication Failed (GitHub)
Problem: GitHub push authentication failed
Solutions:
- Use Personal Access Token instead of password
- Update GitHub credentials:
git config --global user.name "Your Name"
- Check token permissions include 'repo' scope
Cursor Integration Issues
Extension Not Working
Problem: Claude Code extension not appearing in Cursor
Solutions:
- Restart Cursor completely
- Check extensions panel for Claude Code
- Reinstall the extension
- Update Cursor to latest version
Development Server Issues
Port Already in Use
Problem: Error: Port 8000 is already in use
Solutions:
- Use a different port:
python -m http.server 8080
- Find and kill the process:
lsof -i :8000
- Try
claude serve --port 3000
Website Not Loading
Problem: Blank page or 404 error
Solutions:
- Check file names:
index.html (not Index.html)
- Verify you're in the correct directory
- Check browser console for errors (F12)
- Try hard refresh: Ctrl+Shift+R (Cmd+Shift+R on Mac)
GitHub Pages Issues
Site Not Updating
Problem: Changes not appearing on live site
Solutions:
- Wait 5-10 minutes for deployment
- Check Actions tab for build status
- Clear browser cache
- Verify files were pushed to GitHub
Still Need Help? Don't worry! Check the
Getting Help section below for additional resources and community support.
Best Practices & Tips
Collaborating with Claude Code
Effective Prompting
- Be Specific: Include exact requirements, colors, layouts, and functionality
- Provide Context: Mention the project type, target audience, and goals
- Request Explanations: Ask Claude to explain the code it generates
- Iterate Gradually: Make small improvements rather than large changes
Best Prompt Examples
# Good: Specific and detailed
"Add a dark mode toggle to the portfolio with smooth transitions,
storing the preference in localStorage, and using CSS custom properties"
# Avoid: Too vague
"Make it look better"
Professional Development Workflow
Version Control Best Practices
- Commit Often: Make small, focused commits with clear messages
- Use Branches: Create feature branches for new functionality
- Write Good Commit Messages: Describe what and why, not just what
- Review Before Committing: Check your changes with
git diff
Code Quality Standards
- Consistent Formatting: Use consistent indentation and spacing
- Meaningful Names: Use descriptive variable and function names
- Comments: Add comments for complex logic
- Performance: Optimize images and minimize code
Security & Best Practices
Protecting Sensitive Information
- Never commit API keys or passwords to version control
- Use .gitignore for sensitive files
- Use environment variables for configuration
- Regularly rotate access tokens
Performance Optimization
- Optimize Images: Use WebP format and appropriate sizes
- Minimize HTTP Requests: Combine CSS and JS files
- Use CDNs: For fonts and common libraries
- Enable Compression: Gzip your assets
Pro Developer Tips
- Test Early: View your site on different devices regularly
- Use Browser DevTools: Master the inspector and console
- Learn Keyboard Shortcuts: Speed up your development
- Stay Updated: Follow web development trends and best practices
Success Metrics
You'll know you've successfully completed this guide when you can check off all these items:
Technical Achievements
Installation & Setup
- Claude Code installed and authenticated
- Git configured with your information
- GitHub account set up with Personal Access Token
- Cursor IDE integrated (optional but recommended)
Portfolio Website
- Professional portfolio website generated
- Responsive design working on mobile and desktop
- All sections complete (header, about, projects, contact)
- Interactive elements functioning (navigation, forms)
- Clean, professional design with good UX
Deployment & Version Control
- Git repository initialized with proper commit history
- Code pushed to GitHub successfully
- GitHub Pages enabled and website live
- Public URL accessible:
https://username.github.io/my-portfolio
Learning Outcomes
<� Knowledge Gained
- Claude Code Proficiency: Comfortable generating and modifying code
- Git Workflow: Understanding of version control basics
- GitHub Pages: Knowledge of free web hosting
- Web Development: Basic understanding of HTML, CSS, JavaScript
- Professional Tools: Experience with modern development workflow
Quality Checklist
| Aspect |
Criteria |
Status |
| Responsive Design |
Works well on mobile, tablet, and desktop |
|
| Performance |
Loads quickly (under 3 seconds) |
|
| Accessibility |
Proper headings, alt text, contrast |
|
| SEO |
Meta tags, proper structure, semantic HTML |
|
| Cross-Browser |
Works in Chrome, Firefox, Safari, Edge |
|
=� Common Completion Blockers
- GitHub Pages not loading: Check repository settings and file names
- Responsive issues: Test on actual devices, not just browser resize
- Missing content: Ensure all placeholder content is meaningful
- Broken links: Verify all navigation and external links work
Celebration Time! <�
Once you've achieved all the success metrics above, you've successfully:
- Built your first professional website with AI assistance
- Learned modern web development workflows
- Created a portfolio that showcases your new skills
- Set up a foundation for future web development projects
Share your success! Take a screenshot of your live portfolio and share it on social media with #ClaudeCodePortfolio
Getting Help
If you encounter issues or need additional support, here are the best resources:
Official Resources
Community Support
- Discord Community: Join the Claude Code Discord server
- Reddit: r/ClaudeCode and r/webdev communities
- Stack Overflow: Tag your questions with #claude-code
Learning Resources
Quick Help Commands
# Get Claude Code help
claude --help
# Check system status
claude status
# View current configuration
claude config list
# Reset configuration if needed
claude config reset
Troubleshooting Checklist
Before asking for help, try these steps:
- Check the Troubleshooting section above
- Restart your terminal/command prompt
- Update Claude Code to the latest version:
claude update
- Check your internet connection
- Try the command in a different directory
When Asking for Help
To get the best help, include:
- Operating System: Windows/macOS/Linux version
- Claude Code Version: Output of
claude --version
- Full Error Message: Copy the complete error text
- Steps to Reproduce: What you were trying to do
- Screenshots: If relevant to the issue
Remember
Every developer encounters challenges! The key is knowing where to look for help and how to ask good questions. The web development community is generally very helpful and welcoming to newcomers.