Claude Code â Deep Dive
The most powerful way to use Claude. Run it locally on your computer and give it full autonomy.
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.
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
Get an API Key
- Go to console.anthropic.com/keys (Anthropic Console).
- Sign in with your Claude account.
- Click 'Create Key'.
- Give it a name (e.g., 'Claude Code').
- Copy the key and save it somewhere safe (you won't see it again).
Install Claude Code
- Open your terminal/command prompt.
- Run: npm install -g @anthropic-ai/claude-code
- Wait for installation to finish.
Don't have npm? You need Node.js. Download from nodejs.org and install. Then try the command again.
Authenticate
- Run: claude-code auth
- Paste your API key when prompted.
- It should print 'Authentication successful'.
Verify Installation
- Run: claude-code --version
- If you see a version number, you're good!
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.
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
- Create a file called "SKILL.md" in your project folder.
- Write: the skill name, what it does, how to use it, the steps, and expected output.
- Save it.
- Run:
claude-codeand 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)
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.
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:
- Reads your CSV file
- Calculates revenue, trends, top products
- Creates Python code for analysis
- Runs the code
- Generates an HTML report with charts
- 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
Install Claude Code
- Follow the installation steps from Section 2.
- You don't need to understand the command line â just follow the steps.
Try Cowork Mode
- Open Claude Code (or ask someone to help).
- Tell it: 'Organize my Downloads folder by file type.'
- Watch it work on your screen. Approve actions as it goes.
Track B: Intermediate Users (Basic Commands)
Difficulty: Medium | Time: 20 min
Install & Authenticate
- Follow Section 2: Installation completely.
- Test with: claude-code --version
Run 3 Examples
- Try Example 1: Summarize a file (from Section 3)
- Try Example 4: Organize files
- Try Example 5: Analyze a CSV (create sample data first)
Track C: Advanced Users (Skills & Agents)
Difficulty: High | Time: 30 min
Create a SKILL.md
- In a project folder, create 'SKILL.md'.
- Copy the Example SKILL.md from Section 4.
- Customize it for a real workflow you do regularly.
Create a CLAUDE.md
- In the same folder, create 'CLAUDE.md'.
- Copy the Example from Section 5.
- Customize it for your tech stack and standards.
Run an Agent Task
- In that folder, run: claude-code "[Your task description]"
- Watch Claude Code read SKILL.md and CLAUDE.md automatically.
- It will follow all your conventions.
1. npm install -g @anthropic-ai/claude-code | 2. Get API key from console.anthropic.com/keys | 3. claude-code auth | 4. Paste key
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]"
What it does | How to use | Steps | Output format. Save as SKILL.md in your project.
Project structure | Tech stack | Code standards | Running tasks | Common workflows | Style guide. Save as CLAUDE.md in root.
Watch Claude work on your screen. Approve actions. Take over anytime. Available on Mac.
Never share API key. Treat like password. Regenerate if leaked. Use .env file to store securely.