Claude Code Workshop

From Zero to AI-Powered Development

2 Hours · Hands-On · All Levels

Open your terminal while we get started

Who's in the Room?

  • Raise your hand: used any AI coding tool?
  • Keep it up: used Claude (chat or API)?
  • Still up? Used Claude Code in the terminal?

This helps us calibrate the session for everyone.

Claude Code: Your AI Teammate in the Terminal

  • Not autocomplete — a full agent that reads, writes, and runs code
  • Lives in your terminal, works with your existing tools
  • Understands your entire project, not just one file
  • Configurable: teach it your standards and workflows

Under the Hood

You (natural language)
Claude Code
Read / Edit / Bash / Search
Your Project
  • Claude reads files and understands context
  • Proposes changes, asks for permission
  • Executes: edits files, runs commands, creates commits
  • You stay in control at every step

Why Not Just ChatGPT / Copilot / Cursor?

  • Terminal-native — works with any editor, any stack, any OS
  • Agentic — multi-step reasoning, not one-shot suggestions
  • Project-aware — CLAUDE.md gives persistent, shared context
  • Extensible — hooks, commands, agent teams
  • No vendor lock-in to any IDE

Today's Mission

  • Install and configure Claude Code
  • Write a CLAUDE.md for YOUR project
  • Set up hooks for automated quality checks
  • Create custom slash commands
  • See multi-agent orchestration in action

By the end: a fully configured AI dev environment you can use on Monday.

The Journey

INSTALL
0:10-0:25
CONFIGURE
0:25-0:45
USE
0:45-1:10
CUSTOMIZE
1:10-1:30
BUILD
1:30-2:10
  • Progressive difficulty — everyone starts together
  • "Level Up" challenges for those who want more
  • Assistants are here to help — raise your hand anytime

How This Works

  • Follow along on your machine — this is hands-on
  • Green sticky = I'm good  ·  Red sticky = I need help
  • Questions anytime, or post to the shared Q&A doc
  • If stuck: grab an assistant first

Step 1: Installation

Beginner

~15 minutes

One Command to Install

npm install -g @anthropic-ai/claude-code
  • Requires Node.js >= 18
  • macOS: may need sudo for global install
  • Windows: use PowerShell as Admin, or WSL2 (recommended)

Connecting to Claude

  • Option A: Claude Pro/Max subscription (included with plan)
  • Option B: API key — export ANTHROPIC_API_KEY=sk-ant-...
  • Option C: Workshop key (on your printed card)
# Just run claude -- first run triggers auth
claude

Hello, Claude

$ claude
> What files are in this project and what do they do?
  • Claude reads your project files
  • Asks permission before any action
  • Permission levels: Allow Once, Allow Session, Always Allow

Quick Tip: One-Shot Mode

# Ask a question without entering interactive mode
claude -p "explain the main function in index.js"

# Pipe input for quick analysis
git diff | claude -p "review this diff"

# Process files
cat error.log | claude -p "what went wrong?"

Great for scripting and CI integration.

HANDS-ON · 10 MIN

Your Turn: Install & First Chat

  • Install Claude Code
  • Authenticate with your workshop key
  • Ask Claude: "What is this project about?"
  • Try approving a permission request
You see the Claude Code prompt and got a response.

Step 2: CLAUDE.md

Your AI's Instruction Manual

Beginner Intermediate

~20 minutes

Without CLAUDE.md

  • Claude doesn't know your coding style
  • Doesn't know your build commands
  • Doesn't know your architecture decisions
  • Every session starts from scratch
  • Team members get inconsistent results

With CLAUDE.md

  • Persistent instructions loaded every session
  • Shared with your team via git
  • Claude follows YOUR rules, YOUR style, YOUR workflow
  • Think: "onboarding docs for your AI teammate"

5 minutes of writing saves hours of corrections.

Three Levels of CLAUDE.md

./src/CLAUDE.md — Subdirectory (component-specific)
./CLAUDE.md — Project root (team-shared, in git)
~/.claude/CLAUDE.md — Global (personal preferences)
  • All levels merge — more specific overrides more general
  • Project-level is the most important for teams

Writing Effective Instructions

Bad

  • "Write good code"
  • "Be careful"
  • "Use best practices"

Good

  • "Single quotes, 2-space indent, no semicolons"
  • "Run npm test before any commit"
  • "Routes in src/routes/, logic in src/services/"

Specific. Actionable. Scoped.

