FINAL LEARN

Final Project & Overall Review

Review all 5 weeks of learning, master CI/CD integration, and prepare for your final project demo.

Learning Progress 0/5 Lessons
Quiz Score: 0/10

LESSONS

1

Overall Review

5-week curriculum recap and key concepts

Not Started

Bringing It All Together

Your final project should demonstrate mastery of all Claude Code features learned over 5 weeks. This lesson reviews the key concepts from each week.

5-Week Skills Recap

Week 1: Fundamentals
  • - /init & CLAUDE.md
  • - Plan Mode (Shift+Tab x2)
  • - @ file references
  • - Thinking modes (ultrathink)
  • - Context management
Week 2: Hooks & Automation
  • - PreToolUse / PostToolUse hooks
  • - Hook matchers & exit codes
  • - stdin JSON parsing
  • - TypeScript validation hooks
  • - Query duplication prevention
Week 3: Skills & MCP Basics
  • - SKILL.md & skill discovery
  • - Custom Skills creation
  • - MCP (Model Context Protocol)
  • - Model Selection (--model)
  • - Thinking modes (ultrathink)
Week 4: MCP & Advanced Automation
  • - MCP server integration
  • - Subagents & Task tool
  • - Custom Commands ($ARGUMENTS)
  • - Headless mode (claude -p)
  • - CI/CD integration

Key Concepts Map

Feature Relationships
CLAUDE.md (Week 1)
  ├── Project context & conventions
  ├── Custom Commands (Week 4) ── reusable /slash prompts
  └── SKILL.md (Week 3) ── discoverable skill definitions

Hooks (Week 2)
  ├── PreToolUse ── block/modify before execution
  ├── PostToolUse ── validate after execution
  └── TypeScript checker, query duplication prevention

MCP Servers (Week 3-4)
  ├── Notion, Playwright, GitHub, PostgreSQL
  └── Multi-server pipelines for complex workflows

Subagents (Week 4)
  ├── Explore, Bash, Plan, General-Purpose
  ├── Parallel development with Task tool
  └── Background execution (run_in_background)

Headless Mode (Week 4)
  ├── claude -p "prompt" ── non-interactive execution
  ├── --output-format json ── structured output
  └── CI/CD pipeline integration (Week 5)
2

CI/CD & GitHub Actions

Automated pipelines with Claude Code

Not Started

Why CI/CD?

CI/CD (Continuous Integration / Continuous Deployment) automates your build, test, and deploy process. Combined with Claude Code's headless mode, you can create powerful automated workflows.

GitHub Actions Basics

.github/workflows/ci.yml
name: CI Pipeline

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build-and-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - run: npm ci
      - run: npm run build
      - run: npm test

Claude Code in CI/CD

.github/workflows/claude-review.yml
name: Claude Code Review

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Claude Code
        run: npm install -g @anthropic-ai/claude-code

      - name: Review PR Changes
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
        run: |
          claude -p "Review git diff for bugs, security issues,
            and code quality. Output as JSON." \
            --output-format json \
            --allowedTools "Read,Grep,Glob" \
            --yes > review-report.json

      - name: Upload Report
        uses: actions/upload-artifact@v4
        with:
          name: review-report
          path: review-report.json

Pre-merge Validation

.github/workflows/validate.yml
name: Pre-merge Check

on:
  pull_request:

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4

      - run: npm ci
      - run: npm run lint
      - run: npm run build
      - run: npm test

      # Optional: Claude security scan
      - name: Security Scan
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
        run: |
          npm install -g @anthropic-ai/claude-code
          claude -p "Scan for OWASP Top 10 vulnerabilities" \
            --allowedTools "Read,Grep,Glob" --yes

Deployment Automation

Vercel / Netlify

Auto-deploy on push to main. Preview deployments for PRs. Zero-config for Next.js, React, etc.

Railway / Render

Full-stack deployment with database support. Auto-deploy from GitHub with environment variables.

npm / PyPI

Publish CLI tools as packages. GitHub Actions can auto-publish on release tag creation.

Docker / Fly.io

Containerized deployment. Dockerfile + CI/CD for consistent environments across dev and production.

3

Integration Patterns

Combining all features into a unified workflow

Not Started

Full-Stack Integration

The real power of Claude Code emerges when you combine features: CLAUDE.md for context, hooks for quality, MCP for external tools, subagents for parallelism, and headless mode for automation.

Pattern 1: Full Development Workflow

End-to-End Development
# 1. Initialize project with context (Week 1)
> /init
> # Add project conventions to CLAUDE.md

# 2. Plan the feature (Week 1)
> Shift+Tab x2 (Plan Mode)
> "Design user authentication system"

# 3. Implement with hooks for validation (Week 2)
# PostToolUse hook runs tsc after every file edit

# 4. Use subagents for parallel tasks (Week 4)
> "Build backend API while testing frontend components"

# 5. Deploy with CI/CD (Week 5)
> git push  # GitHub Actions auto-test & deploy

Pattern 2: Automated Review Pipeline

Code Review Automation
# Hook (Week 2): PostToolUse on Edit/Write
# Runs after every file modification

# 1. TypeScript validation hook
tsc --noEmit  # Catch type errors immediately

# 2. Query duplication hook
# Launches a review subagent (Week 4) to check for duplicates

# 3. CI/CD (Week 5): On push
# GitHub Actions runs full test suite + Claude security scan

# 4. Headless review (Week 4): On PR
claude -p "Review this PR" --output-format json --yes

Pattern 3: Research-to-Product Pipeline

MCP + Subagents + CI/CD
# Step 1: Research with MCP (Week 3-4)
# Playwright MCP scrapes competitor data
# Notion MCP fetches product requirements

