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 <noreply@anthropic.com>
This commit is contained in:
Florian BRUNIAUX 2026-01-12 15:49:38 +01:00
parent 41bf57d9ee
commit 33c37651a6
6 changed files with 1185 additions and 2 deletions

View file

@ -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

View file

@ -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
```
<details>
<summary><strong>Example Session</strong> (click to expand)</summary>
```
============================================================
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
```
</details>
**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)
<table>
@ -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*
<!-- SEO Keywords -->
<!-- claude code, claude code tutorial, anthropic cli, ai coding assistant, claude code mcp,

346
quiz/README.md Normal file
View file

@ -0,0 +1,346 @@
# Claude Code Knowledge Quiz
Test your understanding of Claude Code with interactive multiple-choice questions.
[![Node.js](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org/)
[![Platform](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux%20%7C%20Windows-blue.svg)]()
## Quick Start
```bash
# Navigate to quiz directory
cd quiz
# Install dependencies
npm install
# Run the quiz
npm start
# Or run directly
node src/index.js
```
## Features
- **4 User Profiles**: Junior, Senior, Power User, Product Manager
- **10 Topic Categories**: From Quick Start to Advanced Patterns
- **159 Curated Questions**: Practical knowledge, not trivia
- **Immediate Feedback**: Learn from mistakes with explanations
- **Documentation Links**: Direct references to guide sections
- **Score Tracking**: See strengths and weak areas
- **Session Persistence**: History saved to `~/.claude-quiz/`
- **Cross-Platform**: Works on macOS, Linux, and Windows
## Usage
### Interactive Mode (Recommended)
```bash
npm start
```
You'll be prompted to:
1. Select your profile (Junior/Senior/Power User/PM)
2. Choose topics (all or specific sections)
3. Answer questions with A/B/C/D
### Command Line Options
```bash
node src/index.js [options]
Options:
-p, --profile <type> Pre-select profile (junior|senior|power|pm)
-t, --topics <list> Quiz specific sections (1-10, comma-separated)
-c, --count <n> Limit number of questions (1-50)
-d, --dynamic Enable dynamic question generation via claude -p
-h, --help Show help message
-v, --version Show version
```
### Examples
```bash
# Interactive mode
npm start
# Senior profile, default topics
node src/index.js -p senior
# Power user, specific topics (Agents, Hooks, MCP)
node src/index.js -p power -t 4,7,8
# Quick 10-question quiz
node src/index.js -c 10
# Junior profile with dynamic generation
node src/index.js -p junior -d
```
## Example Session
Here's what a typical quiz session looks like:
```
============================================================
CLAUDE CODE KNOWLEDGE QUIZ
Master Claude Code: The Complete Guide
============================================================
? Select your profile: Senior Developer (40 min to mastery)
? Select topics to quiz: Custom selection...
? Select topics (space to toggle, enter to confirm):
◉ [2] Core Concepts
◉ [4] Agents
◉ [7] Hooks
------------------------------------------------------------
Starting quiz: 20 questions for senior profile
------------------------------------------------------------
------------------------------------------------------------
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!
Progress: █░░░░░░░░░░░░░░░░░░░ 1/20 | Score: 1/1 (100%)
------------------------------------------------------------
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: https://github.com/FlorianBruniaux/claude-code-ultimate-guide/blob/main/english-ultimate-claude-code-guide.md#72-creating-hooks
(Line 4164)
Progress: ██░░░░░░░░░░░░░░░░░░ 2/20 | Score: 1/2 (50%)
? Continue to next question? Yes
... (more questions) ...
============================================================
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
Recommended Reading:
4. english-ultimate-claude-code-guide.md#4-agents
Time: 9 minutes 2 seconds
------------------------------------------------------------
? What would you like to do? (Use arrow keys)
Retry wrong questions only
New quiz (different questions)
Exit
```
## Profiles
| Profile | Questions | Focus Areas |
|---------|-----------|-------------|
| **Junior Developer** | 15 | Sections 1-3, 6 (essentials) |
| **Senior Developer** | 20 | Sections 2-4, 7, 9 (architecture, automation) |
| **Power User** | 25 | All sections |
| **Product Manager** | 10 | Sections 1-3 (conceptual overview) |
## Topics
| # | Topic | Key Concepts |
|---|-------|--------------|
| 1 | Quick Start & Installation | Installation, first workflow, essential commands |
| 2 | Core Concepts | Context management, Plan Mode, interaction loop |
| 3 | Memory & Settings | CLAUDE.md, .claude/ folder, permissions |
| 4 | Agents | Custom agents, specialization, orchestration |
| 5 | Skills | Reusable knowledge, skill composition |
| 6 | Commands | Slash commands, custom commands |
| 7 | Hooks | Event system, security hooks, exit codes |
| 8 | MCP Servers | Context7, Serena, Sequential, plugins |
| 9 | Advanced Patterns | The Trinity, CI/CD, composition |
| 10 | Reference | Shortcuts, troubleshooting, daily workflow |
## Quiz Flow
```
┌─────────────────────────────────────────────┐
│ CLAUDE CODE KNOWLEDGE QUIZ │
└─────────────────────────────────────────────┘
┌─────────────────────────────────────────────┐
│ Select Profile (Junior/Senior/Power/PM) │
└─────────────────────────────────────────────┘
┌─────────────────────────────────────────────┐
│ Select Topics (All or Specific 1-10) │
└─────────────────────────────────────────────┘
┌─────────────────────────────────────────────┐
│ Question 1/20 [Category] │
│ │
│ What is the recommended action when...? │
│ │
│ A) Option A │
│ B) Option B │
│ C) Option C │
│ D) Option D │
└─────────────────────────────────────────────┘
┌────────┴────────┐
▼ ▼
┌──────────┐ ┌──────────────────┐
│ CORRECT! │ │ INCORRECT │
│ │ │ Correct: C │
│ │ │ Explanation... │
│ │ │ See: guide#... │
└──────────┘ └──────────────────┘
│ │
└────────┬────────┘
(Next Question)
┌─────────────────────────────────────────────┐
│ QUIZ COMPLETE │
│ │
│ Overall Score: 16/20 (80%) │
│ │
│ By Category: │
│ Core Concepts: 6/7 (86%) [████████░░] │
│ Agents: 5/7 (71%) [███████░░░] │
│ Hooks: 5/6 (83%) [████████░░] │
│ │
│ Weak Areas: Agents (review section 4) │
└─────────────────────────────────────────────┘
┌─────────────────────────────────────────────┐
│ [R] Retry wrong questions only │
│ [N] New quiz (different questions) │
│ [E] Exit │
└─────────────────────────────────────────────┘
```
## Session Persistence
Quiz sessions are automatically saved to `~/.claude-quiz/`:
```
~/.claude-quiz/
sessions/
2026-01-12_143052.json # Individual session data
2026-01-12_150623.json
stats.json # Aggregate statistics
```
### Session Data Includes:
- Profile and topics selected
- Questions answered (correct/incorrect/skipped)
- Time taken
- Category breakdown
- Wrong questions with correct answers
## Dynamic Question Generation
When the `--dynamic` flag is enabled and the Claude CLI is installed, the quiz can generate additional questions on-the-fly using `claude -p`:
```bash
node src/index.js -d
```
This requires:
- Claude CLI installed (`npm install -g @anthropic-ai/claude-code`)
- Active API key configured
Dynamic questions supplement the static pool when:
- Static pool is exhausted for selected topics
- User requests fresh questions
- Variety is needed for repeated quizzes
## Contributing Questions
We welcome question contributions! See [`templates/question-template.yaml`](./templates/question-template.yaml) for the format.
### Quality Guidelines
**Good questions test:**
- Practical application ("When should you...")
- Decision-making ("Which approach is best for...")
- Understanding ("Why does Claude...")
- Troubleshooting ("What would you do if...")
**Avoid:**
- Trivia ("What is the exact command syntax...")
- Pure memorization ("List all keyboard shortcuts...")
- Version-specific details that may change
### Submitting Questions
1. Fork the repository
2. Add questions to the appropriate `questions/XX-category.yaml` file
3. Follow the template format exactly
4. Ensure `doc_reference` points to valid sections
5. Submit a PR with description of added questions
## Troubleshooting
### "No questions available"
- Check that selected topics have questions in `questions/` directory
- Verify YAML files are valid (use a YAML validator)
- Try selecting different topics or "All topics"
### "Cannot find module 'yaml'"
```bash
cd quiz
npm install
```
### Quiz hangs on input
- Ensure you're running in an interactive terminal
- Try pressing Enter if stuck
- Use Ctrl+C to exit and restart
## License
Same as parent repository: [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)
---
**Part of**: [claude-code-ultimate-guide](https://github.com/FlorianBruniaux/claude-code-ultimate-guide)

650
quiz/package-lock.json generated Normal file
View file

@ -0,0 +1,650 @@
{
"name": "claude-code-quiz",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "claude-code-quiz",
"version": "1.0.0",
"license": "CC-BY-SA-4.0",
"dependencies": {
"chalk": "^5.3.0",
"inquirer": "^9.2.12",
"yaml": "^2.8.2"
},
"bin": {
"claude-quiz": "src/index.js"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@inquirer/external-editor": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz",
"integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==",
"license": "MIT",
"dependencies": {
"chardet": "^2.1.1",
"iconv-lite": "^0.7.0"
},
"engines": {
"node": ">=18"
},
"peerDependencies": {
"@types/node": ">=18"
},
"peerDependenciesMeta": {
"@types/node": {
"optional": true
}
}
},
"node_modules/@inquirer/figures": {
"version": "1.0.15",
"resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.15.tgz",
"integrity": "sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==",
"license": "MIT",
"engines": {
"node": ">=18"
}
},
"node_modules/ansi-escapes": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
"integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
"license": "MIT",
"dependencies": {
"type-fest": "^0.21.3"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"license": "MIT",
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT"
},
"node_modules/bl": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
"license": "MIT",
"dependencies": {
"buffer": "^5.5.0",
"inherits": "^2.0.4",
"readable-stream": "^3.4.0"
}
},
"node_modules/buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT",
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"node_modules/chalk": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",
"integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==",
"license": "MIT",
"engines": {
"node": "^12.17.0 || ^14.13 || >=16.0.0"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/chardet": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz",
"integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==",
"license": "MIT"
},
"node_modules/cli-cursor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
"integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
"license": "MIT",
"dependencies": {
"restore-cursor": "^3.1.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/cli-spinners": {
"version": "2.9.2",
"resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz",
"integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==",
"license": "MIT",
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/cli-width": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz",
"integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==",
"license": "ISC",
"engines": {
"node": ">= 12"
}
},
"node_modules/clone": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
"integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
"license": "MIT",
"engines": {
"node": ">=0.8"
}
},
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"license": "MIT"
},
"node_modules/defaults": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
"integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
"license": "MIT",
"dependencies": {
"clone": "^1.0.2"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"license": "MIT"
},
"node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/iconv-lite": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
"integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
"license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
"engines": {
"node": ">=0.10.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "BSD-3-Clause"
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"license": "ISC"
},
"node_modules/inquirer": {
"version": "9.3.8",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.3.8.tgz",
"integrity": "sha512-pFGGdaHrmRKMh4WoDDSowddgjT1Vkl90atobmTeSmcPGdYiwikch/m/Ef5wRaiamHejtw0cUUMMerzDUXCci2w==",
"license": "MIT",
"dependencies": {
"@inquirer/external-editor": "^1.0.2",
"@inquirer/figures": "^1.0.3",
"ansi-escapes": "^4.3.2",
"cli-width": "^4.1.0",
"mute-stream": "1.0.0",
"ora": "^5.4.1",
"run-async": "^3.0.0",
"rxjs": "^7.8.1",
"string-width": "^4.2.3",
"strip-ansi": "^6.0.1",
"wrap-ansi": "^6.2.0",
"yoctocolors-cjs": "^2.1.2"
},
"engines": {
"node": ">=18"
}
},
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/is-interactive": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",
"integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/is-unicode-supported": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",
"integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",
"license": "MIT",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/log-symbols": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
"integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
"license": "MIT",
"dependencies": {
"chalk": "^4.1.0",
"is-unicode-supported": "^0.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/log-symbols/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/mimic-fn": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/mute-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz",
"integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==",
"license": "ISC",
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/onetime": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
"integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
"license": "MIT",
"dependencies": {
"mimic-fn": "^2.1.0"
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ora": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz",
"integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",
"license": "MIT",
"dependencies": {
"bl": "^4.1.0",
"chalk": "^4.1.0",
"cli-cursor": "^3.1.0",
"cli-spinners": "^2.5.0",
"is-interactive": "^1.0.0",
"is-unicode-supported": "^0.1.0",
"log-symbols": "^4.1.0",
"strip-ansi": "^6.0.0",
"wcwidth": "^1.0.1"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ora/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/readable-stream": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"license": "MIT",
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/restore-cursor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
"integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
"license": "MIT",
"dependencies": {
"onetime": "^5.1.0",
"signal-exit": "^3.0.2"
},
"engines": {
"node": ">=8"
}
},
"node_modules/run-async": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz",
"integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==",
"license": "MIT",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT"
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"license": "MIT"
},
"node_modules/signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"license": "ISC"
},
"node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"license": "MIT",
"dependencies": {
"safe-buffer": "~5.2.0"
}
},
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/tslib": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"license": "0BSD"
},
"node_modules/type-fest": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
"license": "(MIT OR CC0-1.0)",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"license": "MIT"
},
"node_modules/wcwidth": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
"integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
"license": "MIT",
"dependencies": {
"defaults": "^1.0.3"
}
},
"node_modules/wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"license": "MIT",
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/yaml": {
"version": "2.8.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz",
"integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==",
"license": "ISC",
"bin": {
"yaml": "bin.mjs"
},
"engines": {
"node": ">= 14.6"
},
"funding": {
"url": "https://github.com/sponsors/eemeli"
}
},
"node_modules/yoctocolors-cjs": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz",
"integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==",
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
}
}
}

View file

@ -2,6 +2,7 @@
"name": "claude-code-quiz",
"version": "1.0.0",
"description": "CLI quiz to test your Claude Code knowledge",
"type": "module",
"main": "src/index.js",
"bin": {
"claude-quiz": "./src/index.js"
@ -22,7 +23,7 @@
"dependencies": {
"chalk": "^5.3.0",
"inquirer": "^9.2.12",
"yaml": "^2.3.4"
"yaml": "^2.8.2"
},
"engines": {
"node": ">=18.0.0"

View file

@ -0,0 +1,56 @@
# Question Template for Claude Code Knowledge Quiz
#
# Use this template to contribute new questions to the quiz.
# Submit as a PR to: https://github.com/FlorianBruniaux/claude-code-ultimate-guide
#
# Guidelines:
# - Test practical understanding, not memorization
# - Make distractors plausible but clearly distinguishable
# - Explanations should teach, not just state the correct answer
# - Reference accurate sections from the guide
#
# Difficulty levels:
# - junior: Basic commands, installation, simple concepts
# - senior: Context management, configuration patterns, agent design
# - power: Advanced orchestration, Trinity pattern, optimization
#
# Profile visibility:
# - junior: Questions for new users (Day 1)
# - senior: Questions for experienced developers (Week 1-2)
# - power: Questions for advanced users (Month 1+)
# - pm: Conceptual questions for non-technical stakeholders
category: "Category Name" # One of: Quick Start, Core Concepts, Memory & Settings, Agents, Skills, Commands, Hooks, MCP Servers, Advanced Patterns, Reference
category_id: 1 # 1-10 matching category
questions:
- id: "xx-001" # Category prefix + unique number (qs=Quick Start, cc=Core Concepts, ms=Memory Settings, ag=Agents, sk=Skills, cm=Commands, hk=Hooks, mcp=MCP, ap=Advanced, rf=Reference)
difficulty: "junior" # junior | senior | power
profiles: ["junior", "senior", "power", "pm"] # Who sees this question
question: "What is the recommended action when context usage reaches 70%?"
options:
a: "Continue working normally"
b: "Use /compact to compress context"
c: "Use /clear to reset completely"
d: "Exit and restart Claude Code"
correct: "b" # a | b | c | d
explanation: |
At 70% context usage (orange zone), you should use /compact to summarize
the conversation and free up space while preserving key context.
/clear is a more drastic option that completely resets context, which
is typically only needed at 90%+ usage (red/critical zone).
The context zones are:
- 0-50%: Green (work freely)
- 50-70%: Yellow (be selective)
- 70-90%: Orange (/compact now)
- 90%+: Red (/clear required)
doc_reference:
file: "english-ultimate-claude-code-guide.md"
section: "2.2 Context Management"
anchor: "#22-context-management"
# Add more questions following this format...
# - id: "xx-002"
# ...