Deliver interactive practice quizzes from study material.
Convert AI-generated JSON quiz into NotebookLM-style interactive quiz interface. Multiple choice questions with immediate feedback, hints, completion statistics, and review mode.
Input: JSON file with quiz questions (generated by AI) Output: NotebookLM-style interactive HTML
This is a pure frontend converter - AI (Claude/Gemini) generates the quiz as JSON, this skill renders it with NotebookLM's exact UI/UX.
1. User: "Claude, generate a 15-question quiz about biology"
2. Claude: Generates JSON with questions, options, correct answers, explanations
3. Save JSON to file (e.g., biology_quiz.json)
4. Run from `skills/quiz`: `python main.py -i biology_quiz.json -o biology_quiz.html`
5. Open HTML → NotebookLM-style quiz interface
[
{
"question": "What is the powerhouse of the cell?",
"options": [
"Nucleus",
"Mitochondria",
"Ribosome",
"Golgi apparatus"
],
"correctIndex": 1,
"hint": "It's responsible for energy production",
"correctExplanation": "Mitochondria are the powerhouses of the cell, generating ATP through cellular respiration.",
"wrongExplanation": "The answer is mitochondria - they produce energy in the form of ATP."
}
]
{
"title": "Biology Quiz",
"questions": [
{
"question": "What is photosynthesis?",
"options": [
"Breaking down glucose",
"Converting light to chemical energy",
"Cell division",
"Protein synthesis"
],
"correctIndex": 1,
"hint": "It involves sunlight and chlorophyll",
"correctExplanation": "Photosynthesis converts light energy into chemical energy stored in glucose.",
"wrongExplanation": "Photosynthesis is the process plants use to convert sunlight into energy."
}
]
}
cd skills/quiz
python main.py --input quiz.json --output quiz.html
Parameters:
--input, -i: Input JSON file (required)--output, -o: Output HTML file (default: quiz.html)Use LaTeX delimiters in questions, options, hints, or explanations to render formulas:
$\frac{a}{b}$ inline, or $$\int_0^1 x^2\,dx$$ block
Notes:
$...$ and block math uses $$...$$.\$ to avoid math parsing.fonts/ folder is created next to the HTML for offline rendering.| Action | Behavior |
|---|---|
| Click option (A/B/C/D) | Select answer and show immediate feedback |
| Click "Hint" button | Toggle hint visibility |
| Click "Previous" | Go to previous question |
| Click "Next" | Go to next question (only after answering) |
| Click "Finish Quiz" | Show completion statistics |
Shows comprehensive statistics:
| Feature | This Skill | NotebookLM |
|---|---|---|
| Multiple choice (A/B/C/D) | ✅ | ✅ |
| Immediate feedback | ✅ | ✅ |
| Hints | ✅ | ✅ |
| Progress tracking | ✅ | ✅ |
| Completion statistics | ✅ | ✅ |
| Review mode | ✅ | ✅ |
| Retake quiz | ✅ | ✅ |
| Purple gradient | ✅ | ✅ |
| Vertical layout | ✅ | ✅ |
pip install -r requirements.txt
Only requires: loguru (logging)
"Generate a 20-question quiz about [topic] in JSON format.
Use this structure:
[
{
"question": "...",
"options": ["A", "B", "C", "D"],
"correctIndex": 1,
"hint": "optional hint",
"correctExplanation": "why this is right",
"wrongExplanation": "what to know if wrong"
}
]
"
Same prompt works across any AI model that can generate structured JSON.
question (string): The question textoptions (array): Array of 4 answer choicescorrectIndex (number): Index of correct answer (0-3)hint (string): Hint text to help with the questioncorrectExplanation (string): Explanation shown when user answers correctlywrongExplanation (string): Explanation shown when user answers incorrectlyexplanation (string): Fallback explanation if correctExplanation/wrongExplanation not providedUser: "Create a 15-question quiz about quantum physics"
Claude: Generates JSON and saves to quantum_quiz.json
cd skills/quiz
python main.py -i quantum_quiz.json -o quantum_quiz.html
quantum_quiz.html in browserWant to change the colors? Edit main.py line 55: