From 33c37651a62616c15342bc515963e853e620cffa Mon Sep 17 00:00:00 2001 From: Florian BRUNIAUX Date: Mon, 12 Jan 2026 15:49:38 +0100 Subject: [PATCH] feat(quiz): add interactive CLI knowledge quiz v3.0.0 BREAKING: Major version release with new quiz feature New Features: - Interactive CLI quiz with 159 curated questions - 4 user profiles: Junior, Senior, Power User, Product Manager - 10 topic categories covering all guide sections - Immediate feedback with explanations and doc references - Session persistence to ~/.claude-quiz/ - Score tracking with category breakdown - Optional dynamic question generation via claude -p - Cross-platform support (Node.js): macOS, Linux, Windows Quiz highlights: - Profile-based question filtering and difficulty weighting - Retry wrong questions only or new quiz options - Visual progress bar and score visualization - Direct documentation links for wrong answers Co-Authored-By: Claude Opus 4.5 --- CHANGELOG.md | 42 ++ README.md | 90 +++- quiz/README.md | 346 ++++++++++++++ quiz/package-lock.json | 650 ++++++++++++++++++++++++++ quiz/package.json | 3 +- quiz/templates/question-template.yaml | 56 +++ 6 files changed, 1185 insertions(+), 2 deletions(-) create mode 100644 quiz/README.md create mode 100644 quiz/package-lock.json create mode 100644 quiz/templates/question-template.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 2030a36..ce2119a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,48 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +## [3.0.0] - 2026-01-12 + +### Added +- **quiz/** - Interactive CLI quiz to test Claude Code knowledge (MAJOR FEATURE) + - 159 curated questions across 10 categories (matching guide sections) + - 4 user profiles: Junior (15q), Senior (20q), Power User (25q), PM (10q) + - Immediate feedback with explanations and documentation links + - Score tracking with category breakdown and weak area identification + - Session persistence to `~/.claude-quiz/` for progress history + - Replay options: retry wrong questions or start fresh quiz + - Optional dynamic question generation via `claude -p` + - Cross-platform: Node.js (works on macOS, Linux, Windows) + +- **README.md** - New "Knowledge Quiz" section in navigation + - Added quiz to "Not Sure Where to Start?" table + - Collapsible example session showing quiz flow + - Links to quiz documentation and contribution template + +### Files Created +``` +quiz/ +├── package.json # Node.js config +├── README.md # Full documentation with examples +├── src/ +│ ├── index.js # Entry point + CLI args +│ ├── ui.js # Terminal display +│ ├── prompts.js # User prompts (inquirer) +│ ├── questions.js # YAML loading + filtering +│ ├── quiz.js # Quiz engine +│ ├── score.js # Score tracking +│ ├── session.js # Persistence +│ └── dynamic.js # claude -p generation +├── questions/ # 10 YAML files (159 questions) +└── templates/ + └── question-template.yaml +``` + +### Stats +- 20+ new files +- 159 questions covering all guide sections +- New learning tool for the community + ## [2.9.9] - 2026-01-12 ### Enhanced diff --git a/README.md b/README.md index 94190e7..599e917 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ claude | Want to check your current setup | [Audit Your Setup](#-audit-your-setup) | 2 sec | | Want AI assistants to know Claude Code | [LLM Reference](#-llm-reference) | 1 curl | | Want personalized recommendations | [Deep Audit](#-deep-audit-personalized-recommendations) | 30 sec | +| Want to test your knowledge | [Knowledge Quiz](#-knowledge-quiz) | 10 min | ### ⚡ Audit Your Setup @@ -148,6 +149,93 @@ Based on ALL this context, provide: **Want maximum depth?** Use [claude-setup-audit-prompt.md](./claude-setup-audit-prompt.md) with `claude --ultrathink` +### 🧠 Knowledge Quiz + +Test your Claude Code knowledge with an interactive CLI quiz. **159 curated questions** covering all 10 guide sections, with immediate feedback and documentation links. + +```bash +# Quick start +cd quiz && npm install && npm start + +# With options +node quiz/src/index.js --profile senior --topics 2,4,7 --count 10 +``` + +
+Example Session (click to expand) + +``` +============================================================ + CLAUDE CODE KNOWLEDGE QUIZ +============================================================ + +? Select your profile: Senior Developer (40 min to mastery) +? Select topics to quiz: All topics (recommended) + +------------------------------------------------------------ +Question 1/20 [Core Concepts] + +At what context percentage should you use /compact? + + A) 0-50% + B) 50-70% + C) 70-90% + D) Only at 100% + +? Your answer: C + +✓ CORRECT! + +------------------------------------------------------------ +Question 2/20 [Hooks] + +What exit code should a PreToolUse hook return to BLOCK an operation? + + A) 0 + B) 1 + C) 2 + D) -1 + +? Your answer: A + +✗ INCORRECT. The correct answer is C) 2 + +Explanation: +Exit code 2 blocks the operation. Exit code 0 allows it to proceed. +Other exit codes are treated as errors and logged but don't block. + +See: english-ultimate-claude-code-guide.md#72-creating-hooks + +------------------------------------------------------------ + QUIZ COMPLETE +------------------------------------------------------------ + +Overall Score: 16/20 (80%) + +By Category: + Core Concepts 6/7 (86%) [████████░░] + Agents 5/7 (71%) [███████░░░] + Hooks 5/6 (83%) [████████░░] + +Weak Areas (< 75%): + - Agents: Review section 4 in the guide + +? What would you like to do? Retry wrong questions only +``` + +
+ +**Features**: +- **4 profiles**: Junior (15q), Senior (20q), Power User (25q), PM (10q) +- **10 topic categories** matching guide sections +- **Immediate feedback** with explanations and doc links +- **Score tracking** with category breakdown and weak area identification +- **Session history** saved to `~/.claude-quiz/` +- **Replay options**: Retry wrong questions or start fresh +- **Cross-platform**: Works on macOS, Linux, and Windows + +**See**: [Quiz Documentation](./quiz/README.md) | [Contribute Questions](./quiz/templates/question-template.yaml) + ### 🎯 By Role (Tailored Learning Paths) @@ -387,7 +475,7 @@ If this guide saved you time, helped you master Claude Code, or inspired your wo --- -*Version 2.9.9 | January 2026 | Crafted with Claude* +*Version 3.0.0 | January 2026 | Crafted with Claude*