# A Day with Claude Code — Exercises

## Exercise 1: Set Up a Claude Code Session and Check Stats

**Task:** Start a Claude Code session in a project (or a test directory). Run the stats command to see your current XP and belt. Note how far you are from the next belt and what the level-up suggestion recommends.

**Validation:**
- [ ] Claude Code session started successfully
- [ ] Stats command executed (e.g., `/teach:stats` or equivalent)
- [ ] You can state your current XP and belt level
- [ ] You can identify at least one suggested next step

**Hints:**
1. Ensure Claude Code is installed and configured for your workspace
2. Stats may be available via a plugin command or slash command — check your setup
3. If gamification isn't configured, the exercise still counts if you successfully ran the session

---

## Exercise 2: Use AI to Review a Real PR

**Task:** Pick a real pull request — your own, a teammate's, or from an open-source repo you have cloned. Ask Claude to review it with a specific focus (e.g., error handling, security, readability). Incorporate at least one piece of Claude's feedback into your understanding or a comment.

**Validation:**
- [ ] PR identified and context provided to Claude
- [ ] Review requested with a clear focus area
- [ ] Claude's feedback received and understood
- [ ] At least one actionable insight applied (comment written, or mental note for future PRs)

**Hints:**
1. Smaller PRs (under ~400 lines) work best for focused review
2. Specify the focus: "error handling," "edge cases," "naming" — it improves the quality of feedback
3. You can copy Claude's suggestions into GitHub/GitLab review comments

---

## Exercise 3: Use AI to Debug an Issue

**Task:** Find or create a bug — a failing test, a runtime error, or unexpected behavior. Describe it to Claude with relevant context (error message, stack trace, steps to reproduce). Work through Claude's suggested investigation steps, identify the root cause, and apply a fix.

**Validation:**
- [ ] Bug described with sufficient context (error, logs, or reproduction steps)
- [ ] Investigation followed (code path traced, hypothesis formed)
- [ ] Root cause identified
- [ ] Fix applied and verified (test passes or error resolved)

**Hints:**
1. Start with the error message — paste it verbatim
2. If Claude suggests a hypothesis, try it (add a null check, add a test) to validate
3. Writing a test for the fix (with Claude's help) reinforces the debugging session