Anatomy of a Great CLAUDE.md

# Project: My App

## Tech Stack
- TypeScript, React 19, Vite, Vitest

## Commands
- Dev: `npm run dev`
- Test: `npm test`
- Lint: `npm run lint`

## Code Style
- Functional components only (no classes)
- Use named exports
- Max file length: 200 lines

## Rules
- NEVER modify package.json without asking
- Always add tests for new functions

CLAUDE.md in the Wild

  • Monorepo: "When in packages/api, run tests from that directory"
  • Legacy: "This codebase uses jQuery. Do not introduce React."
  • Team: "We use conventional commits: feat:, fix:, docs:"
  • Security: "Never expose env vars in client-side code"

Real examples from production teams.

LIVE DEMO

Creating a CLAUDE.md

  • Open starter project in terminal
  • Create CLAUDE.md with project-specific rules
  • Ask Claude to add a feature — observe it follows the rules
  • Break a rule intentionally — show Claude enforcing it

~4 minutes

HANDS-ON · 8 MIN

Write Your CLAUDE.md

  • Open the starter project
  • Create CLAUDE.md at the project root
  • Fill in: tech stack, commands, code style, rules
  • Test: ask Claude to create a file
Claude's output matches your CLAUDE.md instructions.

Compare Notes

  • Turn to your neighbor
  • Compare CLAUDE.md files
  • What did they include that you missed?

2 minutes · Then we move on

Step 3: Hooks

Automated Reactions

Intermediate

~15 minutes

Shell Commands That Fire Automatically

EventWhenUse Case
PreToolUseBefore a tool runsBlock dangerous commands
PostToolUseAfter a tool completesAuto-lint, auto-format
NotificationClaude sends notificationDesktop alerts
StopClaude finishes its turnLogging, cleanup
Claude Action
Hook Fires
Continue or Block

Configuration

.claude/settings.json     # project-level (commit to git)
~/.claude/settings.json   # global (personal)
  • JSON format under the "hooks" key
  • Each hook has a matcher (which tool) and command (what to run)
  • PreToolUse hooks return JSON: allow, block, or modify

Anatomy of a Hook

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Write|Edit",
        "command": "npx eslint --fix $CLAUDE_FILE_PATH"
      }
    ],
    "PreToolUse": [
      {
        "matcher": "Bash",
        "command": "/path/to/safety-check.sh"
      }
    ]
  }
}
  • matcher: regex against tool name (Write, Edit, Bash...)
  • $CLAUDE_FILE_PATH: the file being operated on

PreToolUse: The Safety Net

#!/bin/bash
# safety-check.sh -- block dangerous commands
INPUT=$(cat -)
COMMAND=$(echo "$INPUT" | jq -r '.tool_input.command // empty')

if echo "$COMMAND" | grep -qE 'rm -rf|DROP TABLE|format'; then
  echo '{"decision":"block","reason":"Dangerous command blocked"}'
else
  echo '{"decision":"allow"}'
fi

Powerful for teams. Prevent accidental destructive operations.

Hooks You'll Actually Use

  • Auto-format: Run Prettier/ESLint after every file edit
  • Security scan: Block commits containing secrets or API keys
  • Notification: Desktop alert when a long task completes
  • Test runner: Auto-run related tests after file changes
  • Logging: Record all Claude actions for audit

Start with auto-format -- highest value, lowest risk.

LIVE DEMO

Hooks in Action

  • Add PostToolUse lint hook to settings.json
  • Ask Claude to create a file with style issues
  • Watch hook auto-fix the style
  • Add PreToolUse safety hook
  • Ask Claude to run a "dangerous" command — blocked!

~5 minutes

HANDS-ON · 5 MIN

Add a Hook

  • Create .claude/settings.json in your project
  • Add the PostToolUse ESLint hook
  • Test: ask Claude to write a file
You see ESLint output after Claude edits a file.

Step 4: Slash Commands

Your Custom Toolkit

Intermediate

~10 minutes

Custom Commands for Repeatable Workflows

  • Markdown files in .claude/commands/ (project) or ~/.claude/commands/ (global)
  • Invoke with /command-name in Claude Code
  • Template with $ARGUMENTS placeholder
  • Built-in: /init, /compact, /review

Think: saved prompts with superpowers. Team-shared via git.

Example: /review Command

# File: .claude/commands/review.md

Review the following file for:
1. Bugs and logic errors
2. Security vulnerabilities (OWASP top 10)
3. Performance issues
4. Code style violations per our CLAUDE.md

