feat: Add adaptive learning path with self-assessment and lesson quiz skills

Redesign LEARNING-ROADMAP.md with a self-assessment quiz that routes users
to Beginner/Intermediate/Advanced paths instead of a single linear track.
Add two project-local skills:

- self-assessment: comprehensive proficiency quiz (quick or deep mode)
  covering 10 feature areas with per-topic scoring and personalized
  learning paths
- lesson-quiz: per-lesson quiz with 100-question bank (10 per lesson)
  for pre-test, progress check, or mastery verification

Update README.md learning path table with "Recommended For" column and
quiz link. Update .gitignore to track project skills.
This commit is contained in:
Luong NGUYEN
2026-02-26 00:09:08 +01:00
parent e6778d96d5
commit 1ef46cdbac
8 changed files with 1908 additions and 191 deletions
+69
View File
@@ -0,0 +1,69 @@
# Lesson Quiz
> Interactive quiz that tests your understanding of a specific Claude Code lesson with 10 questions, per-question feedback, and targeted review guidance.
## Highlights
- 10 questions per lesson mixing conceptual understanding and practical application
- Covers all 10 lessons (01-Slash Commands through 10-CLI)
- Three timing modes: pre-test, progress check, or mastery verification
- Per-question feedback with correct answers and explanations
- Targeted review recommendations pointing to specific lesson sections
- 100-question bank across all lessons in `references/question-bank.md`
## When to Use
| Say this... | Skill will... |
|---|---|
| "quiz me on hooks" | Run a 10-question quiz on Lesson 06: Hooks |
| "lesson quiz 03" | Test your knowledge of Lesson 03: Skills |
| "do I understand MCP" | Assess your understanding of Lesson 05: MCP |
| "practice quiz" | Let you pick a lesson, then quiz you |
## How It Works
```mermaid
graph TD
A["Select lesson"] --> B["Choose timing: pre/during/after"]
B --> C["Answer 10 questions in 5 rounds"]
C --> D["Score and review feedback"]
style A fill:#4CAF50,color:#fff
style D fill:#2196F3,color:#fff
```
## Usage
```
/lesson-quiz [lesson-name-or-number]
```
Examples:
```
/lesson-quiz hooks
/lesson-quiz 03
/lesson-quiz advanced-features
/lesson-quiz # (prompts for lesson selection)
```
## Output
### Score Report
- Total score out of 10 with grade (Mastered / Proficient / Developing / Beginning)
- Breakdown by question category (conceptual vs. practical)
### Per-Question Feedback
For each incorrect answer:
- What you answered vs. the correct answer
- Explanation of why the correct answer is right
- Specific section of the lesson to review
### Timing-Aware Guidance
- **Pre-test**: Establishes baseline, highlights areas to focus on while studying
- **During**: Identifies what you've grasped and what to revisit
- **After**: Confirms mastery or pinpoints remaining gaps
## Resources
| Path | Description |
|---|---|
| `references/question-bank.md` | 100 pre-written questions (10 per lesson) with answers, explanations, and review pointers |
+204
View File
@@ -0,0 +1,204 @@
---
name: lesson-quiz
version: 1.0.0
description: Interactive lesson-level quiz for Claude Code tutorials. Tests understanding of a specific lesson (01-10) with 8-10 questions mixing conceptual and practical knowledge. Use before a lesson to pre-test, during to check progress, or after to verify mastery. Use when asked to "quiz me on hooks", "test my knowledge of lesson 3", "lesson quiz", "practice quiz for MCP", or "do I understand skills".
---
# Lesson Quiz
Interactive quiz that tests understanding of a specific Claude Code lesson with 8-10 questions, provides per-question feedback, and identifies areas to review.
## Instructions
### Step 1: Determine the Lesson
If the user provided a lesson as an argument (e.g., `/lesson-quiz hooks` or `/lesson-quiz 03`), map it to the lesson directory:
**Lesson mapping:**
- `01`, `slash-commands`, `commands` → 01-slash-commands
- `02`, `memory` → 02-memory
- `03`, `skills` → 03-skills
- `04`, `subagents`, `agents` → 04-subagents
- `05`, `mcp` → 05-mcp
- `06`, `hooks` → 06-hooks
- `07`, `plugins` → 07-plugins
- `08`, `checkpoints`, `checkpoint` → 08-checkpoints
- `09`, `advanced`, `advanced-features` → 09-advanced-features
- `10`, `cli` → 10-cli
If no argument was provided, present a selection prompt using AskUserQuestion:
**Question 1** (header: "Lesson"):
"Which lesson do you want to quiz on?"
Options:
1. "Slash Commands (01)" — Custom commands, skills, frontmatter, arguments
2. "Memory (02)" — CLAUDE.md, memory hierarchy, rules, auto memory
3. "Skills (03)" — Progressive disclosure, auto-invocation, SKILL.md
4. "Subagents (04)" — Task delegation, agent config, isolation
**Question 2** (header: "Lesson"):
"Which lesson do you want to quiz on? (continued)"
Options:
1. "MCP (05)" — External integration, transport, servers, tool search
2. "Hooks (06)" — Event automation, PreToolUse, exit codes, JSON I/O
3. "Plugins (07)" — Bundled solutions, marketplace, plugin.json
4. "More lessons..." — Checkpoints, Advanced Features, CLI
If "More lessons..." is selected, present:
**Question 3** (header: "Lesson"):
"Select your lesson:"
Options:
1. "Checkpoints (08)" — Rewind, restore, safe experimentation
2. "Advanced Features (09)" — Planning, permissions, print mode, thinking
3. "CLI Reference (10)" — Flags, output formats, scripting, piping
### Step 2: Read the Lesson Content
Read the lesson README.md file to refresh context:
- Read file: `<lesson-directory>/README.md`
Then use the question bank from `references/question-bank.md` for that lesson. The question bank provides 10 pre-written questions per lesson with correct answers and explanations.
### Step 3: Present the Quiz
Ask the user about quiz timing context:
Use AskUserQuestion (header: "Timing"):
"When are you taking this quiz relative to the lesson?"
Options:
1. "Before (pre-test)" — I haven't read the lesson yet, testing my prior knowledge
2. "During (progress check)" — I'm partway through the lesson
3. "After (mastery check)" — I've completed the lesson and want to verify understanding
This context affects how the results are framed (see Step 5).
### Step 4: Present Questions in Rounds
Present 10 questions from the question bank in rounds of 2 questions each (5 rounds total). Each question uses AskUserQuestion with the question text and 3-4 answer options.
**IMPORTANT**: Use AskUserQuestion with max 4 options per question, 2 questions per round.
For each round, present 2 questions. After all 5 rounds, proceed to scoring.
**Question format per round:**
Each question from the question bank has:
- `question`: The question text
- `options`: 3-4 answer choices (one correct, labeled in the bank)
- `correct`: The correct answer label
- `explanation`: Why the answer is correct
- `category`: "conceptual" or "practical"
Present each question using AskUserQuestion. Record the user's answer for each.
### Step 5: Score and Present Results
After all rounds, calculate the score and present results.
**Scoring:**
- Each correct answer = 1 point
- Total possible = 10 points
**Grade scale:**
- 9-10: Mastered — Excellent understanding
- 7-8: Proficient — Good grasp, minor gaps
- 5-6: Developing — Fundamentals understood, needs review
- 3-4: Beginning — Significant gaps, review recommended
- 0-2: Not yet — Start from the beginning of this lesson
**Output format:**
```markdown
## Lesson Quiz Results: [Lesson Name]
**Score: N/10** — [Grade label]
**Quiz timing**: [Before / During / After] the lesson
**Question breakdown**: N conceptual correct, N practical correct
### Per-Question Results
| # | Category | Question (short) | Your Answer | Result |
|---|----------|-----------------|-------------|--------|
| 1 | Conceptual | [abbreviated question] | [their answer] | [Correct / Incorrect] |
| 2 | Practical | ... | ... | ... |
| ... | ... | ... | ... | ... |
### Incorrect Answers — Review These
[For each incorrect answer, show:]
**Q[N]: [Full question text]**
- Your answer: [what they chose]
- Correct answer: [correct option]
- Explanation: [why it's correct]
- Review: [specific section of the lesson README to re-read]
### [Timing-specific message]
[If pre-test]:
**Pre-test score: N/10.** This gives you a baseline! Focus your study on the topics you missed. After completing the lesson, retake the quiz to measure your improvement.
[If during]:
**Progress check: N/10.** [If 7+: Great progress — keep going! If 4-6: Review the incorrect topics before continuing. If <4: Consider re-reading from the beginning.]
[If after]:
**Mastery check: N/10.** [If 9-10: You've mastered this lesson! Move on to the next. If 7-8: Almost there — review the missed topics and retake. If <7: Spend more time with the lesson, especially the sections marked above.]
### Recommended Next Steps
[Based on score and timing:]
- [If mastered]: Proceed to the next lesson in the roadmap: [next lesson link]
- [If proficient]: Review these specific sections, then retake: [list sections]
- [If developing or below]: Re-read the full lesson: [lesson link]. Focus on: [list weak categories]
- [Offer]: "Would you like to retake this quiz, try a different lesson, or get help with a specific topic?"
```
### Step 6: Offer Follow-up
After presenting results, use AskUserQuestion:
"What would you like to do next?"
Options:
1. "Retake this quiz" — Try the same lesson quiz again
2. "Quiz another lesson" — Switch to a different lesson
3. "Explain a topic I missed" — Get a detailed explanation of an incorrect answer
4. "Done" — End the quiz session
If **Retake**: Go back to Step 4 (skip timing question, use same timing).
If **Quiz another lesson**: Go back to Step 1.
If **Explain a topic**: Ask which question number, then read the relevant section from the lesson README.md and explain it with examples.
## Error Handling
### Invalid lesson argument
If the argument doesn't match any lesson, show the valid lesson list and ask the user to pick one.
### User wants to quit mid-quiz
If the user indicates they want to stop during any round, present partial results for questions answered so far.
### Lesson README not found
If the README.md file doesn't exist at the expected path, inform the user and suggest checking the repository structure.
## Validation
### Triggering test suite
**Should trigger:**
- "quiz me on hooks"
- "lesson quiz"
- "test my knowledge of lesson 3"
- "practice quiz for MCP"
- "do I understand skills"
- "quiz me on slash commands"
- "lesson-quiz 06"
- "test me on checkpoints"
- "how well do I know the CLI"
- "quiz me before I start the memory lesson"
**Should NOT trigger:**
- "assess my overall level" (use /self-assessment)
- "explain hooks to me"
- "create a hook"
- "what is MCP"
- "review my code"
@@ -0,0 +1,843 @@
# Lesson Quiz — Question Bank
10 questions per lesson. Each question has: category, question text, options (3-4), correct answer, explanation, and review section.
---
## Lesson 01: Slash Commands
### Q1
- **Category**: conceptual
- **Question**: What are the four types of slash commands in Claude Code?
- **Options**: A) Built-in, skills, plugin commands, MCP prompts | B) Built-in, custom, hook commands, API prompts | C) System, user, plugin, terminal commands | D) Core, extension, macro, script commands
- **Correct**: A
- **Explanation**: Claude Code has built-in commands (like /help, /compact), skills (SKILL.md files), plugin commands (namespaced plugin-name:command), and MCP prompts (/mcp__server__prompt).
- **Review**: Types of Slash Commands section
### Q2
- **Category**: practical
- **Question**: How do you pass all user-provided arguments to a skill?
- **Options**: A) Use `${args}` | B) Use `$ARGUMENTS` | C) Use `$@` | D) Use `$INPUT`
- **Correct**: B
- **Explanation**: `$ARGUMENTS` captures all text after the command name. For positional args, use `$0`, `$1`, etc.
- **Review**: Argument handling section
### Q3
- **Category**: conceptual
- **Question**: When both a skill (.claude/skills/name/SKILL.md) and a legacy command (.claude/commands/name.md) exist with the same name, which takes priority?
- **Options**: A) The legacy command | B) The skill | C) Whichever was created first | D) Claude asks the user to choose
- **Correct**: B
- **Explanation**: Skills take precedence over legacy commands with the same name. The skill system supersedes the older command system.
- **Review**: Skill precedence section
### Q4
- **Category**: practical
- **Question**: How do you inject live shell output into a skill's prompt?
- **Options**: A) Use `$(command)` syntax | B) Use `!`command`` (backtick with !) syntax | C) Use `@shell:command` syntax | D) Use `{command}` syntax
- **Correct**: B
- **Explanation**: The `!`command`` syntax runs a shell command and injects its output into the skill prompt before Claude sees it.
- **Review**: Dynamic context injection section
### Q5
- **Category**: conceptual
- **Question**: What does `disable-model-invocation: true` do in a skill's frontmatter?
- **Options**: A) Prevents the skill from running entirely | B) Allows only the user to invoke it (Claude cannot auto-invoke) | C) Hides it from the /help menu | D) Disables the skill's AI processing
- **Correct**: B
- **Explanation**: `disable-model-invocation: true` means only the user can trigger the command via `/command-name`. Claude will never auto-invoke it, useful for skills with side effects like deployments.
- **Review**: Controlling invocation section
### Q6
- **Category**: practical
- **Question**: You want to create a skill that only Claude can invoke automatically (hidden from the user's / menu). Which frontmatter field do you set?
- **Options**: A) `disable-model-invocation: true` | B) `user-invocable: false` | C) `hidden: true` | D) `auto-only: true`
- **Correct**: B
- **Explanation**: `user-invocable: false` hides the skill from the user's slash menu but allows Claude to invoke it automatically based on context.
- **Review**: Invocation control matrix
### Q7
- **Category**: practical
- **Question**: What is the correct directory structure for a new custom skill called "deploy"?
- **Options**: A) `.claude/commands/deploy.md` | B) `.claude/skills/deploy/SKILL.md` | C) `.claude/skills/deploy.md` | D) `.claude/deploy/SKILL.md`
- **Correct**: B
- **Explanation**: Skills live in a directory under `.claude/skills/` with a `SKILL.md` file inside. The directory name matches the command name.
- **Review**: Skill types and locations section
### Q8
- **Category**: conceptual
- **Question**: How do plugin commands avoid name conflicts with user commands?
- **Options**: A) They use a `plugin-name:command-name` namespace | B) They have a special .plugin extension | C) They are prefixed with `p/` | D) They override user commands automatically
- **Correct**: A
- **Explanation**: Plugin commands use a namespace like `pr-review:check-security` to avoid conflicts with standalone user commands.
- **Review**: Plugin commands section
### Q9
- **Category**: practical
- **Question**: You want to restrict which tools a skill can use. Which frontmatter field do you add?
- **Options**: A) `tools: [Read, Grep]` | B) `allowed-tools: [Read, Grep]` | C) `permissions: [Read, Grep]` | D) `restrict-tools: [Read, Grep]`
- **Correct**: B
- **Explanation**: The `allowed-tools` field in SKILL.md frontmatter scopes which tools the command can invoke.
- **Review**: Frontmatter fields reference
### Q10
- **Category**: conceptual
- **Question**: What is the `@file` syntax used for in a skill?
- **Options**: A) Importing another skill | B) Referencing a file to include its content in the prompt | C) Creating a symlink | D) Setting file permissions
- **Correct**: B
- **Explanation**: The `@path/to/file` syntax in a skill includes the referenced file's content into the prompt, allowing skills to pull in templates or context files.
- **Review**: File references section
---
## Lesson 02: Memory
### Q1
- **Category**: conceptual
- **Question**: How many levels does the Claude Code memory hierarchy have, and what has the highest priority?
- **Options**: A) 5 levels, User Memory is highest | B) 7 levels, Managed Policy is highest | C) 3 levels, Project Memory is highest | D) 7 levels, Auto Memory is highest
- **Correct**: B
- **Explanation**: The hierarchy has 7 levels: Managed Policy > Project Memory > Project Rules > User Memory > User Rules > Local Project Memory > Auto Memory. Managed Policy (set by admins) has the highest priority.
- **Review**: Memory hierarchy section
### Q2
- **Category**: practical
- **Question**: How do you quickly add a new rule to memory during a conversation?
- **Options**: A) Type `/memory add "rule text"` | B) Prefix your message with `#` (e.g., `# always use TypeScript`) | C) Type `/rule "rule text"` | D) Use `@add-memory "rule text"`
- **Correct**: B
- **Explanation**: The `#` prefix pattern allows quick single-rule additions during conversation. Claude will ask which memory level to save it to.
- **Review**: Quick memory updates section
### Q3
- **Category**: conceptual
- **Question**: What is the maximum depth for `@path/to/file` imports in CLAUDE.md?
- **Options**: A) 3 levels deep | B) 5 levels deep | C) 10 levels deep | D) Unlimited
- **Correct**: B
- **Explanation**: The `@import` syntax supports recursive imports up to a maximum depth of 5 to prevent infinite loops.
- **Review**: Import syntax section
### Q4
- **Category**: practical
- **Question**: How do you scope a rule file to only apply to files in `src/api/`?
- **Options**: A) Put the rule in `src/api/CLAUDE.md` | B) Add `paths: src/api/**` YAML frontmatter to a `.claude/rules/*.md` file | C) Name the file `.claude/rules/api.md` | D) Use `@scope: src/api` in the rule file
- **Correct**: B
- **Explanation**: Files in `.claude/rules/` support a `paths:` frontmatter field with glob patterns to scope rules to specific directories.
- **Review**: Path-specific rules section
### Q5
- **Category**: conceptual
- **Question**: How many lines of Auto Memory's MEMORY.md are loaded at session start?
- **Options**: A) All lines | B) First 100 lines | C) First 200 lines | D) First 500 lines
- **Correct**: C
- **Explanation**: The first 200 lines of MEMORY.md are auto-loaded into context at session start. Topic files referenced from MEMORY.md are loaded on demand.
- **Review**: Auto Memory section
### Q6
- **Category**: practical
- **Question**: You want personal project preferences that are NOT committed to git. Which file should you use?
- **Options**: A) `~/.claude/CLAUDE.md` | B) `CLAUDE.local.md` | C) `.claude/rules/personal.md` | D) `.claude/memory/personal.md`
- **Correct**: B
- **Explanation**: `CLAUDE.local.md` in the project root is for personal project-specific preferences. It should be git-ignored.
- **Review**: Memory locations comparison
### Q7
- **Category**: conceptual
- **Question**: What does the `/init` command do?
- **Options**: A) Initializes a new Claude Code project from scratch | B) Generates a template CLAUDE.md based on your project structure | C) Resets all memory to defaults | D) Creates a new session
- **Correct**: B
- **Explanation**: `/init` analyzes your project and generates a template CLAUDE.md with suggested rules and standards. It's a one-time bootstrapping tool.
- **Review**: /init command section
### Q8
- **Category**: practical
- **Question**: How do you disable Auto Memory completely?
- **Options**: A) Delete the ~/.claude/projects directory | B) Set `CLAUDE_CODE_DISABLE_AUTO_MEMORY=1` | C) Add `auto-memory: false` to CLAUDE.md | D) Use `/memory disable auto`
- **Correct**: B
- **Explanation**: Setting `CLAUDE_CODE_DISABLE_AUTO_MEMORY=1` disables auto memory. Value `0` forces it on. Unset = default on.
- **Review**: Auto Memory configuration section
### Q9
- **Category**: conceptual
- **Question**: Can a lower-priority memory tier override rules from a higher-priority tier?
- **Options**: A) Yes, the most recent rule always wins | B) No, higher tiers always take precedence | C) Yes, if the lower tier uses the `!important` flag | D) It depends on the rule type
- **Correct**: B
- **Explanation**: Memory precedence flows downward from Managed Policy. Lower tiers (like Auto Memory) cannot override higher tiers (like Project Memory).
- **Review**: Memory hierarchy section
### Q10
- **Category**: practical
- **Question**: You work across two repositories and want Claude to load CLAUDE.md from both. What flag do you use?
- **Options**: A) `--multi-repo` | B) `--add-dir /path/to/other` | C) `--include /path/to/other` | D) `--merge-context /path/to/other`
- **Correct**: B
- **Explanation**: The `--add-dir` flag loads CLAUDE.md from additional directories, allowing multi-repo context.
- **Review**: Additional directories section
---
## Lesson 03: Skills
### Q1
- **Category**: conceptual
- **Question**: What are the 3 levels of progressive disclosure in the skill system?
- **Options**: A) Metadata, instructions, resources | B) Name, body, attachments | C) Header, content, scripts | D) Summary, details, data
- **Correct**: A
- **Explanation**: Level 1: Metadata (~100 tokens, always loaded), Level 2: SKILL.md body (<5k tokens, loaded on trigger), Level 3: Bundled resources (scripts/references/assets, loaded on demand).
- **Review**: Progressive disclosure architecture section
### Q2
- **Category**: practical
- **Question**: What is the most important factor for a skill to be auto-invoked by Claude?
- **Options**: A) The skill's file name | B) The `description` field in frontmatter with when-to-use keywords | C) The skill's directory location | D) The `auto-invoke: true` frontmatter field
- **Correct**: B
- **Explanation**: Claude decides whether to auto-invoke a skill based solely on its `description` field. It must include specific trigger phrases and scenarios.
- **Review**: Auto-invocation section
### Q3
- **Category**: conceptual
- **Question**: What is the maximum recommended length for a SKILL.md file?
- **Options**: A) 100 lines | B) 250 lines | C) 500 lines | D) 1000 lines
- **Correct**: C
- **Explanation**: SKILL.md should be kept under 500 lines. Larger reference material belongs in `references/` subdirectory files.
- **Review**: Content guidelines section
### Q4
- **Category**: practical
- **Question**: How do you make a skill run in an isolated subagent with its own context?
- **Options**: A) Set `isolation: true` in frontmatter | B) Set `context: fork` with an `agent` field in frontmatter | C) Set `subagent: true` in frontmatter | D) Put the skill in `.claude/agents/`
- **Correct**: B
- **Explanation**: `context: fork` runs the skill in a separate context, and the `agent` field specifies which agent type (e.g., `Explore`, `Plan`, custom agent) to use.
- **Review**: Running skills in subagents section
### Q5
- **Category**: conceptual
- **Question**: What is the approximate context budget allocated to skill metadata (Level 1)?
- **Options**: A) 0.5% of context window | B) 2% of context window | C) 5% of context window | D) 10% of context window
- **Correct**: B
- **Explanation**: Skill metadata occupies about 2% of the context window (fallback: 16,000 characters). This is configurable with `SLASH_COMMAND_TOOL_CHAR_BUDGET`.
- **Review**: Context budget section
### Q6
- **Category**: practical
- **Question**: A skill needs to reference a large API specification. Where should you put it?
- **Options**: A) Inline in SKILL.md | B) In a `references/api-spec.md` file inside the skill directory | C) In the project's CLAUDE.md | D) In a separate `.claude/rules/` file
- **Correct**: B
- **Explanation**: Large reference material belongs in the `references/` subdirectory. Claude loads Level 3 resources on demand, keeping SKILL.md lean.
- **Review**: Supporting files structure section
### Q7
- **Category**: conceptual
- **Question**: What is the difference between Reference Content and Task Content in a skill?
- **Options**: A) Reference is read-only, Task is read-write | B) Reference adds knowledge to context, Task provides step-by-step instructions | C) Reference is for documentation, Task is for code | D) There is no difference
- **Correct**: B
- **Explanation**: Reference Content adds domain knowledge to Claude's context (e.g., brand guidelines). Task Content provides actionable step-by-step instructions for a workflow.
- **Review**: Skill content types section
### Q8
- **Category**: practical
- **Question**: What characters are allowed in the `name` field of a skill's frontmatter?
- **Options**: A) Any characters | B) Lowercase letters, numbers, and hyphens only (max 64 chars) | C) Letters and underscores | D) Alphanumeric only
- **Correct**: B
- **Explanation**: The name must be kebab-case (lowercase, hyphens), max 64 characters, and cannot contain "anthropic" or "claude".
- **Review**: SKILL.md format section
### Q9
- **Category**: conceptual
- **Question**: In what order does Claude search for skills?
- **Options**: A) User > Project > Enterprise | B) Enterprise > Personal > Project (plugin uses namespace) | C) Project > User > Enterprise | D) Alphabetical order
- **Correct**: B
- **Explanation**: Priority order is: Enterprise > Personal > Project. Plugin skills use a namespace (plugin-name:skill) so they don't conflict.
- **Review**: Skill types and locations section
### Q10
- **Category**: practical
- **Question**: How do you prevent Claude from automatically invoking a skill while still allowing users to use it manually?
- **Options**: A) Set `user-invocable: false` | B) Set `disable-model-invocation: true` | C) Remove the description field | D) Set `auto-invoke: false`
- **Correct**: B
- **Explanation**: `disable-model-invocation: true` prevents Claude from auto-invoking but keeps the skill available in the user's `/` menu for manual use.
- **Review**: Controlling invocation section
---
## Lesson 04: Subagents
### Q1
- **Category**: conceptual
- **Question**: What is the main advantage of subagents over inline conversation?
- **Options**: A) They are faster | B) They operate in a separate, clean context window preventing context pollution | C) They can use more tools | D) They have better error handling
- **Correct**: B
- **Explanation**: Subagents get a fresh context window, receiving only what the main agent passes. This prevents the main conversation from being polluted with task-specific details.
- **Review**: Overview section
### Q2
- **Category**: practical
- **Question**: What is the priority order for agent definitions?
- **Options**: A) Project > User > CLI | B) CLI > User > Project | C) User > Project > CLI | D) They all have equal priority
- **Correct**: B
- **Explanation**: CLI-defined agents (`--agents` flag) override User-level (`~/.claude/agents/`), which override Project-level (`.claude/agents/`).
- **Review**: File locations section
### Q3
- **Category**: conceptual
- **Question**: Which built-in subagent uses the Haiku model and is optimized for read-only codebase exploration?
- **Options**: A) general-purpose | B) Plan | C) Explore | D) Bash
- **Correct**: C
- **Explanation**: The Explore subagent uses Haiku for fast, read-only codebase exploration. It supports three thoroughness levels: quick, medium, very thorough.
- **Review**: Built-in subagents section
### Q4
- **Category**: practical
- **Question**: How do you restrict which subagents a coordinator agent can spawn?
- **Options**: A) Use `allowed-agents:` field | B) Use `Task(agent_name)` syntax in the `tools` field | C) Set `spawn-limit: 2` | D) Use `restrict-agents: [name1, name2]`
- **Correct**: B
- **Explanation**: Adding `Task(worker, researcher)` in the tools field creates an allowlist — the agent can only spawn subagents named "worker" or "researcher".
- **Review**: Restrict spawnable subagents section
### Q5
- **Category**: conceptual
- **Question**: What does `isolation: worktree` do for a subagent?
- **Options**: A) Runs the agent in a Docker container | B) Gives the agent its own git worktree so changes don't affect the main tree | C) Prevents the agent from reading any files | D) Runs the agent in a sandbox
- **Correct**: B
- **Explanation**: Worktree isolation creates a separate git worktree. If the agent makes no changes, it auto-cleans up. If changes are made, the worktree path and branch are returned.
- **Review**: Worktree isolation section
### Q6
- **Category**: practical
- **Question**: How do you make a subagent run in the background?
- **Options**: A) Set `background: true` in the agent config | B) Use `async: true` in the agent config | C) Press Ctrl+D after starting it | D) Use `--background` CLI flag
- **Correct**: A
- **Explanation**: `background: true` in the agent configuration makes the subagent always run as a background task. Users can also use Ctrl+B to send a foreground task to background.
- **Review**: Background subagents section
### Q7
- **Category**: conceptual
- **Question**: What does the `memory` field with scope `project` do for a subagent?
- **Options**: A) Gives read access to the project CLAUDE.md | B) Creates a persistent memory directory scoped to the current project | C) Shares the main agent's conversation history | D) Loads the project's git history
- **Correct**: B
- **Explanation**: The `memory` field creates a persistent directory for the subagent. Scope `project` means the memory is tied to the current project. The first 200 lines of the agent's MEMORY.md auto-load.
- **Review**: Persistent memory section
### Q8
- **Category**: practical
- **Question**: How do you include a phrase in a subagent's description to encourage Claude to automatically delegate tasks to it?
- **Options**: A) Add "priority: high" | B) Include "use PROACTIVELY" or "MUST BE USED" in the description | C) Set `auto-delegate: true` | D) Add "trigger: always"
- **Correct**: B
- **Explanation**: Including phrases like "use PROACTIVELY" or "MUST BE USED" in the description strongly encourages Claude to automatically delegate matching tasks.
- **Review**: Automatic delegation section
### Q9
- **Category**: conceptual
- **Question**: What are the valid `permissionMode` values for a subagent?
- **Options**: A) read, write, admin | B) default, acceptEdits, bypassPermissions, plan, ignore | C) safe, normal, dangerous | D) restricted, standard, elevated
- **Correct**: B
- **Explanation**: Subagents support five permission modes: default (prompts for everything), acceptEdits (auto-accepts file edits), bypassPermissions (skips all), plan (read-only), ignore (auto-denies).
- **Review**: Configuration fields section
### Q10
- **Category**: practical
- **Question**: How do you resume a subagent that returned an agentId from a previous run?
- **Options**: A) Use `/resume agent-id` | B) Pass the `resume` parameter with the agentId when calling Task tool | C) Use `claude -r agent-id` | D) Subagents cannot be resumed
- **Correct**: B
- **Explanation**: Subagents can be resumed by passing the `resume` parameter with the previously returned agentId, continuing with full context preserved.
- **Review**: Resumable agents section
---
## Lesson 05: MCP
### Q1
- **Category**: conceptual
- **Question**: What are the three MCP transport protocols, and which is recommended?
- **Options**: A) HTTP (recommended), Stdio, SSE (deprecated) | B) WebSocket (recommended), REST, gRPC | C) TCP, UDP, HTTP | D) Stdio (recommended), HTTP, SSE
- **Correct**: A
- **Explanation**: HTTP is recommended for remote servers. Stdio is for local processes (most common currently). SSE is deprecated but still supported.
- **Review**: Transport protocols section
### Q2
- **Category**: practical
- **Question**: How do you add a GitHub MCP server via CLI?
- **Options**: A) `claude mcp install github` | B) `claude mcp add --transport http github https://api.github.com/mcp` | C) `claude plugin add github-mcp` | D) `claude connect github`
- **Correct**: B
- **Explanation**: Use `claude mcp add` with `--transport` flag, a name, and the server URL. For stdio: `claude mcp add github -- npx -y @modelcontextprotocol/server-github`.
- **Review**: MCP configuration management section
### Q3
- **Category**: conceptual
- **Question**: What happens when MCP tool descriptions exceed 10% of the context window?
- **Options**: A) They are truncated | B) Tool Search auto-enables to dynamically select relevant tools | C) Claude shows an error | D) Extra tools are disabled
- **Correct**: B
- **Explanation**: MCP Tool Search auto-enables when tools exceed 10% of context. It requires Sonnet 4 or Opus 4 minimum (Haiku not supported).
- **Review**: MCP Tool Search section
### Q4
- **Category**: practical
- **Question**: How do you use environment variable fallbacks in MCP config?
- **Options**: A) `${VAR || "default"}` | B) `${VAR:-default}` | C) `${VAR:default}` | D) `${VAR ? "default"}`
- **Correct**: B
- **Explanation**: `${VAR:-default}` provides a fallback value if the environment variable is not set. `${VAR}` without fallback will error if not set.
- **Review**: Environment variable expansion section
### Q5
- **Category**: conceptual
- **Question**: What is the difference between MCP and Memory for data access?
- **Options**: A) MCP is faster, Memory is slower | B) MCP is for live/changing external data, Memory is for persistent/static preferences | C) MCP is for code, Memory is for text | D) They are interchangeable
- **Correct**: B
- **Explanation**: MCP connects to live, changing external data sources (APIs, databases). Memory stores persistent, static project context and preferences.
- **Review**: MCP vs Memory section
### Q6
- **Category**: practical
- **Question**: What happens when a team member first encounters a project-scoped `.mcp.json`?
- **Options**: A) It loads automatically | B) They get an approval prompt to trust the project's MCP servers | C) It's ignored unless they opt in via settings | D) Claude asks the admin to approve
- **Correct**: B
- **Explanation**: Project-scoped `.mcp.json` triggers a security approval prompt on each team member's first use. This is intentional — it prevents untrusted MCP servers.
- **Review**: MCP Scopes section
### Q7
- **Category**: conceptual
- **Question**: What does `claude mcp serve` do?
- **Options**: A) Starts an MCP server dashboard | B) Makes Claude Code itself act as an MCP server for other applications | C) Serves MCP documentation | D) Tests MCP server connections
- **Correct**: B
- **Explanation**: `claude mcp serve` turns Claude Code into an MCP server, enabling multi-agent orchestration where one Claude instance can be controlled by another.
- **Review**: Claude as MCP Server section
### Q8
- **Category**: practical
- **Question**: What is the default maximum output size for MCP tools?
- **Options**: A) 5,000 tokens | B) 10,000 tokens | C) 25,000 tokens | D) 50,000 tokens
- **Correct**: C
- **Explanation**: Default max is 25,000 tokens (`MAX_MCP_OUTPUT_TOKENS`). A warning appears at 10k tokens. Disk persistence caps at 50k characters.
- **Review**: MCP Output Limits section
### Q9
- **Category**: conceptual
- **Question**: When both `allowedMcpServers` and `deniedMcpServers` match a server in managed config, which wins?
- **Options**: A) Allowed wins | B) Denied wins | C) The last one configured wins | D) Both are applied independently
- **Correct**: B
- **Explanation**: In managed MCP configuration, deny rules always take precedence over allow rules.
- **Review**: Managed MCP Configuration section
### Q10
- **Category**: practical
- **Question**: How do you reference an MCP resource in a conversation?
- **Options**: A) Use `/mcp resource-name` | B) Use `@server-name:protocol://resource/path` mention syntax | C) Use `mcp.get("resource")` | D) Resources are auto-loaded
- **Correct**: B
- **Explanation**: MCP resources are accessed via `@server-name:protocol://resource/path` mention syntax in conversation.
- **Review**: MCP Resources section
---
## Lesson 06: Hooks
### Q1
- **Category**: conceptual
- **Question**: What are the three types of hooks in Claude Code?
- **Options**: A) Pre, Post, and Error hooks | B) Command, HTTP, and Prompt hooks | C) Before, After, and Around hooks | D) Input, Output, and Filter hooks
- **Correct**: B
- **Explanation**: Command hooks run shell scripts, HTTP hooks call webhook endpoints, and Prompt hooks use LLM evaluation (primarily for Stop/SubagentStop events).
- **Review**: Hook types section
### Q2
- **Category**: practical
- **Question**: A hook script exits with code 2. What happens?
- **Options**: A) Non-blocking warning shown | B) Blocking error — stderr is shown as an error to Claude, tool use is prevented | C) Hook is retried | D) Session ends
- **Correct**: B
- **Explanation**: Exit code 0 = success/continue, exit code 2 = blocking error (stderr shown as error), any other non-zero = non-blocking (stderr in verbose only).
- **Review**: Exit codes section
### Q3
- **Category**: conceptual
- **Question**: What JSON fields does a PreToolUse hook receive on stdin?
- **Options**: A) `tool_name` and `tool_output` | B) `session_id`, `tool_name`, `tool_input`, `hook_event_name`, `cwd`, and more | C) Only `tool_name` | D) The full conversation history
- **Correct**: B
- **Explanation**: Hooks receive a JSON object on stdin with: session_id, transcript_path, hook_event_name, tool_name, tool_input, tool_use_id, cwd, and permission_mode.
- **Review**: JSON input structure section
### Q4
- **Category**: practical
- **Question**: How can a PreToolUse hook modify the tool's input parameters before execution?
- **Options**: A) Return modified JSON on stderr | B) Return JSON with `updatedInput` field on stdout (exit code 0) | C) Write to a temp file | D) Hooks cannot modify inputs
- **Correct**: B
- **Explanation**: A PreToolUse hook can output JSON with `"updatedInput": {...}` on stdout (with exit 0) to modify the tool's parameters before Claude uses them.
- **Review**: PreToolUse output section
### Q5
- **Category**: conceptual
- **Question**: Which hook event supports `CLAUDE_ENV_FILE` for persisting environment variables into the session?
- **Options**: A) PreToolUse | B) UserPromptSubmit | C) SessionStart | D) All events
- **Correct**: C
- **Explanation**: Only SessionStart hooks can use `CLAUDE_ENV_FILE` to persist environment variables into the session.
- **Review**: SessionStart section
### Q6
- **Category**: practical
- **Question**: You want a hook that only runs once when a skill is first loaded, not on every tool call. What field do you add?
- **Options**: A) `run-once: true` | B) `once: true` in the component hook definition | C) `single: true` | D) `max-runs: 1`
- **Correct**: B
- **Explanation**: Component-scoped hooks (defined in SKILL.md or agent frontmatter) support `once: true` to run only on first activation.
- **Review**: Component-scoped hooks section
### Q7
- **Category**: conceptual
- **Question**: A Stop hook is defined in a subagent's frontmatter. What does it automatically convert to?
- **Options**: A) A PostToolUse hook | B) A SubagentStop hook | C) A SessionEnd hook | D) It stays as a Stop hook
- **Correct**: B
- **Explanation**: When a Stop hook is placed in a subagent's frontmatter, it auto-converts to SubagentStop so it runs when that specific subagent finishes.
- **Review**: Component-scoped hooks section
### Q8
- **Category**: practical
- **Question**: How do you match a hook to all MCP tools from a specific server?
- **Options**: A) `matcher: "mcp_github"` | B) `matcher: "mcp__github__.*"` (regex pattern) | C) `matcher: "mcp:github:*"` | D) `matcher: "github-mcp"`
- **Correct**: B
- **Explanation**: Use regex patterns for matchers. MCP tools follow the `mcp__server__tool` naming convention, so `mcp__github__.*` matches all GitHub MCP tools.
- **Review**: Matcher patterns section
### Q9
- **Category**: conceptual
- **Question**: How many hook events does Claude Code support in total?
- **Options**: A) 6 | B) 10 | C) 16 | D) 20
- **Correct**: C
- **Explanation**: Claude Code supports 16 hook events: PreToolUse, PostToolUse, UserPromptSubmit, Stop, SubagentStop, SubagentStart, PermissionRequest, Notification, PreCompact, SessionStart, SessionEnd, WorktreeCreate, WorktreeRemove, ConfigChange, TeammateIdle, TaskCompleted.
- **Review**: Hook events table
### Q10
- **Category**: practical
- **Question**: You want to debug why a hook isn't firing. What's the best approach?
- **Options**: A) Add print statements to the hook script | B) Use `--debug` flag and `Ctrl+O` for verbose mode | C) Check the system log | D) Hooks don't have debugging tools
- **Correct**: B
- **Explanation**: The `--debug` flag and `Ctrl+O` verbose mode show hook execution details including which hooks fire, their inputs, and outputs.
- **Review**: Debugging section
---
## Lesson 07: Plugins
### Q1
- **Category**: conceptual
- **Question**: What is the core manifest file for a plugin and where does it live?
- **Options**: A) `plugin.yaml` in the root directory | B) `.claude-plugin/plugin.json` | C) `package.json` with a "claude" key | D) `.claude/plugin.md`
- **Correct**: B
- **Explanation**: The plugin manifest lives at `.claude-plugin/plugin.json` with required fields: name, description, version, author.
- **Review**: Plugin definition structure section
### Q2
- **Category**: practical
- **Question**: How do you test a plugin locally before publishing?
- **Options**: A) Use `/plugin test ./my-plugin` | B) Use `claude --plugin-dir ./my-plugin` | C) Use `claude plugin validate ./my-plugin` | D) Copy it to ~/.claude/plugins/
- **Correct**: B
- **Explanation**: The `--plugin-dir` flag loads a plugin from a local directory for testing. It's repeatable for loading multiple plugins.
- **Review**: Testing section
### Q3
- **Category**: conceptual
- **Question**: What environment variable is available inside plugin hooks and MCP configs to reference the plugin's installation directory?
- **Options**: A) `$PLUGIN_HOME` | B) `${CLAUDE_PLUGIN_ROOT}` | C) `$PLUGIN_DIR` | D) `${CLAUDE_PLUGIN_PATH}`
- **Correct**: B
- **Explanation**: `${CLAUDE_PLUGIN_ROOT}` resolves to the plugin's installed directory, enabling portable path references in hooks and MCP configs.
- **Review**: Plugin directory structure section
### Q4
- **Category**: practical
- **Question**: A plugin has a command called "check-security" in the "pr-review" plugin. How does a user invoke it?
- **Options**: A) `/check-security` | B) `/pr-review:check-security` | C) `/plugin pr-review check-security` | D) `/pr-review/check-security`
- **Correct**: B
- **Explanation**: Plugin commands use a `plugin-name:command-name` namespace to avoid conflicts with user commands and other plugins.
- **Review**: Plugin commands section
### Q5
- **Category**: conceptual
- **Question**: Which components can a plugin bundle?
- **Options**: A) Only commands and settings | B) Commands, agents, skills, hooks, MCP servers, LSP config, settings, templates, scripts | C) Only commands, hooks, and MCP servers | D) Only skills and agents
- **Correct**: B
- **Explanation**: Plugins can bundle: commands/, agents/, skills/, hooks/hooks.json, .mcp.json, .lsp.json, settings.json, templates/, scripts/, docs/, tests/.
- **Review**: Plugin directory structure section
### Q6
- **Category**: practical
- **Question**: How do you install a plugin from GitHub?
- **Options**: A) `claude plugin add github:username/repo` | B) `/plugin install github:username/repo` | C) `npm install @claude/username-repo` | D) `git clone` then `claude plugin register`
- **Correct**: B
- **Explanation**: Use `/plugin install github:username/repo` to install directly from a GitHub repository.
- **Review**: Installation methods section
### Q7
- **Category**: conceptual
- **Question**: What does the `settings.json` `agent` key do in a plugin?
- **Options**: A) Specifies authentication credentials | B) Sets the main thread agent for the plugin | C) Lists available subagents | D) Configures agent permissions
- **Correct**: B
- **Explanation**: The `agent` key in a plugin's settings.json specifies which agent definition to use as the main thread agent when the plugin is active.
- **Review**: Plugin Settings section
### Q8
- **Category**: practical
- **Question**: How do you manage plugin lifecycle (enable/disable/update)?
- **Options**: A) Edit a config file manually | B) Use `/plugin enable`, `/plugin disable`, `/plugin update plugin-name` | C) Use `claude plugin-manager` | D) Reinstall the plugin
- **Correct**: B
- **Explanation**: Claude Code provides slash commands for full lifecycle management: enable, disable, update, uninstall.
- **Review**: Installation methods section
### Q9
- **Category**: conceptual
- **Question**: What is the main advantage of a plugin over standalone skills/hooks/MCP?
- **Options**: A) Plugins are faster | B) Single-command install, versioned, marketplace distribution, bundles everything together | C) Plugins have more permissions | D) Plugins work offline
- **Correct**: B
- **Explanation**: Plugins package multiple components into one installable unit with versioning, marketplace distribution, and automatic updates — vs. manual setup of standalone components.
- **Review**: Standalone vs Plugin comparison section
### Q10
- **Category**: practical
- **Question**: Where do plugin hooks configuration live within the plugin directory?
- **Options**: A) `.claude-plugin/hooks.json` | B) `hooks/hooks.json` | C) `plugin.json` hooks section | D) `.claude/settings.json`
- **Correct**: B
- **Explanation**: Plugin hooks are configured in `hooks/hooks.json` within the plugin directory structure.
- **Review**: Plugin hooks section
---
## Lesson 08: Checkpoints
### Q1
- **Category**: conceptual
- **Question**: What four things do checkpoints capture?
- **Options**: A) Git commits, branches, tags, stashes | B) Messages, file modifications, tool usage history, session context | C) Code, tests, logs, configs | D) Inputs, outputs, errors, timing
- **Correct**: B
- **Explanation**: Checkpoints capture conversation messages, file modifications made by Claude's tools, tool usage history, and session context.
- **Review**: Overview section
### Q2
- **Category**: practical
- **Question**: How do you access the checkpoint browser?
- **Options**: A) Use `/checkpoints` command | B) Press `Esc + Esc` (double-escape) or use `/rewind` | C) Use `/history` command | D) Press `Ctrl+Z`
- **Correct**: B
- **Explanation**: Double-escape (Esc+Esc) or the `/rewind` command opens the checkpoint browser to select a restore point.
- **Review**: Accessing checkpoints section
### Q3
- **Category**: conceptual
- **Question**: How many rewind options are available, and what are they?
- **Options**: A) 3: Undo, Redo, Reset | B) 5: Restore code+conversation, Restore conversation, Restore code, Summarize from here, Never mind | C) 2: Full restore, Partial restore | D) 4: Code, Messages, Both, Cancel
- **Correct**: B
- **Explanation**: The 5 options are: Restore code and conversation (full rollback), Restore conversation only, Restore code only, Summarize from here (compress), Never mind (cancel).
- **Review**: Rewind options section
### Q4
- **Category**: practical
- **Question**: You used `rm -rf temp/` via Bash in Claude Code, then want to rewind. Will the checkpoint restore those files?
- **Options**: A) Yes, checkpoints capture everything | B) No, Bash filesystem operations (rm, mv, cp) are not tracked by checkpoints | C) Only if you used the Edit tool instead | D) Only if autoCheckpoint was enabled
- **Correct**: B
- **Explanation**: Checkpoints only track file changes made by Claude's tools (Write, Edit). Bash commands like rm, mv, cp operate outside checkpoint tracking.
- **Review**: Limitations section
### Q5
- **Category**: conceptual
- **Question**: How long are checkpoints retained?
- **Options**: A) Until session ends | B) 7 days | C) 30 days | D) Indefinitely
- **Correct**: C
- **Explanation**: Checkpoints persist across sessions for up to 30 days, after which they are automatically cleaned up.
- **Review**: Checkpoint persistence section
### Q6
- **Category**: practical
- **Question**: What does "Summarize from here" do when rewinding?
- **Options**: A) Deletes the conversation from that point | B) Compresses the conversation into an AI-generated summary while preserving the original in the transcript | C) Creates a bullet-point list of changes | D) Exports the conversation to a file
- **Correct**: B
- **Explanation**: Summarize compresses the conversation into a shorter AI-generated summary. The original full text is preserved in the transcript file.
- **Review**: Summarize option section
### Q7
- **Category**: conceptual
- **Question**: When are checkpoints created automatically?
- **Options**: A) Every 5 minutes | B) On every user prompt | C) Only when you manually save | D) After every tool use
- **Correct**: B
- **Explanation**: Automatic checkpoints are created with every user prompt, capturing the state before Claude processes the request.
- **Review**: Automatic checkpoints section
### Q8
- **Category**: practical
- **Question**: How do you disable automatic checkpoint creation?
- **Options**: A) Use `--no-checkpoints` flag | B) Set `autoCheckpoint: false` in settings | C) Delete the checkpoints directory | D) Checkpoints cannot be disabled
- **Correct**: B
- **Explanation**: Set `autoCheckpoint: false` in your configuration to disable automatic checkpoint creation (default is true).
- **Review**: Configuration section
### Q9
- **Category**: conceptual
- **Question**: Are checkpoints a replacement for git commits?
- **Options**: A) Yes, they're more powerful | B) No, they are complementary — checkpoints are session-scoped and expire, git is permanent and shareable | C) Yes, for small projects | D) Only in solo development
- **Correct**: B
- **Explanation**: Checkpoints are temporary (30-day retention), session-scoped, and cannot be shared. Git commits are permanent, auditable, and shareable. Use both together.
- **Review**: Integration with git section
### Q10
- **Category**: practical
- **Question**: You want to compare two different approaches. What's the recommended checkpoint workflow?
- **Options**: A) Create two separate sessions | B) Checkpoint before approach A, try it, rewind to checkpoint, try approach B, compare results | C) Use git branches instead | D) There's no good way to compare approaches
- **Correct**: B
- **Explanation**: The branching strategy: checkpoint at clean state, try approach A, note results, rewind to the same checkpoint, try approach B. Compare both outcomes.
- **Review**: Workflow patterns section
---
## Lesson 09: Advanced Features
### Q1
- **Category**: conceptual
- **Question**: What are the five permission modes in Claude Code?
- **Options**: A) read, write, execute, admin, root | B) default, acceptEdits, plan, dontAsk, bypassPermissions | C) safe, normal, elevated, admin, unrestricted | D) view, edit, run, deploy, full
- **Correct**: B
- **Explanation**: The five modes are: default (prompts for everything), acceptEdits (auto-accepts file edits), plan (read-only analysis), dontAsk (auto-denies unless pre-approved), bypassPermissions (skips all checks).
- **Review**: Permission Modes section
### Q2
- **Category**: practical
- **Question**: How do you activate planning mode?
- **Options**: A) Only via `/plan` command | B) Via `/plan`, `Shift+Tab`/`Alt+M`, `--permission-mode plan` flag, or default config | C) Via `--planning` flag only | D) Planning is always on
- **Correct**: B
- **Explanation**: Planning mode can be activated multiple ways: /plan command, Shift+Tab/Alt+M keyboard shortcut, --permission-mode plan CLI flag, or as a default in config.
- **Review**: Planning Mode section
### Q3
- **Category**: conceptual
- **Question**: What does the `opusplan` model alias do?
- **Options**: A) Uses only Opus for everything | B) Uses Opus for planning phase and Sonnet for implementation | C) Uses a special planning-optimized model | D) Enables plan mode automatically
- **Correct**: B
- **Explanation**: `opusplan` is a model alias that uses Opus for the planning phase (higher quality analysis) and Sonnet for the execution phase (faster implementation).
- **Review**: Planning Mode section
### Q4
- **Category**: practical
- **Question**: How do you toggle extended thinking during a session?
- **Options**: A) Type `/think` | B) Press `Option+T` (macOS) or `Alt+T` | C) Use `--thinking` flag | D) It's always enabled and cannot be toggled
- **Correct**: B
- **Explanation**: Option+T (macOS) or Alt+T toggles extended thinking. It's enabled by default for all models. Opus 4.6 supports adaptive effort levels.
- **Review**: Extended Thinking section
### Q5
- **Category**: conceptual
- **Question**: Are "think" or "ultrathink" special keywords that activate enhanced thinking?
- **Options**: A) Yes, they activate deeper reasoning | B) No, they are treated as regular prompt text with no special behavior | C) Only "ultrathink" is special | D) They work only with Opus
- **Correct**: B
- **Explanation**: The documentation explicitly states these are regular prompt instructions, not special activation keywords. Extended thinking is controlled via Alt+T toggle and environment variables.
- **Review**: Extended Thinking section
### Q6
- **Category**: practical
- **Question**: How do you run Claude in a CI/CD pipeline with structured JSON output and a turn limit?
- **Options**: A) `claude --ci --json --limit 3` | B) `claude -p --output-format json --max-turns 3 "review code"` | C) `claude --pipeline --format json` | D) `claude run --json --turns 3`
- **Correct**: B
- **Explanation**: Print mode (`-p`) with `--output-format json` and `--max-turns` is the standard CI/CD integration pattern.
- **Review**: Headless/Print Mode section
### Q7
- **Category**: conceptual
- **Question**: What does the Task List feature (Ctrl+T) provide?
- **Options**: A) A list of running background processes | B) A persistent to-do list that survives context compaction, shareable via `CLAUDE_CODE_TASK_LIST_ID` | C) A history of past sessions | D) A queue of pending tool calls
- **Correct**: B
- **Explanation**: The Task List (Ctrl+T) is persistent across context compactions and can be shared across sessions via named task directories using `CLAUDE_CODE_TASK_LIST_ID`.
- **Review**: Task List section
### Q8
- **Category**: practical
- **Question**: How do you edit a plan externally (in your preferred editor) during planning mode?
- **Options**: A) Copy-paste from the terminal | B) Press `Ctrl+G` to open the plan in an external editor | C) Use `/export-plan` command | D) Plans can't be edited externally
- **Correct**: B
- **Explanation**: Ctrl+G opens the current plan in your configured external editor for modification.
- **Review**: Planning Mode section
### Q9
- **Category**: conceptual
- **Question**: What is the difference between `dontAsk` and `bypassPermissions` modes?
- **Options**: A) They are the same | B) `dontAsk` auto-denies unless pre-approved; `bypassPermissions` skips all checks entirely | C) `dontAsk` is for files; `bypassPermissions` is for commands | D) `bypassPermissions` is safer
- **Correct**: B
- **Explanation**: dontAsk auto-denies permission requests unless they match pre-approved patterns. bypassPermissions skips all safety checks entirely — it's dangerous for routine use.
- **Review**: Permission Modes section
### Q10
- **Category**: practical
- **Question**: How do you hand off a CLI session to the desktop app?
- **Options**: A) Use `/export` command | B) Use `/desktop` command | C) Copy the session ID and paste in the app | D) Sessions can't transfer between CLI and desktop
- **Correct**: B
- **Explanation**: The `/desktop` command hands off the current CLI session to the native desktop application for visual diff review and multi-session management.
- **Review**: Desktop App section
---
## Lesson 10: CLI Reference
### Q1
- **Category**: conceptual
- **Question**: What are the two primary modes of the Claude CLI?
- **Options**: A) Online and offline mode | B) Interactive REPL (`claude`) and Print mode (`claude -p`) | C) GUI and terminal mode | D) Single and batch mode
- **Correct**: B
- **Explanation**: Interactive REPL is the default conversational mode. Print mode (-p) is non-interactive, scriptable, pipeable — it exits after one response.
- **Review**: CLI architecture section
### Q2
- **Category**: practical
- **Question**: How do you pipe a file into Claude and get JSON output?
- **Options**: A) `claude --file error.log --json` | B) `cat error.log | claude -p --output-format json "explain this"` | C) `claude < error.log --format json` | D) `claude -p --input error.log --json`
- **Correct**: B
- **Explanation**: Pipe content via stdin to print mode (-p) and use --output-format json for structured output.
- **Review**: Interactive vs Print Mode section
### Q3
- **Category**: conceptual
- **Question**: What is the difference between `-c` and `-r` flags?
- **Options**: A) Both do the same thing | B) `-c` continues the most recent session; `-r` resumes by name or ID | C) `-c` creates a new session; `-r` resumes | D) `-c` is for code; `-r` is for review
- **Correct**: B
- **Explanation**: `-c/--continue` resumes the most recent conversation. `-r/--resume "name"` resumes a specific session by name or session ID.
- **Review**: Session management section
### Q4
- **Category**: practical
- **Question**: How do you guarantee schema-valid JSON output from Claude?
- **Options**: A) Just use `--output-format json` | B) Use `--output-format json --json-schema '{"type":"object",...}'` | C) Use `--strict-json` flag | D) JSON output is always schema-valid
- **Correct**: B
- **Explanation**: `--output-format json` alone produces best-effort JSON. Adding `--json-schema` with a JSON Schema definition guarantees the output matches the schema.
- **Review**: Output and format section
### Q5
- **Category**: conceptual
- **Question**: Which flag only works in print mode (-p) and has no effect in interactive mode?
- **Options**: A) `--model` | B) `--system-prompt-file` | C) `--verbose` | D) `--max-turns`
- **Correct**: B
- **Explanation**: `--system-prompt-file` loads a system prompt from a file but only works in print mode. Use `--system-prompt` (inline string) for interactive sessions.
- **Review**: System prompt flags comparison table
### Q6
- **Category**: practical
- **Question**: How do you restrict Claude to only use read-only tools for a security audit?
- **Options**: A) `claude --read-only "audit code"` | B) `claude --permission-mode plan --tools "Read,Grep,Glob" "audit code"` | C) `claude --safe-mode "audit code"` | D) `claude --no-write "audit code"`
- **Correct**: B
- **Explanation**: Combine `--permission-mode plan` (read-only analysis) with `--tools` (allowlist of specific tools) to restrict Claude to only read operations.
- **Review**: Tool and permission management section
### Q7
- **Category**: conceptual
- **Question**: What is the agent definition priority order?
- **Options**: A) Project > User > CLI | B) CLI > User > Project | C) User > CLI > Project | D) All are equal priority
- **Correct**: B
- **Explanation**: CLI-defined agents (--agents flag) have highest priority, then User-level (~/.claude/agents/), then Project-level (.claude/agents/).
- **Review**: Agents configuration section
### Q8
- **Category**: practical
- **Question**: How do you fork an existing session to try a different approach without losing the original?
- **Options**: A) Use `/fork` command | B) Use `--resume session-name --fork-session "branch name"` | C) Use `--clone session-name` | D) Use `/branch session-name`
- **Correct**: B
- **Explanation**: `--resume` with `--fork-session` creates a new independent branch from the resumed session, preserving the original conversation.
- **Review**: Session management section
### Q9
- **Category**: conceptual
- **Question**: What exit code does `claude auth status` return when the user is logged in?
- **Options**: A) 1 | B) 0 | C) 200 | D) It doesn't return an exit code
- **Correct**: B
- **Explanation**: `claude auth status` exits with code 0 when logged in, 1 when not. This makes it scriptable for CI/CD authentication checks.
- **Review**: CLI commands table
### Q10
- **Category**: practical
- **Question**: How do you process multiple files in a batch with Claude?
- **Options**: A) `claude --batch *.md` | B) Use a for loop: `for file in *.md; do claude -p "summarize: $(cat $file)" > ${file%.md}.json; done` | C) `claude -p --files *.md "summarize all"` | D) Batch processing is not supported
- **Correct**: B
- **Explanation**: Use shell for-loops with print mode to process files one at a time. Each invocation is independent and can produce structured output.
- **Review**: Batch processing section
+73
View File
@@ -0,0 +1,73 @@
# Self-Assessment & Learning Path Advisor
> Comprehensive Claude Code proficiency assessment that evaluates 10 feature areas, identifies skill gaps, and generates a personalized learning path to level up.
## Highlights
- Two assessment modes: Quick (8 questions, 2 min) and Deep (5 rounds, 5 min)
- Evaluates 10 feature areas: Slash Commands, Memory, Skills, Hooks, MCP, Subagents, Checkpoints, Advanced Features, Plugins, CLI
- Per-topic scoring with mastery levels (None / Basic / Proficient)
- Gap analysis with dependency-aware prioritization
- Personalized learning path with specific exercises and success criteria
- Follow-up actions: start learning, deep dive, practice project, or retake
## When to Use
| Say this... | Skill will... |
|---|---|
| "assess my level" | Run the assessment quiz and determine your level |
| "where should I start" | Evaluate your experience and suggest a starting point |
| "check my skills" | Produce a detailed skill profile across all 10 areas |
| "what should I learn next" | Identify gaps and build a prioritized learning path |
## How It Works
```mermaid
graph TD
A["Choose assessment mode"] --> B["Answer quiz questions"]
B --> C["Score per-topic proficiency"]
C --> D["Generate personalized learning path"]
D --> E["Start learning or deep dive"]
style A fill:#4CAF50,color:#fff
style E fill:#2196F3,color:#fff
```
## Assessment Modes
### Quick Assessment (~2 min)
- 8 yes/no experience questions across 2 rounds
- Determines overall level: Beginner / Intermediate / Advanced
- Lists specific gaps with tutorial links
- Best for: first-time users, quick check-ins
### Deep Assessment (~5 min)
- 5 rounds of questions covering 10 feature areas (2 topics per round)
- Per-topic scoring (0-2 points each, 20 points total)
- Mastery table with strength areas, priority gaps, and review items
- Dependency-aware learning path with phases and time estimates
- Recommended practice projects combining gap topics
- Best for: experienced users wanting to level up, periodic skill reviews
## Usage
```
/self-assessment
```
## Output
### Skill Profile Table
Shows per-topic score, mastery level, and status (Learn / Review / Mastered).
### Personalized Learning Path
- Organized into phases based on dependency order
- Each topic includes: tutorial link, focus areas, key exercise, success criterion
- Time estimate adjusted for topics already mastered
- Practice projects combining multiple gap areas
### Follow-up Actions
After results, choose to:
- Start the first gap tutorial with guided exercises
- Deep dive into a specific gap area
- Set up a practice project covering your gaps
- Retake in a different assessment mode
+437
View File
@@ -0,0 +1,437 @@
---
name: self-assessment
version: 2.0.0
description: Comprehensive Claude Code self-assessment and learning path advisor. Runs a multi-category quiz covering 10 feature areas, produces a detailed skill profile with per-topic scores, identifies specific gaps, and generates a personalized learning path with prioritized next steps. Use when asked to "assess my level", "take the quiz", "find my level", "where should I start", "what should I learn next", "check my skills", "skill check", or "level up".
---
# Self-Assessment & Learning Path Advisor
Comprehensive interactive assessment that evaluates Claude Code proficiency across 10 feature areas, identifies specific skill gaps, and generates a personalized learning path to level up.
## Instructions
### Step 1: Welcome & Choose Assessment Mode
Present the user with a choice of assessment depth:
Use AskUserQuestion with these options:
- **Quick Assessment** — "8 questions, ~2 minutes. Determines your overall level (Beginner/Intermediate/Advanced) and gives a learning path."
- **Deep Assessment** — "5 categories with detailed questions, ~5 minutes. Gives per-topic skill scores, identifies specific gaps, and builds a prioritized learning path."
If user chooses **Quick Assessment**, go to Step 2A.
If user chooses **Deep Assessment**, go to Step 2B.
---
### Step 2A: Quick Assessment
Present TWO multi-select questions (AskUserQuestion supports max 4 options each):
**Question 1** (header: "Basics"):
"Part 1/2: Which of these Claude Code skills do you already have?"
Options:
1. "Start Claude Code and chat" — I can run `claude` and interact with it
2. "Created/edited CLAUDE.md" — I have set up project or user memory
3. "Used 3+ slash commands" — e.g., /help, /compact, /model, /clear
4. "Created custom command/skill" — Written a SKILL.md or custom command file
**Question 2** (header: "Advanced"):
"Part 2/2: Which of these advanced skills do you have?"
Options:
1. "Configured an MCP server" — e.g., GitHub, database, or other external data source
2. "Set up hooks" — Configured hooks in ~/.claude/settings.json
3. "Created/used subagents" — Used .claude/agents/ for task delegation
4. "Used print mode (claude -p)" — Used `claude -p` for non-interactive or CI/CD use
**Scoring:**
- 0-2 total = Level 1: Beginner
- 3-5 total = Level 2: Intermediate
- 6-8 total = Level 3: Advanced
Go to Step 3 with the level result, listing which specific items were NOT checked as gaps.
---
### Step 2B: Deep Assessment
Present 5 rounds of questions, one AskUserQuestion call per round. Each round covers 2 related feature areas. Use multi-select for all rounds.
**IMPORTANT**: AskUserQuestion supports max 4 options per question. Each round has exactly 1 question with 4 options covering 2 topics (2 options per topic).
---
**Round 1 — Slash Commands & Memory** (header: "Commands")
"Which of these have you done? Select all that apply."
Options:
1. "Created a custom slash command or skill" — Written a SKILL.md file with frontmatter, or created .claude/commands/ files
2. "Used dynamic context in commands" — Used `$ARGUMENTS`, `$0`/`$1`, backtick `!command` syntax, or `@file` references in skill/command files
3. "Set up project + personal memory" — Created both a project CLAUDE.md and personal ~/.claude/CLAUDE.md (or CLAUDE.local.md)
4. "Used memory hierarchy features" — Understand the 7-level priority order, used .claude/rules/ directory, path-specific rules, or @import syntax
**Scoring for Round 1:**
- Options 1-2 map to **Slash Commands** (0-2 points)
- Options 3-4 map to **Memory** (0-2 points)
---
**Round 2 — Skills & Hooks** (header: "Automation")
"Which of these have you done? Select all that apply."
Options:
1. "Installed and used an auto-invoked skill" — A skill that triggers automatically based on its description, without manual /command invocation
2. "Controlled skill invocation behavior" — Used `disable-model-invocation`, `user-invocable`, or `context: fork` with agent field in SKILL.md frontmatter
3. "Set up a PreToolUse or PostToolUse hook" — Configured a hook that runs before/after tool execution (e.g., command validator, auto-formatter)
4. "Used advanced hook features" — Configured prompt-type hooks, component-scoped hooks in SKILL.md, HTTP hooks, or hooks with custom JSON output (updatedInput, systemMessage)
**Scoring for Round 2:**
- Options 1-2 map to **Skills** (0-2 points)
- Options 3-4 map to **Hooks** (0-2 points)
---
**Round 3 — MCP & Subagents** (header: "Integration")
"Which of these have you done? Select all that apply."
Options:
1. "Connected an MCP server and used its tools" — e.g., GitHub MCP for PRs/issues, database MCP for queries, or any external data source
2. "Used advanced MCP features" — Project-scope .mcp.json, OAuth authentication, MCP resources with @mentions, Tool Search, or `claude mcp serve`
3. "Created or configured custom subagents" — Defined agents in .claude/agents/ with custom tools, model, or permissions
4. "Used advanced subagent features" — Worktree isolation, persistent agent memory, background tasks with Ctrl+B, agent allowlists with `Task(agent_name)`, or agent teams
**Scoring for Round 3:**
- Options 1-2 map to **MCP** (0-2 points)
- Options 3-4 map to **Subagents** (0-2 points)
---
**Round 4 — Checkpoints & Advanced Features** (header: "Power User")
"Which of these have you done? Select all that apply."
Options:
1. "Used checkpoints for safe experimentation" — Created checkpoints, used Esc+Esc or /rewind, restored code and/or conversation, or used Summarize option
2. "Used planning mode or extended thinking" — Activated planning via /plan, Shift+Tab, or --permission-mode plan; toggled extended thinking with Alt+T/Option+T
3. "Configured permission modes" — Used acceptEdits, plan, dontAsk, or bypassPermissions mode via CLI flags, keyboard shortcuts, or settings
4. "Used remote/desktop/web features" — Used `claude remote-control`, `claude --remote`, `/teleport`, `/desktop`, or worktrees with `claude -w`
**Scoring for Round 4:**
- Option 1 maps to **Checkpoints** (0-1 point)
- Options 2-4 map to **Advanced Features** (0-3 points, cap at 2)
---
**Round 5 — Plugins & CLI** (header: "Mastery")
"Which of these have you done? Select all that apply."
Options:
1. "Installed or created a plugin" — Used a bundled plugin from marketplace, or created a .claude-plugin/ directory with plugin.json manifest
2. "Used plugin advanced features" — Plugin hooks, plugin MCP servers, LSP configuration, plugin namespaced commands, or --plugin-dir flag for testing
3. "Used print mode in scripts or CI/CD" — Used `claude -p` with --output-format json, --max-turns, piped input, or integrated into GitHub Actions / CI pipelines
4. "Used advanced CLI features" — Session resumption (-c/-r), --agents flag, --json-schema for structured output, --fallback-model, --from-pr, or batch processing loops
**Scoring for Round 5:**
- Options 1-2 map to **Plugins** (0-2 points)
- Options 3-4 map to **CLI** (0-2 points)
---
### Step 3: Calculate & Present Results
#### 3A: For Quick Assessment
Count total selections and determine level. Then present:
```markdown
## Claude Code Skill Assessment Results
### Your Level: [Level 1: Beginner / Level 2: Intermediate / Level 3: Advanced]
You checked **N/8** items.
[One-line motivational summary based on level]
### Your Skill Profile
| Area | Status |
|------|--------|
| Basic CLI & Conversations | [Checked/Gap] |
| CLAUDE.md & Memory | [Checked/Gap] |
| Slash Commands (built-in) | [Checked/Gap] |
| Custom Commands & Skills | [Checked/Gap] |
| MCP Servers | [Checked/Gap] |
| Hooks | [Checked/Gap] |
| Subagents | [Checked/Gap] |
| Print Mode & CI/CD | [Checked/Gap] |
### Identified Gaps
[For each unchecked item, provide a 1-line description of what to learn and a link to the tutorial]
### Your Personalized Learning Path
[Output the level-specific learning path — see Step 4]
```
#### 3B: For Deep Assessment
Calculate per-topic scores from the 5 rounds. Each topic gets 0-2 points. Then present:
```markdown
## Claude Code Skill Assessment Results
### Overall Level: [Level 1 / Level 2 / Level 3]
**Total Score: N/20 points**
[One-line motivational summary]
### Your Skill Profile
| Feature Area | Score | Mastery | Status |
|-------------|-------|---------|--------|
| Slash Commands | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
| Memory | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
| Skills | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
| Hooks | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
| MCP | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
| Subagents | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
| Checkpoints | N/1 | [None/Proficient] | [Learn/Mastered] |
| Advanced Features | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
| Plugins | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
| CLI | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
**Mastery key:** 0 = None, 1 = Basic, 2 = Proficient
### Strength Areas
[List topics with score 2/2 — these are mastered]
### Priority Gaps (Learn Next)
[List topics with score 0 — these need attention first, ordered by dependency]
### Review Areas
[List topics with score 1/2 — basics known but advanced features not yet used]
### Your Personalized Learning Path
[Output gap-specific learning path — see Step 4]
```
**Overall level calculation for Deep Assessment:**
- 0-6 total points = Level 1: Beginner
- 7-13 total points = Level 2: Intermediate
- 14-20 total points = Level 3: Advanced
---
### Step 4: Generate Personalized Learning Path
Based on the assessment results, generate a learning path that is specific to the user's gaps. Do NOT just repeat the generic level path — adapt it.
#### Rules for Path Generation
1. **Skip mastered topics**: If a topic scored 2/2, do not include it in the path.
2. **Prioritize by dependency order**: Slash Commands before Skills, Memory before Subagents, etc. The dependency order is:
- Slash Commands (no deps) -> Skills (depends on Slash Commands)
- Memory (no deps) -> Subagents (depends on Memory)
- CLI Basics (no deps) -> CLI Mastery (depends on all)
- Checkpoints (no deps)
- Hooks (depends on Slash Commands)
- MCP (no deps) -> Plugins (depends on MCP, Skills, Hooks)
- Advanced Features (depends on all previous)
3. **For score 1/2 topics**: Recommend the "deep dive" — link to the specific advanced section they're missing.
4. **Estimate time**: Sum only the topics they need to learn/review.
5. **Group into phases**: Organize remaining topics into logical phases of 2-3 topics each.
#### Path Output Format
```markdown
### Your Personalized Learning Path
**Estimated time**: ~N hours (adjusted for your current skills)
#### Phase 1: [Phase Name] (~N hours)
[Only if they have gaps in these areas]
**[Topic Name]** — [Learn from scratch / Deep dive into advanced features]
- Tutorial: [link to tutorial directory]
- Focus on: [specific sections/concepts they need]
- Key exercise: [one concrete exercise to do]
- You'll know it's done when: [specific success criterion]
**[Topic Name]** — ...
---
#### Phase 2: [Phase Name] (~N hours)
...
---
### Recommended Practice Projects
Based on your gaps, try these real-world exercises to solidify your learning:
1. **[Project name]**: [1-line description combining 2-3 gap topics]
2. **[Project name]**: [1-line description]
3. **[Project name]**: [1-line description]
```
#### Topic-Specific Recommendations
Use these specific recommendations when a topic is a gap:
**Slash Commands (score 0)**:
- Tutorial: [01-slash-commands/](01-slash-commands/)
- Focus on: Built-in commands reference, creating your first SKILL.md, `$ARGUMENTS` syntax
- Key exercise: Create a `/optimize` command and test it
- Done when: You can create a custom skill with arguments and dynamic context
**Slash Commands (score 1 — review)**:
- Focus on: Dynamic context with `!`backtick`` syntax, `@file` references, `disable-model-invocation` vs `user-invocable` control
- Done when: You can create a skill that injects live command output and controls its own invocation behavior
**Memory (score 0)**:
- Tutorial: [02-memory/](02-memory/)
- Focus on: CLAUDE.md creation, `/init` and `/memory` commands, `#` prefix for quick updates
- Key exercise: Create a project CLAUDE.md with your coding standards
- Done when: Claude remembers your preferences across sessions
**Memory (score 1 — review)**:
- Focus on: 7-level hierarchy and priority order, .claude/rules/ directory with path-specific rules, `@import` syntax (max depth 5), Auto Memory MEMORY.md (200-line limit)
- Done when: You have modular rules for different directories and understand the full hierarchy
**Skills (score 0)**:
- Tutorial: [03-skills/](03-skills/)
- Focus on: SKILL.md format, auto-invocation via description field, progressive disclosure (3 loading levels)
- Key exercise: Install the code-review skill and verify it auto-triggers
- Done when: A skill automatically activates based on conversation context
**Skills (score 1 — review)**:
- Focus on: `context: fork` with `agent` field for subagent execution, `disable-model-invocation` vs `user-invocable`, 2% context budget, bundled resources (scripts/, references/, assets/)
- Done when: You can create a skill that runs in a subagent with forked context
**Hooks (score 0)**:
- Tutorial: [06-hooks/](06-hooks/)
- Focus on: Configuration structure (matcher + hooks array), PreToolUse/PostToolUse events, exit codes (0=success, 2=block), JSON input/output format
- Key exercise: Create a PreToolUse hook that validates Bash commands
- Done when: A hook blocks dangerous commands before execution
**Hooks (score 1 — review)**:
- Focus on: All 16 hook events, prompt-type hooks for Stop/SubagentStop, component-scoped hooks in SKILL.md frontmatter, HTTP hooks with allowedEnvVars, `CLAUDE_ENV_FILE` for SessionStart
- Done when: You can create a prompt-based Stop hook and a component-scoped hook in a skill
**MCP (score 0)**:
- Tutorial: [05-mcp/](05-mcp/)
- Focus on: `claude mcp add` command, transport types (HTTP recommended), GitHub MCP setup, environment variable expansion
- Key exercise: Add GitHub MCP server and query PRs
- Done when: You can query live data from an external service via MCP
**MCP (score 1 — review)**:
- Focus on: Project-scope .mcp.json (requires team approval), OAuth 2.0 auth, MCP resources with `@server:resource` mentions, Tool Search (ENABLE_TOOL_SEARCH), `claude mcp serve`, output limits (10k/25k/50k)
- Done when: You have a project .mcp.json and understand Tool Search auto mode
**Subagents (score 0)**:
- Tutorial: [04-subagents/](04-subagents/)
- Focus on: Agent file format (.claude/agents/*.md), built-in agents (general-purpose, Plan, Explore), tools/model/permissionMode config
- Key exercise: Create a code-reviewer subagent and test delegation
- Done when: Claude delegates code review to your custom agent
**Subagents (score 1 — review)**:
- Focus on: Worktree isolation (`isolation: worktree`), persistent agent memory (`memory` field with scopes), background agents (Ctrl+B/Ctrl+F), agent allowlists with `Task(agent_name)`, agent teams (`--teammate-mode`)
- Done when: You have a subagent with persistent memory running in worktree isolation
**Checkpoints (score 0)**:
- Tutorial: [08-checkpoints/](08-checkpoints/)
- Focus on: Esc+Esc and /rewind access, 5 rewind options (restore code+conversation, restore conversation, restore code, summarize, cancel), limitations (bash filesystem ops not tracked)
- Key exercise: Make experimental changes, then rewind to restore
- Done when: You can confidently experiment knowing you can rewind
**Advanced Features (score 0)**:
- Tutorial: [09-advanced-features/](09-advanced-features/)
- Focus on: Planning mode (/plan or Shift+Tab), permission modes (5 types), extended thinking (Alt+T toggle)
- Key exercise: Use planning mode to design a feature, then implement it
- Done when: You can switch between planning and implementation modes fluently
**Advanced Features (score 1 — review)**:
- Focus on: Remote control (`claude remote-control`), web sessions (`claude --remote`), desktop handoff (`/desktop`), worktrees (`claude -w`), task lists (Ctrl+T), managed settings for enterprise
- Done when: You can hand off sessions between CLI, web, and desktop
**Plugins (score 0)**:
- Tutorial: [07-plugins/](07-plugins/)
- Focus on: Plugin structure (.claude-plugin/plugin.json), what plugins bundle (commands, agents, MCP, hooks, settings), installation from marketplace
- Key exercise: Install a plugin and explore its components
- Done when: You understand when to use a plugin vs standalone components
**Plugins (score 1 — review)**:
- Focus on: Creating plugin.json manifest, plugin hooks (hooks/hooks.json), LSP configuration (.lsp.json), `${CLAUDE_PLUGIN_ROOT}` variable, --plugin-dir for testing, marketplace publishing
- Done when: You can create and test a plugin for your team
**CLI (score 0)**:
- Tutorial: [10-cli/](10-cli/)
- Focus on: Interactive vs print mode, `claude -p` with piping, `--output-format json`, session management (-c/-r)
- Key exercise: Pipe a file to `claude -p` and get JSON output
- Done when: You can use Claude non-interactively in a script
**CLI (score 1 — review)**:
- Focus on: --agents flag with JSON config, --json-schema for structured output, --fallback-model, --from-pr, --strict-mcp-config, batch processing with for loops, `claude mcp serve`
- Done when: You have a CI/CD script that uses Claude with structured JSON output
---
### Step 5: Offer Follow-up Actions
After presenting results, ask the user what they'd like to do next:
Use AskUserQuestion with these options:
- **Start learning** — "Help me begin the first topic in my learning path right now"
- **Deep dive on a gap** — "Explain one of my gap areas in detail so I can learn it here"
- **Practice project** — "Set up a practice project that covers my gap areas"
- **Retake assessment** — "I want to retake the quiz (maybe the other mode)"
If **Start learning**: Read the README.md of the first gap tutorial and walk the user through the first exercise.
If **Deep dive on a gap**: Ask which gap topic, then read the relevant tutorial README.md and explain the key concepts with examples.
If **Practice project**: Design a small project that combines 2-3 of their gap topics with concrete steps.
If **Retake assessment**: Go back to Step 1.
## Error Handling
### User selects no items in a round
Treat as 0 points for that round's topics. Continue to next round.
### User selects no items in any round
Assign Level 1: Beginner. Encourage starting from the beginning. Output the full Level 1 path.
### User wants to retake
Re-run from Step 1 with a fresh assessment.
### User disagrees with their level
Acknowledge their preference. Ask which level they identify with. Present the path for their chosen level with a prerequisites check for topics they may have missed.
### User asks about a specific topic
If the user says something like "tell me about hooks" or "I want to learn MCP" during the assessment, note it. After presenting results, highlight that topic in their learning path regardless of score.
## Validation
### Triggering test suite
**Should trigger:**
- "assess my level"
- "take the quiz"
- "find my level"
- "where should I start"
- "what level am I"
- "learning path quiz"
- "self-assessment"
- "what should I learn next"
- "check my skills"
- "skill check"
- "level up"
- "how good am I at Claude Code"
- "evaluate my Claude Code knowledge"
**Should NOT trigger:**
- "review my code"
- "create a skill"
- "help me with MCP"
- "explain slash commands"
- "what is a checkpoint"
+6 -2
View File
@@ -43,8 +43,12 @@ yarn-error.log*
# Temporary files
*.tmp
*.temp
# Keep .claude/ clean for hand-on section
.claude/
# Keep .claude/ clean for hand-on section — except project skills
.claude/*
!.claude/skills/
.claude/skills/*
!.claude/skills/self-assessment/
!.claude/skills/lesson-quiz/
blog-posts/
# EPUB files in root directory
+262 -176
View File
@@ -5,7 +5,34 @@
# 📚 Claude Code Learning Roadmap
**New to Claude Code?** This comprehensive guide will help you master Claude Code features progressively, starting with the simplest and most frequently used capabilities.
**New to Claude Code?** This guide helps you master Claude Code features at your own pace. Whether you're a complete beginner or an experienced developer, start with the self-assessment quiz below to find the right path for you.
---
## 🧭 Find Your Level
Not everyone starts from the same place. Take this quick self-assessment to find the right entry point.
**Answer these questions honestly:**
- [ ] I can start Claude Code and have a conversation (`claude`)
- [ ] I have created or edited a CLAUDE.md file
- [ ] I have used at least 3 built-in slash commands (e.g., /help, /compact, /model)
- [ ] I have created a custom slash command or skill (SKILL.md)
- [ ] I have configured an MCP server (e.g., GitHub, database)
- [ ] I have set up hooks in ~/.claude/settings.json
- [ ] I have created or used custom subagents (.claude/agents/)
- [ ] I have used print mode (`claude -p`) for scripting or CI/CD
**Your Level:**
| Checks | Level | Start At | Time to Complete |
|--------|-------|----------|------------------|
| 0-2 | **Level 1: Beginner** — Getting Started | [Milestone 1A](#milestone-1a-first-commands--memory) | ~3 hours |
| 3-5 | **Level 2: Intermediate** — Building Workflows | [Milestone 2A](#milestone-2a-automation-skills--hooks) | ~5 hours |
| 6-8 | **Level 3: Advanced** — Power User & Team Lead | [Milestone 3A](#milestone-3a-advanced-features) | ~5 hours |
> **Tip**: If you're unsure, start one level lower. It's better to review familiar material quickly than to miss foundational concepts.
---
@@ -25,67 +52,73 @@ This approach ensures you build a solid foundation while gaining immediate produ
```mermaid
graph TD
A[1. Slash Commands<br/>⭐ START HERE] --> B[2. Memory<br/>Essential Foundation]
B --> C[3. Skills<br/>Auto-invoked Capabilities]
C --> D[4. Subagents<br/>Task Delegation]
D --> E[5. MCP<br/>External Integration]
E --> F[6. Hooks<br/>Event Automation]
F --> G[7. Plugins<br/>Bundled Solutions]
G --> H[8. Checkpoints<br/>Safe Experimentation]
H --> I[9. Advanced Features<br/>Power User Tools]
I --> J[10. CLI Reference<br/>Command Mastery]
Q["🧭 Self-Assessment Quiz<br/>Find Your Level"] --> L1
Q --> L2
Q --> L3
K[Optional Path:<br/>Learn CLI Anytime]
K -.-> J
subgraph L1["🟢 Level 1: Beginner — Getting Started"]
direction LR
A["1A: First Commands & Memory<br/>Slash Commands + Memory"] --> B["1B: Safe Exploration<br/>Checkpoints + CLI Basics"]
end
subgraph L2["🔵 Level 2: Intermediate — Building Workflows"]
direction LR
C["2A: Automation<br/>Skills + Hooks"] --> D["2B: Integration<br/>MCP + Subagents"]
end
subgraph L3["🔴 Level 3: Advanced — Power User"]
direction LR
E["3A: Advanced Features<br/>Planning + Permissions"] --> F["3B: Team & Distribution<br/>Plugins + CLI Mastery"]
end
L1 --> L2
L2 --> L3
style Q fill:#6A1B9A,color:#fff,stroke:#9C27B0,stroke-width:2px
style A fill:#2E7D32,color:#fff
style B fill:#1565C0,color:#fff
style B fill:#2E7D32,color:#fff
style C fill:#1565C0,color:#fff
style D fill:#F57C00,color:#fff
style E fill:#F57C00,color:#fff
style F fill:#E65100,color:#fff
style G fill:#C62828,color:#fff
style H fill:#C62828,color:#fff
style I fill:#B71C1C,color:#fff
style J fill:#1565C0,color:#fff
style K fill:#6A1B9A,color:#fff,stroke:#9C27B0,stroke-width:2px
style E fill:#C62828,color:#fff
style F fill:#B71C1C,color:#fff
```
**Color Legend:**
- 🟢 Green: Beginner - Start here!
- 🔵 Light Blue: Beginner+ - Essential foundations
- 🟡 Gold: Intermediate - Common usage
- 🟠 Orange: Intermediate-Advanced - Specialized
- 🔴 Red: Advanced - Power user features
- 🔴 Dark Red: Most Advanced - Expert territory
- 💜 Purple (Dotted): Optional - Can learn anytime
- 💜 Purple: Self-Assessment Quiz
- 🟢 Green: Level 1 — Beginner path
- 🔵 Blue / 🟡 Gold: Level 2 — Intermediate path
- 🔴 Red: Level 3 — Advanced path
---
## 📊 Complete Roadmap Table
| Step | Feature | Complexity | Time | Dependencies | Why Learn This | Key Benefits |
|------|---------|-----------|------|--------------|----------------|--------------|
| **1** | [Slash Commands](01-slash-commands/) | ⭐ Beginner | 30 min | None | Quick productivity wins | Instant automation, team standards |
| **2** | [Memory](02-memory/) | ⭐⭐ Beginner+ | 45 min | None | Essential for all features | Persistent context, preferences |
| **3** | [Skills](03-skills/) | ⭐⭐ Intermediate | 1 hour | Slash Commands | Automatic expertise | Reusable capabilities, consistency |
| **4** | [Subagents](04-subagents/) | ⭐⭐⭐ Intermediate+ | 1.5 hours | Memory, Commands | Complex task handling | Delegation, specialized expertise |
| **5** | [MCP](05-mcp/) | ⭐⭐ Intermediate+ | 1 hour | Configuration | Live data access | Real-time integration, APIs |
| **6** | [Hooks](06-hooks/) | ⭐⭐ Intermediate | 1 hour | Tools, Commands | Workflow automation | Validation, quality gates |
| **7** | [Plugins](07-plugins/) | ⭐⭐⭐⭐ Advanced | 2 hours | All previous | Complete solutions | Team onboarding, distribution |
| **8** | [Checkpoints](08-checkpoints/) | ⭐⭐ Intermediate | 45 min | Session management | Safe exploration | Experimentation, recovery |
| **9** | [Advanced Features](09-advanced-features/) | ⭐⭐⭐⭐⭐ Advanced | 2-3 hours | All previous | Power user tools | Planning, headless, permissions |
| **10** | [CLI Reference](10-cli/) | ⭐⭐ Beginner+ | 1 hour | Recommended: All | Master command-line usage | Scripting, CI/CD, automation, batch processing |
| Step | Feature | Complexity | Time | Level | Dependencies | Why Learn This | Key Benefits |
|------|---------|-----------|------|-------|--------------|----------------|--------------|
| **1** | [Slash Commands](01-slash-commands/) | ⭐ Beginner | 30 min | Level 1 | None | Quick productivity wins | Instant automation, team standards |
| **2** | [Memory](02-memory/) | ⭐⭐ Beginner+ | 45 min | Level 1 | None | Essential for all features | Persistent context, preferences |
| **3** | [Checkpoints](08-checkpoints/) | ⭐⭐ Intermediate | 45 min | Level 1 | Session management | Safe exploration | Experimentation, recovery |
| **4** | [CLI Basics](10-cli/) | ⭐⭐ Beginner+ | 30 min | Level 1 | None | Core CLI usage | Interactive & print mode |
| **5** | [Skills](03-skills/) | ⭐⭐ Intermediate | 1 hour | Level 2 | Slash Commands | Automatic expertise | Reusable capabilities, consistency |
| **6** | [Hooks](06-hooks/) | ⭐⭐ Intermediate | 1 hour | Level 2 | Tools, Commands | Workflow automation | Validation, quality gates |
| **7** | [MCP](05-mcp/) | ⭐⭐⭐ Intermediate+ | 1 hour | Level 2 | Configuration | Live data access | Real-time integration, APIs |
| **8** | [Subagents](04-subagents/) | ⭐⭐ Intermediate+ | 1.5 hours | Level 2 | Memory, Commands | Complex task handling | Delegation, specialized expertise |
| **9** | [Advanced Features](09-advanced-features/) | ⭐⭐⭐⭐⭐ Advanced | 2-3 hours | Level 3 | All previous | Power user tools | Planning, headless, permissions |
| **10** | [Plugins](07-plugins/) | ⭐⭐⭐⭐ Advanced | 2 hours | Level 3 | All previous | Complete solutions | Team onboarding, distribution |
| **11** | [CLI Mastery](10-cli/) | ⭐⭐⭐ Advanced | 1 hour | Level 3 | Recommended: All | Master command-line usage | Scripting, CI/CD, automation |
**Total Learning Time**: ~11-13 hours (spread across 4-5 weeks recommended)
**Note on CLI Reference (Lesson 10)**: While numbered as lesson 10, the CLI Reference can be learned anytime! It covers command-line usage which is independent of other features. Many learners find it useful to learn early for scripting, while others prefer to master the UI features first and then learn CLI for advanced automation.
**Total Learning Time**: ~11-13 hours (or jump to your level and save time)
---
## 🎯 Learning Milestones
## 🟢 Level 1: Beginner — Getting Started
### Milestone 1: Essential Productivity (Week 1)
**For**: Users with 0-2 quiz checks
**Time**: ~3 hours
**Focus**: Immediate productivity, understanding fundamentals
**Outcome**: Comfortable daily user, ready for Level 2
### Milestone 1A: First Commands & Memory
**Topics**: Slash Commands + Memory
**Time**: 1-2 hours
@@ -124,7 +157,70 @@ Once comfortable, read:
---
### Milestone 2: Automation (Week 2)
### Milestone 1B: Safe Exploration
**Topics**: Checkpoints + CLI Basics
**Time**: 1 hour
**Complexity**: ⭐⭐ Beginner+
**Goal**: Learn to experiment safely and use core CLI commands
#### What You'll Achieve
✅ Create and restore checkpoints for safe experimentation
✅ Understand interactive vs. print mode
✅ Use basic CLI flags and options
✅ Process files via piping
#### Hands-on Exercises
```bash
# Exercise 1: Try checkpoint workflow
# In Claude Code:
# Make some experimental changes, then press Esc+Esc or use /rewind
# Select the checkpoint before your experiment
# Choose "Restore code and conversation" to go back
# Exercise 2: Interactive vs Print mode
claude "explain this project" # Interactive mode
claude -p "explain this function" # Print mode (non-interactive)
# Exercise 3: Process file content via piping
cat error.log | claude -p "explain this error"
```
#### Success Criteria
- [ ] Created and reverted to a checkpoint
- [ ] Used both interactive and print mode
- [ ] Piped a file to Claude for analysis
- [ ] Understand when to use checkpoints for safe experimentation
#### Next Steps
- Read: [08-checkpoints/README.md](08-checkpoints/README.md)
- Read: [10-cli/README.md](10-cli/README.md)
- **Ready for Level 2!** Proceed to [Milestone 2A](#milestone-2a-automation-skills--hooks)
---
## 🔵 Level 2: Intermediate — Building Workflows
**For**: Users with 3-5 quiz checks
**Time**: ~5 hours
**Focus**: Automation, integration, task delegation
**Outcome**: Automated workflows, external integrations, ready for Level 3
### Prerequisites Check
Before starting Level 2, make sure you're comfortable with these Level 1 concepts:
- [ ] Can create and use slash commands ([01-slash-commands/](01-slash-commands/))
- [ ] Have set up project memory via CLAUDE.md ([02-memory/](02-memory/))
- [ ] Know how to create and restore checkpoints ([08-checkpoints/](08-checkpoints/))
- [ ] Can use `claude` and `claude -p` from the command line ([10-cli/](10-cli/))
> **Gaps?** Review the linked tutorials above before continuing.
---
### Milestone 2A: Automation (Skills + Hooks)
**Topics**: Skills + Hooks
**Time**: 2-3 hours
@@ -180,18 +276,18 @@ chmod +x ~/.claude/hooks/pre-tool-check.sh
---
### Milestone 3: Advanced Integration (Week 3-4)
### Milestone 2B: Integration (MCP + Subagents)
**Topics**: Subagents + MCP + Plugins
**Time**: 4-5 hours
**Complexity**: ⭐⭐⭐ Intermediate-Advanced
**Topics**: MCP + Subagents
**Time**: 2-3 hours
**Complexity**: ⭐⭐⭐ Intermediate+
**Goal**: Integrate external services and delegate complex tasks
#### What You'll Achieve
✅ Delegate work to specialized AI agents
✅ Access live data from GitHub, databases, etc.
Install complete bundled solutions
✅ Understand when to use each integration type
Delegate work to specialized AI agents
✅ Understand when to use MCP vs. subagents
✅ Build integrated workflows
#### Hands-on Exercises
@@ -206,133 +302,126 @@ claude mcp add github -- npx -y @modelcontextprotocol/server-github
# Exercise 3: Install subagents
mkdir -p .claude/agents
cp 04-subagents/*.md .claude/agents/
# Exercise 4: Install a complete plugin
# In Claude Code: /plugin install pr-review
```
#### Success Criteria
- [ ] Successfully query GitHub data via MCP
- [ ] Claude delegates complex tasks to subagents
- [ ] You've installed and used a plugin
- [ ] You understand the difference between MCP, subagents, and plugins
#### Integration Exercise
Try this complete workflow:
1. Use MCP to fetch a GitHub PR
2. Let Claude delegate review to code-reviewer subagent
3. Use hooks to run tests automatically
4. See how the plugin bundles everything together
#### Success Criteria
- [ ] Successfully query GitHub data via MCP
- [ ] Claude delegates complex tasks to subagents
- [ ] You understand the difference between MCP and subagents
- [ ] Combined MCP + subagents + hooks in a workflow
#### Next Steps
- Set up additional MCP servers (database, Slack, etc.)
- Create custom subagents for your domain
- Read: [04-subagents/README.md](04-subagents/README.md)
- Read: [05-mcp/README.md](05-mcp/README.md)
- Read: [07-plugins/README.md](07-plugins/README.md)
- Read: [04-subagents/README.md](04-subagents/README.md)
- **Ready for Level 3!** Proceed to [Milestone 3A](#milestone-3a-advanced-features)
---
### Milestone 4: Power User (Week 5+)
## 🔴 Level 3: Advanced — Power User & Team Lead
**Topics**: Checkpoints + Advanced Features
**Time**: 3-4 hours
**For**: Users with 6-8 quiz checks
**Time**: ~5 hours
**Focus**: Team tooling, CI/CD, enterprise features, plugin development
**Outcome**: Power user, can set up team workflows and CI/CD
### Prerequisites Check
Before starting Level 3, make sure you're comfortable with these Level 2 concepts:
- [ ] Can create and use skills with auto-invocation ([03-skills/](03-skills/))
- [ ] Have set up hooks for event-driven automation ([06-hooks/](06-hooks/))
- [ ] Can configure MCP servers for external data ([05-mcp/](05-mcp/))
- [ ] Know how to use subagents for task delegation ([04-subagents/](04-subagents/))
> **Gaps?** Review the linked tutorials above before continuing.
---
### Milestone 3A: Advanced Features
**Topics**: Advanced Features (Planning, Permissions, Extended Thinking, Remote/Desktop/Web)
**Time**: 2-3 hours
**Complexity**: ⭐⭐⭐⭐⭐ Advanced
**Goal**: Master advanced workflows and experimentation
**Goal**: Master advanced workflows and power user tools
#### What You'll Achieve
✅ Safe experimentation with checkpoints
✅ Planning mode for complex features
✅ Print mode (`claude -p`) for CI/CD automation
✅ Fine-grained permission control (default, acceptEdits, plan, dontAsk, bypassPermissions)
✅ Extended thinking via Alt+T / Option+T toggle
✅ Background task management
✅ Auto Memory for learned preferences
Extended thinking via Alt+T / Option+T toggle
Remote control, desktop app, and web sessions
#### Hands-on Exercises
```bash
# Exercise 1: Try checkpoint workflow
# In Claude Code:
# Make some experimental changes, then press Esc+Esc or use /rewind
# Select the checkpoint before your experiment
# Choose "Restore code and conversation" to go back
# Exercise 2: Use planning mode
# Exercise 1: Use planning mode
/plan Implement user authentication system
# Exercise 3: Try print mode (non-interactive)
claude -p "Run all tests and generate report"
# Exercise 4: Try permission modes
# Exercise 2: Try permission modes
claude --permission-mode plan "analyze this codebase"
claude --permission-mode acceptEdits "refactor the auth module"
# Exercise 5: Enable extended thinking
# Exercise 3: Enable extended thinking
# Press Alt+T (Option+T on macOS) during a session to toggle
# Exercise 4: Advanced checkpoint workflow
# 1. Create checkpoint "Clean state"
# 2. Use planning mode to design a feature
# 3. Implement with subagent delegation
# 4. Run tests in background
# 5. If tests fail, rewind to checkpoint
# 6. Try alternative approach
```
#### Success Criteria
- [ ] Created and reverted to a checkpoint
- [ ] Used planning mode for a complex feature
- [ ] Ran Claude Code in print mode (`claude -p`)
- [ ] Configured permission modes (plan, acceptEdits, dontAsk)
- [ ] Used background tasks for long operations
- [ ] Toggled extended thinking with Alt+T / Option+T
#### Advanced Exercise
Complete this end-to-end workflow:
1. Create checkpoint "Clean state"
2. Use planning mode to design a feature
3. Implement with subagent delegation
4. Run tests in background
5. If tests fail, rewind to checkpoint
6. Try alternative approach
7. Use print mode (`claude -p`) in CI/CD
- [ ] Used background tasks for long operations
- [ ] Understand Remote Control, Desktop App, and Web sessions
#### Next Steps
- Set up CI/CD integration
- Create custom configuration for your team
- Read: [08-checkpoints/README.md](08-checkpoints/README.md)
- Read: [09-advanced-features/README.md](09-advanced-features/README.md)
---
### Milestone 5: CLI Mastery (Learn Anytime!)
### Milestone 3B: Team & Distribution (Plugins + CLI Mastery)
**Topics**: CLI Reference
**Time**: 1 hour
**Complexity**: ⭐⭐ Beginner+
**Goal**: Master command-line usage for scripting and automation
**When to Learn**: This can be learned anytime - either early for scripting needs, or later as part of your power user journey. CLI is independent of other features!
**Topics**: Plugins + CLI Mastery + CI/CD
**Time**: 2-3 hours
**Complexity**: ⭐⭐⭐⭐ Advanced
**Goal**: Build team tooling, create plugins, master CI/CD integration
#### What You'll Achieve
Understand all CLI commands and flags
Use print mode for non-interactive scripting
Integrate Claude Code into CI/CD pipelines
Process files and logs via piping
Configure custom agents via CLI
✅ Automate batch processing tasks
✅ Master session management and resumption
Install and create complete bundled plugins
Master CLI for scripting and automation
Set up CI/CD integration with `claude -p`
JSON output for automated pipelines
Session management and batch processing
#### Hands-on Exercises
```bash
# Exercise 1: Interactive vs Print mode
claude "explain this project" # Interactive mode
claude -p "explain this function" # Print mode (non-interactive)
# Exercise 1: Install a complete plugin
# In Claude Code: /plugin install pr-review
# Exercise 2: Process file content via piping
cat error.log | claude -p "explain this error"
cat schema.sql | claude -p "suggest optimizations"
# Exercise 2: Print mode for CI/CD
claude -p "Run all tests and generate report"
# Exercise 3: JSON output for scripts (great for CI/CD)
# Exercise 3: JSON output for scripts
claude -p --output-format json "list all functions"
# Exercise 4: Session management and resumption
claude -r "feature-auth" "continue implementation"
claude -r "code-review" "finalize suggestions"
# Exercise 5: CI/CD integration with constraints
claude -p --max-turns 3 --output-format json "review code"
@@ -343,22 +432,22 @@ for file in *.md; do
done
```
#### Success Criteria
- [ ] Used print mode for non-interactive queries
- [ ] Piped file content to Claude for analysis
- [ ] Generated JSON output for scripting
- [ ] Resumed a previous session successfully
- [ ] Understood permission and tool flags
- [ ] Created a simple shell script using Claude CLI
- [ ] Integrated Claude into a CI/CD workflow
#### CLI Integration Exercise
#### CI/CD Integration Exercise
Create a simple CI/CD script:
1. Use `claude -p` to review changed files
2. Output results as JSON
3. Process with `jq` for specific issues
4. Integrate into GitHub Actions workflow
#### Success Criteria
- [ ] Installed and used a plugin
- [ ] Built or modified a plugin for your team
- [ ] Used print mode (`claude -p`) in CI/CD
- [ ] Generated JSON output for scripting
- [ ] Resumed a previous session successfully
- [ ] Created a batch processing script
- [ ] Integrated Claude into a CI/CD workflow
#### Real-World Use Cases for CLI
- **Code Review Automation**: Run code reviews in CI/CD pipelines
- **Log Analysis**: Analyze error logs and system outputs
@@ -368,11 +457,10 @@ Create a simple CI/CD script:
- **Data Processing**: Transform and analyze data files
#### Next Steps
- Create shell aliases for common commands
- Set up batch processing scripts
- Integrate with your existing CI/CD pipeline
- Create team-wide CLI shortcuts
- Read: [07-plugins/README.md](07-plugins/README.md)
- Read: [10-cli/README.md](10-cli/README.md)
- Create team-wide CLI shortcuts and plugins
- Set up batch processing scripts
---
@@ -405,19 +493,17 @@ Create a simple CI/CD script:
**Goal**: Become proficient with most features
**Saturday Morning** (3 hours):
- Complete Milestone 1: Slash Commands + Memory
- Complete Milestone 2: Skills + Hooks
- Complete Milestone 1A: Slash Commands + Memory
- Complete Milestone 1B: Checkpoints + CLI Basics
**Saturday Afternoon** (3 hours):
- Complete Milestone 3: Subagents + MCP
- Install and explore plugins
- *Optional*: Learn CLI basics for scripting
- Complete Milestone 2A: Skills + Hooks
- Complete Milestone 2B: MCP + Subagents
**Sunday** (4 hours):
- Complete Milestone 4: Checkpoints + Advanced Features
- Complete Milestone 3A: Advanced Features
- Complete Milestone 3B: Plugins + CLI Mastery + CI/CD
- Build a custom plugin for your team
- Set up complete CI/CD workflow with CLI
- Advanced CLI integration for CI/CD pipelines
**Outcome**: You'll be a Claude Code power user ready to train others and automate complex workflows
@@ -427,8 +513,8 @@ Create a simple CI/CD script:
### ✅ Do
- **Follow the numbered order** (01 → 02 → 03...)
- **Complete hands-on exercises** for each topic
- **Take the quiz first** to find your starting point
- **Complete hands-on exercises** for each milestone
- **Start simple** and add complexity gradually
- **Test each feature** before moving to the next
- **Take notes** on what works for your workflow
@@ -438,7 +524,7 @@ Create a simple CI/CD script:
### ❌ Don't
- **Skip directly to advanced features** - you'll miss foundations
- **Skip the prerequisites check** when jumping to a higher level
- **Try to learn everything at once** - it's overwhelming
- **Copy configurations without understanding them** - you won't know how to debug
- **Forget to test** - always verify features work
@@ -459,7 +545,7 @@ Create a simple CI/CD script:
### Hands-on Learners
- Complete every hands-on exercise
- Experiment with variations
- Break things and fix them
- Break things and fix them (use checkpoints!)
- Create your own examples
### Reading Learners
@@ -478,49 +564,46 @@ Create a simple CI/CD script:
## 📈 Progress Tracking
Use this checklist to track your progress:
Use these checklists to track your progress by level:
### Week 1: Foundations
- [ ] Completed 01-slash-commands
- [ ] Completed 02-memory
### 🟢 Level 1: Beginner
- [ ] Completed [01-slash-commands](01-slash-commands/)
- [ ] Completed [02-memory](02-memory/)
- [ ] Created first custom slash command
- [ ] Set up project memory
- [ ] Milestone 1 achieved
- [ ] **Milestone 1A achieved**
- [ ] Completed [08-checkpoints](08-checkpoints/)
- [ ] Completed [10-cli](10-cli/) basics
- [ ] Created and reverted to a checkpoint
- [ ] Used interactive and print mode
- [ ] **Milestone 1B achieved**
### Week 2: Automation
- [ ] Completed 03-skills
- [ ] Completed 06-hooks
### 🔵 Level 2: Intermediate
- [ ] Completed [03-skills](03-skills/)
- [ ] Completed [06-hooks](06-hooks/)
- [ ] Installed first skill
- [ ] Set up PreToolUse hook
- [ ] Milestone 2 achieved
### Week 3-4: Integration
- [ ] Completed 04-subagents
- [ ] Completed 05-mcp
- [ ] Completed 07-plugins
- [ ] **Milestone 2A achieved**
- [ ] Completed [05-mcp](05-mcp/)
- [ ] Completed [04-subagents](04-subagents/)
- [ ] Connected GitHub MCP
- [ ] Created custom subagent
- [ ] Installed plugin
- [ ] Milestone 3 achieved
- [ ] Combined integrations in a workflow
- [ ] **Milestone 2B achieved**
### Week 5+: Mastery
- [ ] Completed 08-checkpoints
- [ ] Completed 09-advanced-features
### 🔴 Level 3: Advanced
- [ ] Completed [09-advanced-features](09-advanced-features/)
- [ ] Used planning mode successfully
- [ ] Set up print mode (`claude -p`) CI/CD
- [ ] Configured permission modes
- [ ] Used extended thinking toggle
- [ ] Created team plugin
- [ ] Milestone 4 achieved
### Optional: CLI Mastery (Learn Anytime)
- [ ] Completed 10-cli reference
- [ ] Used CLI print mode for scripting
- [ ] Piped files to Claude for analysis
- [ ] **Milestone 3A achieved**
- [ ] Completed [07-plugins](07-plugins/)
- [ ] Completed [10-cli](10-cli/) advanced usage
- [ ] Set up print mode (`claude -p`) CI/CD
- [ ] Created JSON output for automation
- [ ] Integrated Claude into CI/CD pipeline
- [ ] Used session resumption for workflows
- [ ] Milestone 5 achieved
- [ ] Created team plugin
- [ ] **Milestone 3B achieved**
---
@@ -541,6 +624,9 @@ Use this checklist to track your progress:
### Challenge 5: "Hard to remember everything"
**Solution**: Create your own cheat sheet. Use checkpoints to experiment safely.
### Challenge 6: "I'm experienced but not sure where to start"
**Solution**: Take the [Self-Assessment Quiz](#-find-your-level) above. Skip to your level and use the prerequisites check to identify any gaps.
---
## 🎯 What's Next After Completion?
+14 -13
View File
@@ -98,20 +98,21 @@ This project complements [Anthropic's official documentation](https://docs.anthr
## 📚 Learning Path
**New to Claude Code?** The folders are numbered in **recommended learning order**:
**Not sure where to start?** Take the [Self-Assessment Quiz](LEARNING-ROADMAP.md#-find-your-level) to find your recommended path.
| Order | Feature | Level | Time | Start Here |
|-------|---------|-------|------|------------|
| **1** | [Slash Commands](01-slash-commands/) | ⭐ Beginner | 30 min | **START** |
| **2** | [Memory](02-memory/) | ⭐⭐ Beginner+ | 45 min | Essential |
| **3** | [Skills](03-skills/) | ⭐⭐ Intermediate | 1 hour | Auto-invoke |
| **4** | [Subagents](04-subagents/) | ⭐⭐⭐ Intermediate+ | 1.5 hours | Delegation |
| **5** | [MCP](05-mcp/) | ⭐⭐ Intermediate+ | 1 hour | Live data |
| **6** | [Hooks](06-hooks/) | ⭐⭐ Intermediate | 1 hour | Automation |
| **7** | [Plugins](07-plugins/) | ⭐⭐⭐⭐ Advanced | 2 hours | Bundles |
| **8** | [Checkpoints](08-checkpoints/) | ⭐⭐ Intermediate | 45 min | Safe tests |
| **9** | [Advanced](09-advanced-features/) | ⭐⭐⭐⭐⭐ Advanced | 2-3 hours | Power user |
| **10** | [CLI Reference](10-cli/) | ⭐⭐ Beginner+ | 1 hour | CLI mastery |
| Order | Feature | Level | Time | Recommended For |
|-------|---------|-------|------|-----------------|
| **1** | [Slash Commands](01-slash-commands/) | ⭐ Beginner | 30 min | Level 1 start |
| **2** | [Memory](02-memory/) | ⭐⭐ Beginner+ | 45 min | Level 1 |
| **3** | [Checkpoints](08-checkpoints/) | ⭐⭐ Intermediate | 45 min | Level 1 |
| **4** | [CLI Basics](10-cli/) | ⭐⭐ Beginner+ | 30 min | Level 1 |
| **5** | [Skills](03-skills/) | ⭐⭐ Intermediate | 1 hour | Level 2 start |
| **6** | [Hooks](06-hooks/) | ⭐⭐ Intermediate | 1 hour | Level 2 |
| **7** | [MCP](05-mcp/) | ⭐⭐⭐ Intermediate+ | 1 hour | Level 2 |
| **8** | [Subagents](04-subagents/) | ⭐⭐ Intermediate+ | 1.5 hours | Level 2 |
| **9** | [Advanced](09-advanced-features/) | ⭐⭐⭐⭐⭐ Advanced | 2-3 hours | Level 3 start |
| **10** | [Plugins](07-plugins/) | ⭐⭐⭐⭐ Advanced | 2 hours | Level 3 |
| **11** | [CLI Mastery](10-cli/) | ⭐⭐⭐ Advanced | 1 hour | Level 3 |
**Total**: ~11-13 hours | 📖 **[Complete Learning Roadmap →](LEARNING-ROADMAP.md)**