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".
Interactive quiz that tests understanding of a specific Claude Code lesson with 8-10 questions, provides per-question feedback, and identifies areas to review.
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-commands02, memory → 02-memory03, skills → 03-skills04, subagents, agents → 04-subagents05, mcp → 05-mcp06, hooks → 06-hooks07, plugins → 07-plugins08, checkpoints, checkpoint → 08-checkpoints09, advanced, advanced-features → 09-advanced-features10, cli → 10-cliIf no argument was provided, present a selection prompt using AskUserQuestion:
Question 1 (header: "Lesson"): "Which lesson do you want to quiz on?" Options:
Question 2 (header: "Lesson"): "Which lesson do you want to quiz on? (continued)" Options:
If "More lessons..." is selected, present:
Question 3 (header: "Lesson"): "Select your lesson:" Options:
Read the lesson README.md file to refresh context:
<lesson-directory>/README.mdThen 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.
Ask the user about quiz timing context:
Use AskUserQuestion (header: "Timing"): "When are you taking this quiz relative to the lesson?" Options:
This context affects how the results are framed (see Step 5).
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 textoptions: 3-4 answer choices (one correct, labeled in the bank)correct: The correct answer labelexplanation: Why the answer is correctcategory: "conceptual" or "practical"Present each question using AskUserQuestion. Record the user's answer for each.
After all rounds, calculate the score and present results.
Scoring:
Grade scale:
Output format:
## 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?"
After presenting results, use AskUserQuestion:
"What would you like to do next?" Options:
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.
If the argument doesn't match any lesson, show the valid lesson list and ask the user to pick one.
If the user indicates they want to stop during any round, present partial results for questions answered so far.
If the README.md file doesn't exist at the expected path, inform the user and suggest checking the repository structure.
Should trigger:
Should NOT trigger: