Claude Code Getting Started Guide

Build a professional portfolio website with Claude Code in under an hour

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

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

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

  1. Go to claude.ai and sign in
  2. Navigate to your account settings
  3. Generate an API key for Claude Code
  4. 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

  1. Download Cursor from cursor.sh
  2. Install the application on your system
  3. 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

  1. Open your project in Cursor
  2. Look for the Claude Code extension in the extensions panel
  3. Try using Ctrl+Shift+P (Cmd+Shift+P on Mac) and search for "Claude"
  4. You should see Claude Code commands available

Using Claude in Cursor

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

  1. Go to GitHub.com and sign in
  2. Click the "+" icon and select "New repository"
  3. Repository name: my-portfolio
  4. Description: "Professional portfolio website built with Claude Code"
  5. Set to Public (required for GitHub Pages)
  6. Do NOT initialize with README (you already have files)
  7. Click "Create repository"

Step 3: Generate Personal Access Token

  1. Go to GitHub Settings � Developer settings � Personal access tokens
  2. Click "Generate new token (classic)"
  3. Name: "Claude Code Portfolio"
  4. Expiration: 90 days (or as needed)
  5. Select scopes: repo, workflow
  6. Click "Generate token"
  7. 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

  1. Go to your repository on GitHub
  2. Click on "Settings" tab
  3. Scroll down to "Pages" section
  4. Under "Source", select "Deploy from a branch"
  5. Branch: main, Folder: / (root)
  6. 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

Advanced Claude Code Features

Project Ideas to Try Next

  1. Blog Website: Create a personal blog with multiple pages
  2. E-commerce Store: Build a simple online store interface
  3. Dashboard App: Create a data visualization dashboard
  4. Landing Page: Design a product landing page
  5. Web Application: Build a todo app or calculator

Recommended Learning Path

  1. Master the basics with your portfolio (you're here!)
  2. Learn advanced CSS with animations and layouts
  3. Explore JavaScript frameworks (React, Vue)
  4. Backend development with Node.js
  5. 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

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

Code Quality Standards

Security & Best Practices

Protecting Sensitive Information

Performance Optimization

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:

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

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:

  1. Check the Troubleshooting section above
  2. Restart your terminal/command prompt
  3. Update Claude Code to the latest version: claude update
  4. Check your internet connection
  5. Try the command in a different directory

When Asking for Help

To get the best help, include:

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.