# Step 2: Parallel Development with Subagents (Week 4)
Task: Plan architecture
Task: Build API endpoints
Task: Create UI components
Task: Write tests

# Step 3: Quality with Hooks (Week 2)
# Auto-lint, type-check, security scan on every edit

# Step 4: Deploy with CI/CD (Week 5)
# Push to main -> GitHub Actions -> Vercel/Railway

Project Architecture Example

Final Project Structure
my-project/
├── CLAUDE.md              # Project context & conventions
├── .claude/
│   ├── settings.local.json # Hooks + Custom Commands + MCP
│   └── skills/            # Custom skills (SKILL.md)
├── .github/
│   └── workflows/
│       ├── ci.yml         # Build + Test pipeline
│       └── review.yml     # Claude headless review
├── hooks/
│   ├── tsc_check.js       # PostToolUse: type checking
│   └── env_guard.js       # PreToolUse: block .env reads
├── src/                   # Application source code
├── tests/                 # Test suite
└── package.json
4

Best Practices

Production-ready conventions and security

Not Started

CLAUDE.md Best Practices

CLAUDE.md Template
# Project Name

## Architecture
- Frontend: React + TypeScript
- Backend: Express.js + PostgreSQL
- Deploy: Vercel (frontend) + Railway (backend)

## Conventions
- Use functional components with hooks
- All API routes return JSON with {data, error} shape
- Tests required for all new features
- Never commit .env files

## Common Tasks
- Build: npm run build
- Test: npm test
- Lint: npm run lint
- Dev server: npm run dev

Hook Security Best Practices

Use Absolute Paths

Always specify full paths for hook scripts to prevent path interception attacks. Use $PWD placeholder in shared configs.

Quote Shell Variables

Always use "$VAR" instead of $VAR. Unquoted variables can lead to command injection if the input contains shell metacharacters.

Block Path Traversal

Check for ".." in file paths. Prevent hooks from being tricked into accessing files outside the project directory.

Protect Sensitive Files

Use PreToolUse hooks to block reads of .env, .git/, private keys, and other sensitive files.

Effective Prompting

Good Prompt

"Add a /users API endpoint that returns paginated results. Use the existing User model from src/models/user.ts. Include validation for page and limit query params. Write tests."

Bad Prompt

"Add a users endpoint"

Be specific about: file locations, existing patterns to follow, expected behavior, and testing requirements. Claude performs better with explicit context.

Resource Management

Model Selection

Use --model haiku for quick tasks (linting, simple queries). Use Sonnet for standard development. Reserve Opus for complex architecture decisions.

Context Limits

Keep CLAUDE.md focused and concise. Use .claudeignore for large binary files and node_modules. Let Claude auto-compact when context gets large.

Subagent Costs

Each subagent uses its own API context. Use Explore agents for search (lightweight) and General-Purpose only when needed (heavier).

Hook Performance

Keep hooks lightweight -- heavy operations slow down every tool call. Only monitor critical directories for expensive hooks like query duplication checks.

5

Demo Preparation

Final project checklist and demo tips

Not Started

Final Project Demo

Your demo is worth 20 points. A well-structured 12-minute presentation covering your project overview, architecture, live demo, and reflections will maximize your score.

Demo Checklist

1
Project Overview (2 min)

What does your project do? Who is it for? Why did you build it?

2
Architecture & Features (3 min)

Show CLAUDE.md, hooks, MCP config, custom commands. Explain how features integrate.

3
Live Feature Demo (5 min)

Show the application working. Demonstrate Claude Code features in action: hooks firing, MCP data flowing, subagents running.

4
Reflections (2 min)

What did you learn? What was challenging? What would you do differently?

Feature Integration Checklist

Week 1-2 (16 pts)
  • - CLAUDE.md with project context
  • - Plan Mode for architecture
  • - @ file references
  • - Hooks (PreToolUse/PostToolUse)
Week 3-4 (17 pts)
  • - Skills (SKILL.md, /commit)
  • - MCP servers (Notion, Playwright, etc.)
  • - Subagents for parallel tasks
  • - Custom Commands

Demo Tips

Before the Demo
  • - Run /clear to reset Claude session
  • - Prepare backup recording
  • - Test all features work locally
  • - Verify deploy URL is accessible
During the Demo
  • - Show, don't just tell
  • - Narrate what's happening on screen
  • - If something breaks, explain why
  • - Stay within time limits
Note

Evaluation Criteria

Project Completeness (30 pts): Core features + deployment + docs
Feature Integration (25 pts): Use of Week 1-5 features
CI/CD & Automation (15 pts): GitHub Actions + auto-test/deploy
Demo Quality (20 pts): Presentation + live demo + Q&A

TERMINOLOGY

CI/CD

Continuous Integration / Continuous Deployment. Automates building, testing, and deploying code on every push or PR. GitHub Actions is a popular CI/CD platform built into GitHub.

GitHub Actions

Workflow automation built into GitHub. Define YAML files in .github/workflows/ to run jobs on push, PR, schedule, or manual trigger.

Integration Pattern

A repeatable approach to combining multiple Claude Code features (CLAUDE.md, hooks, MCP, subagents, headless) into a cohesive workflow for real-world projects.

Deployment

Making your application accessible to users. Platforms include Vercel (frontend), Railway (full-stack), npm (CLI tools), and Docker-based hosting for services.

Season Champion

The participant with the highest total score across all 5 weeks. Tiebreaker: Week 5 score, then Week 4, then submission time. Top 3 receive certificates.

KNOWLEDGE CHECK

Quiz: Final Project & Review

Question 1/10

Ready for the Final Challenge?

Build your final project integrating all 5 weeks of Claude Code features and present a live demo.

Start Challenge