File to review: $ARGUMENTS

Provide findings as a numbered list with severity
(critical/warning/info) and suggested fixes.

Usage: /review src/auth/login.ts

Commands Your Team Will Love

  • /test-gen <file> — Generate unit tests for a file
  • /explain <file> — Explain code for onboarding
  • /migrate <desc> — Generate a database migration
  • /api-doc <endpoint> — Generate API documentation
  • /security-scan — Security review on recent changes

The best commands encode tribal knowledge.

LIVE DEMO

Creating & Using Slash Commands

  • Create .claude/commands/ directory
  • Write review.md command file
  • Use /review src/index.ts in Claude Code
  • Show the structured review output

~4 minutes

HANDS-ON · 3 MIN

Create a Slash Command

  • Create .claude/commands/ in your project
  • Write at least one command
  • Test it with /your-command <argument>
Your custom command works and produces useful output.

5-Minute Break

Stretch · Grab a drink · Catch up

Caught up? Explore: claude --help

Step 5: Agent Teams

Multi-Agent Orchestration

Advanced

~15 minutes

When One Agent Isn't Enough

  • Context windows have limits
  • Some tasks have independent parallel subtasks
  • Research and implementation can happen simultaneously
  • Complex refactors touch dozens of files

Orchestration Model

Lead Agent (coordinator)
Research
Implementation
Testing
  • Lead agent breaks down the problem
  • Worker agents execute in parallel
  • Results flow back for integration

Coordination Primitives

TaskCreate   -- Define a subtask with description + dependencies
TaskUpdate   -- Mark tasks in_progress / completed
TaskList     -- See all tasks and their status
TaskGet      -- Get full details of a specific task
SendMessage  -- Communicate between agents

Built-in tools. Claude Code manages them when you use the Agent tool.

When to Use Agent Teams

Use When

  • Large refactors (10+ files)
  • Research-heavy tasks
  • Parallel independent work
  • Code gen + test gen simultaneously

Skip When

  • Single-file edits
  • Quick questions
  • Small projects
  • Heavily sequential work

Don't over-engineer. Most tasks don't need multi-agent.

LIVE DEMO

Agent Team Refactoring

"Refactor this Express app: convert 5 route files from callbacks to async/await, update tests, update docs"

  • Lead agent analyzes the codebase
  • Creates tasks for each file + tests + docs
  • Worker agents pick up tasks in parallel
  • Lead agent verifies and integrates

~8 minutes

Your Turn to Think

  • Think of a task from your real work that would benefit from agent teams
  • Share with your neighbor
  • We'll hear 2–3 examples

2 minutes

Mission: Build It

All Levels

~40 minutes

Your Mission

  • Open the starter project — DevTool CLI utility
  • Use Claude Code to build features, configure tools, and ship
  • Three checkpoints — go as far as you can
  • Assistants are roaming — ask for help
cp -r project ~/claude-workshop/devtool
cd ~/claude-workshop/devtool
npm install
claude

Checkpoints

CP1 · Beginner

Write CLAUDE.md
Implement core feature with Claude Code

~15 min

CP2 · Intermediate

Add hooks (auto-lint)
Create a slash command

~10 min

CP3 · Advanced

Multi-file refactor
Test generation
Agent-style delegation

~10 min

Progress Board

CP1

_

CP2

_

CP3

_

Update live as participants complete checkpoints

Show & Tell

  • 2–3 volunteers: 60 seconds each
  • What did you build?
  • What surprised you?

Volunteers picked during the hands-on phase.

What You Learned Today

  • Install Claude Code and authenticate
  • CLAUDE.md — persistent, team-shared AI instructions
  • Hooks — automated quality checks and safety nets
  • Slash commands — repeatable custom workflows
  • Agent teams — multi-agent orchestration

What to Do Monday Morning

  • 1. Add a CLAUDE.md to your main project at work
  • 2. Set up one hook (start with auto-lint)
  • 3. Create one slash command your team will use
  • 4. Commit your CLAUDE.md — share it with your team

Keep Learning

  • Docs: docs.anthropic.com/claude-code
  • GitHub: github.com/anthropics/claude-code
  • Community: Discord / Forum
  • Workshop repo: Take it home and keep building

[QR codes for resources + feedback form go here]

Go Build Amazing Things

Thank you for your time and energy

Thanks to the assistants

Feedback form → [QR code]