Level 1Lesson 10âąī¸ 60 min

Claude Code — Deep Dive

The most powerful way to use Claude. Run it locally on your computer and give it full autonomy.

DeveloperAnalystManagerTeacherBusinessDoctor

What is Claude Code?

Claude Code is a command-line tool that runs Claude on your computer with full access to your files, ability to execute code, and power to automate complex tasks. It's the most powerful way to use Claude.

â„šī¸
For everyone: Non-developers can use Cowork Mode (Lesson 10B) to watch Claude work on their computer without touching the command line.

Claude Code vs Web-Based Claude

claude.ai (Web)
  • Browser-based
  • Read/upload files manually
  • Slower at automation
  • Good for conversations
  • Free (with account)
Claude Code (CLI)
  • Runs on your computer
  • Full file system access
  • Execute code instantly
  • Powerful automation
  • Requires API key

Summary: Claude Code is for people who want AI to do serious work on their computer. Web-based Claude is for conversations and quick tasks.

Installation: Get Claude Code Running

đŸ–Ĩī¸HANDS-ON EXERCISE 1⏱ 5 min

Get an API Key

  1. Go to console.anthropic.com/keys (Anthropic Console).
  2. Sign in with your Claude account.
  3. Click 'Create Key'.
  4. Give it a name (e.g., 'Claude Code').
  5. Copy the key and save it somewhere safe (you won't see it again).
âš ī¸
Security: Never share your API key. Treat it like a password. If you leak it, regenerate it immediately in the console.
đŸ–Ĩī¸HANDS-ON EXERCISE 2⏱ 5 min

Install Claude Code

  1. Open your terminal/command prompt.
  2. Run: npm install -g @anthropic-ai/claude-code
  3. Wait for installation to finish.

Don't have npm? You need Node.js. Download from nodejs.org and install. Then try the command again.

đŸ–Ĩī¸HANDS-ON EXERCISE 3⏱ 5 min

Authenticate

  1. Run: claude-code auth
  2. Paste your API key when prompted.
  3. It should print 'Authentication successful'.
đŸ–Ĩī¸HANDS-ON EXERCISE 4⏱ 3 min

Verify Installation

  1. Run: claude-code --version
  2. If you see a version number, you're good!
💡
Troubleshooting: If npm isn't found, restart your terminal. If authentication fails, check your API key.

Basic Usage: 8 Practical Examples

Here are 8 real tasks you can do with Claude Code right now. Try each one.

Example 1: Summarize a File

claude-code summarize ~/Documents/long-report.pdf

Claude reads the PDF and gives you a summary.

Example 2: Create a Spreadsheet

claude-code create spreadsheet of "Name,Email,Phone" data

Claude creates a CSV file with sample data.

Example 3: Fix Grammar in a Text File

claude-code "Fix grammar in ~/Documents/essay.txt and save as essay-fixed.txt"

Claude edits your file and creates a corrected version.

Example 4: Organize Files by Type

claude-code "Organize ~/Downloads: move images to Images/, documents to Documents/"

Claude moves files into organized folders.

Example 5: Analyze a CSV File

claude-code "Analyze sales data in ~/Data/sales.csv. Show trends and top performers."

Claude reads the CSV, does analysis, and shows results.

Example 6: Write Code

claude-code "Write a Python script that counts words in a text file"

Claude writes the code and saves it.

Example 7: Create a Chart

claude-code "Create a bar chart from sales.csv and save as chart.png"

Claude generates a visualization.

Example 8: Write Tests

claude-code "Write pytest tests for the function in app.py"

Claude writes comprehensive tests.

Skills: Teach Claude Code Your Workflows

A "Skill" is a custom instruction file that teaches Claude Code how to do something specific to your work. Once you create a Skill, Claude uses it automatically.

What is a SKILL.md File?

It's a markdown file that describes a workflow. Claude Code reads it and understands what you want. You save it in your project folder, and Claude uses it.

Example SKILL.md File
# Skill: Weekly Report Generator ## What This Does Reads weekly sales data from a CSV, creates a summary, and formats it as a nice HTML report. ## How to Use `claude-code "Generate weekly report"` ## Steps 1. Load sales data from ~/data/weekly_sales.csv 2. Calculate: total revenue, top 3 products, churn rate 3. Create a table with these metrics 4. Format as HTML with a company header 5. Save as ~/reports/weekly_report_[DATE].html ## Output Format - Title: "Weekly Sales Report - [Date]" - Metrics in a table - Insights in bullet points - Professional CSS styling

Now, any time you run Claude Code in that folder, it reads the SKILL.md file and understands exactly what to do.

How to Create a Skill

  1. Create a file called "SKILL.md" in your project folder.
  2. Write: the skill name, what it does, how to use it, the steps, and expected output.
  3. Save it.
  4. Run: claude-code and describe what you want. Claude reads the SKILL.md automatically.

Building Agents with CLAUDE.md

A "CLAUDE.md" file is like SKILL.md but more powerful. It tells Claude Code: "Here's my project, here are my standards, here's how I want you to work."

What Goes in CLAUDE.md?

  • Your project structure (where code lives, what each folder does)
  • Coding standards (use TypeScript, React, this folder structure)
  • Tech stack and dependencies
  • How to run tests, build, deploy
  • Common tasks and how to do them
  • Your team's style guide
  • Tools available (npm scripts, CLI tools)
Example CLAUDE.md for a Web Project
# Claude Code Configuration for MyApp ## Project Structure - /src - React components - /tests - Jest tests - /docs - Documentation - /scripts - Build and deploy scripts ## Tech Stack - React 18 + TypeScript - TailwindCSS for styling - Jest for testing - Vite for bundling ## Code Standards - Use functional components and hooks - Prefer TypeScript interfaces over types - Write tests for all features - Use descriptive variable names - Keep components under 300 lines ## Running Tasks - npm test - Run all tests - npm run build - Create production build - npm run dev - Start dev server - npm run format - Auto-format code ## Common Tasks When asked to add a feature: 1. Create component in /src/components 2. Write tests in /tests 3. Add to main app 4. Run tests to verify 5. Create concise commit message ## Style Guide - Use em/rem for sizes, not px - Prefer semantic HTML - Accessibility is non-negotiable - Mobile-first responsive design

Save this in your project root as "CLAUDE.md". Now, Claude Code will follow all these conventions automatically.

Cowork Mode: For Non-Developers

If the command line feels intimidating, Cowork Mode is for you. Claude Code can see your screen and move your mouse. You stay in control but let Claude handle the repetitive work.

â„šī¸
Cowork Mode: Available on Mac. Shows Claude's cursor and actions on your screen. You can watch, pause, or take over anytime.

Example Cowork Session

You: "Organize my Downloads folder. Show me what you're going to move before you do it."

Claude Code shows you the plan, waits for approval, then executes. You can stop it anytime.

Full Project Walkthrough: Analyzing CSV and Creating Report

Here's a real-world example: analyzing sales data and creating a report.

Step 1: Prepare Your File

Create a CSV file called "sales_data.csv" with columns: Date, Product, Revenue, Quantity.

Step 2: Run Claude Code

claude-code "Analyze sales_data.csv. Show: total revenue, top 5 products, monthly trends. Create an HTML report."

Step 3: Claude Code Works

Claude Code:

  1. Reads your CSV file
  2. Calculates revenue, trends, top products
  3. Creates Python code for analysis
  4. Runs the code
  5. Generates an HTML report with charts
  6. Saves it to "report.html"

Step 4: You Get Results

Open "report.html" in your browser. You have a professional report with analysis and charts.

Time saved: 30+ minutes of manual work done in 2 minutes.

Hands-On: 3 Tracks

Choose ONE track based on your comfort level.

Track A: Non-Technical Users (Cowork Mode)

Difficulty: Easy | Time: 15 min

đŸ–Ĩī¸HANDS-ON EXERCISE 1⏱ 10 min

Install Claude Code

  1. Follow the installation steps from Section 2.
  2. You don't need to understand the command line — just follow the steps.
đŸ–Ĩī¸HANDS-ON EXERCISE 2⏱ 5 min

Try Cowork Mode

  1. Open Claude Code (or ask someone to help).
  2. Tell it: 'Organize my Downloads folder by file type.'
  3. Watch it work on your screen. Approve actions as it goes.

Track B: Intermediate Users (Basic Commands)

Difficulty: Medium | Time: 20 min

đŸ–Ĩī¸HANDS-ON EXERCISE 1⏱ 10 min

Install & Authenticate

  1. Follow Section 2: Installation completely.
  2. Test with: claude-code --version
đŸ–Ĩī¸HANDS-ON EXERCISE 2⏱ 10 min

Run 3 Examples

  1. Try Example 1: Summarize a file (from Section 3)
  2. Try Example 4: Organize files
  3. Try Example 5: Analyze a CSV (create sample data first)
💡
Start simple. Celebrate small wins. You're learning a powerful tool.

Track C: Advanced Users (Skills & Agents)

Difficulty: High | Time: 30 min

đŸ–Ĩī¸HANDS-ON EXERCISE 1⏱ 10 min

Create a SKILL.md

  1. In a project folder, create 'SKILL.md'.
  2. Copy the Example SKILL.md from Section 4.
  3. Customize it for a real workflow you do regularly.
đŸ–Ĩī¸HANDS-ON EXERCISE 2⏱ 10 min

Create a CLAUDE.md

  1. In the same folder, create 'CLAUDE.md'.
  2. Copy the Example from Section 5.
  3. Customize it for your tech stack and standards.
đŸ–Ĩī¸HANDS-ON EXERCISE 3⏱ 10 min

Run an Agent Task

  1. In that folder, run: claude-code "[Your task description]"
  2. Watch Claude Code read SKILL.md and CLAUDE.md automatically.
  3. It will follow all your conventions.
Claude Code Quick Reference
Installation

1. npm install -g @anthropic-ai/claude-code | 2. Get API key from console.anthropic.com/keys | 3. claude-code auth | 4. Paste key

10 Useful Commands

claude-code summarize [file] | claude-code "analyze [file]" | claude-code "create [thing]" | claude-code "organize [folder]" | claude-code "fix [task]" | claude-code "write [type] code" | claude-code "test [file]" | claude-code "export [format]"

SKILL.md Template

What it does | How to use | Steps | Output format. Save as SKILL.md in your project.

CLAUDE.md Template

Project structure | Tech stack | Code standards | Running tasks | Common workflows | Style guide. Save as CLAUDE.md in root.

Cowork Mode (Non-Dev)

Watch Claude work on your screen. Approve actions. Take over anytime. Available on Mac.

Security

Never share API key. Treat like password. Regenerate if leaked. Use .env file to store securely.