quiz-generator
Skill4 starsChanged 3 months agoMITView on GitHub
Generate quiz JSON files from any content and launch the interactive quiz app. Creates multiple-choice and open-ended questions, then opens the quiz in the browser.
15 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- sreevatsarajesh/AgentForgetheir own version, first seen Nov 22, 2026
- nisarth/claude-skills-storetheir own version, first seen Nov 8, 2026
- dmccreary/ibook-skillstheir own version, first seen Nov 3, 2026
- xiongxianfei/skillsmiththeir own version, first seen Nov 1, 2026
- EtherealMingo/university-teacher-skillstheir own version, first seen Oct 20, 2026
- dmccreary/claude-skillstheir own version, first seen Oct 9, 2026
Used with
Projects with it also use chapter-content-generator, course-description-analyzer and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
vishalsachdevSkillchapter-content-generator
This skill generates comprehensive chapter content for intelligent textbooks after the book-chapter-generator skill has created the chapter structure. Use this skill when a chapter index.md file exists with title, summary, and concept list, and detailed educational content needs to be generated at the appropriate reading level with rich non-text elements including diagrams, infographics, and MicroSims. (project, gitignored)
Also in 4 projects that use this
vishalsachdevSkillcourse-description-analyzer
This skill analyzes or creates course descriptions for intelligent textbooks by checking for completeness of required elements (title, audience, prerequisites, topics, Bloom's Taxonomy outcomes) and providing quality scores with improvement suggestions. Use this skill when working with course descriptions in /docs/course-description.md that need validation or creation for learning graph generation.
Also in 4 projects that use this
dmccrearySkillbook-installer
Installs and configures intelligent-textbook infrastructure - scaffold a brand-new MkDocs Material textbook (init textbook), install any of 41 features (math, mascot, learning graph viewer, Google Analytics GA4, custom 404, kanban board), and generate book metrics. Routes to the appropriate installation guide.
Also in 3 projects that use this
nek1987Skillfaq-generator
Generate faq generator operations. Auto-activating skill for Technical Documentation. Triggers on: faq generator, faq generator Part of the Technical Documentation skill category. Use when working with faq generator functionality. Trigger with phrases like "faq generator", "faq generator", "faq".
Also in 4 projects that use this
- +8 more from vishalsachdev
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- EnkrateiaLucca/skills★ 376% same
Wrote their own version · 14
- dmccreary/claude-skills★ 115same name
- dmccreary/ibook-skills★ 114same name
- EtherealMingo/university-teacher-skills★ 16same name
- mjunaidca/robolearn★ 9same name
- yaxingson/skills★ 4same name
- vishalsachdev/claude-skills★ 2same name
- xiongxianfei/skillsmith★ 2same name
- BryceYuuu/open-workflow-skills★ 1same name
- nisarth/claude-skills-store★ 1same name
- Simooo45/quiz-generator★ 1same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- anki-card-creatorSkill
- grounded-reading-interfacesSkill
- marp-slidesSkill
- research-reportSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. 0 are common, 21 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
21
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill when the user requests:
- Distinctive: line 39
Place the correct answer randomly (not always first or last).
- Distinctive: line 56
Keep expected answers concise (1-3 words typically)
- Very specific: line 99
Only give a real, verifiable url.
- Very specific: line 112
When several questions come from the same article, give them the same base URL and only vary the #:~:text= fragment — the split-view pane …
- Very specific: line 113
Prefer a text fragment; fall back to a plain #section-anchor if the page has a stable heading id, or a bare URL (no fragment) when neither …
- Distinctive: line 121
Use your knowledge to generate relevant questions
- Distinctive: line 126
Use WebFetch to retrieve the content
- Distinctive: line 133
Create questions covering main points
- Distinctive: line 138
Create a balanced mix:
- Distinctive: line 139
60-70% multiple-choice: Test recognition and understanding
- Distinctive: line 140
30-40% open-ended: Test recall and deeper knowledge
- Distinctive: line 146
Avoid "all of the above" or "none of the above"
- Distinctive: line 147
Test understanding, not trick questions
- Distinctive: line 160
Prefer questions that make the reader *do cognitive work*:
- Distinctive: line 183
Use lowercase with hyphens
- Distinctive: line 331
Before saving the quiz file, verify:
- Distinctive: line 375
Avoid negatively phrased questions when possible
- Distinctive: line 376
Make sure context is provided in the question
- Distinctive: line 377
Test one concept per question
- Distinctive: line 380
Keep every option the same length, register, and specificity as the correct one — no "obviously the complete/careful-sounding one wins" …
- Distinctive: line 383
Avoid giveaways: don't echo wording from the question stem only in the correct option, and don't hedge the correct answer with qualifiers …
- Distinctive: line 389
Consider case variations (already case-insensitive)
- Distinctive: line 390
Keep accepted answers to reasonable variations
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Quiz Generator Skill
Generate quiz JSON files from any topic, content, or resource, then launch an interactive quiz application to test knowledge immediately.
When to Use This Skill
Use this skill when the user requests:
- Creating quizzes from text, URLs, or topics
- Testing themselves on specific content
- Generating practice questions
- Building flashcard-style question sets
- Self-assessment on any subject matter
Trigger phrases: "quiz me on", "test me on", "create a quiz", "generate questions about", "make quiz questions", "test my knowledge", "practice questions for"
Quiz JSON Format
The quiz app expects a JSON array with two question types:
Multiple Choice Questions
{
"question": "What is the capital of France?",
"type": "multiple-choice",
"options": ["London", "Berlin", "Paris", "Madrid"],
"correctAnswer": 2
}Rules:
options: Array of 3-5 answer choicescorrectAnswer: Zero-indexed integer pointing to correct option- Place the correct answer randomly (not always first or last). Don't hand-balance this — a mandatory shuffle script (workflow step 3.5) rewrites every position after you save, so just author naturally and let the script de-bias.
- Make distractors plausible but clearly wrong to someone who knows the material
- Match the length and specificity of the correct answer to the distractors. A common LLM tell is that the correct option is the longest, most-qualified, most "complete-sounding" one while distractors are short and vague — that lets a student pick it by shape alone, without recalling anything. Make every option roughly the same length and equally confident/specific, so the ONLY way to choose correctly is to actually know the material. See "Creating effective distractors" below.
Open-Ended Questions
{
"question": "What is 2 + 2?",
"type": "open-ended",
"acceptedAnswers": ["4", "four", "Four"]
}Rules:
acceptedAnswers: Array of valid answer variations (case-insensitive matching)- Include common phrasings, abbreviations, and alternate spellings
- Keep expected answers concise (1-3 words typically)
- Good for definitions, short answers, and recall questions
- The app also offers AI grading via a local Ollama model (default gemma3:12b, fully offline) as a fallback when exact matching fails, so acceptedAnswers doesn't need to be exhaustive
Optional Media Fields (any question type)
{
"question": "What landmark is shown?",
"type": "open-ended",
"acceptedAnswers": ["Eiffel Tower"],
"image": "media/images/landmark.png",
"audio": "media/audio/pronunciation.mp3"
}Rules:
image/audio: optional; rendered above the answer area- Paths are relative to the quiz-app directory — store assets in
~/quiz-app/media/images/and.../media/audio/ - Absolute local paths and
https://URLs also work - Audio questions are ideal for language practice (listen → answer)
Source / Citation Field (REQUIRED for context-dependent questions)
Any question that only makes sense in the context of a specific paper, book, video, article, doc, or other named resource — i.e. its wording says "the paper", "this book", "the author", "the study", "the video", "according to X", or otherwise assumes the reader knows which source is being discussed — MUST carry a source so the quiz UI shows which resource it's about. The app renders it as a citation chip on the question (title always visible, hyperlinked when a URL is given).
{
"question": "Why does the paper argue that access to AI ≠ uniform value across firms?",
"type": "multiple-choice",
"options": ["...", "...", "...", "..."],
"correctAnswer": 1,
"source": {
"title": "How Organizations Use AI: Evidence from ChatGPT (Chatterji et al., 2026)",
"url": "https://www.nber.org/papers/..."
}
}Rules:
- Prefer the object form
{"title": "...", "url": "..."}— title is mandatory,urloptional but strongly preferred (deep-link straight to the source). - Shorthands also accepted: a plain string
"source": "Book Title"(title only), or the legacy split fields"sourceTitle"+"sourceUrl". - Include the source on every question that depends on it — if a whole quiz is about one paper, put the same
sourceon all questions. If a quiz spans multiple sources (e.g. a paper + its companion), give each question the source it actually tests. - Only give a real, verifiable
url. If you don't have a trustworthy link, ship title-only rather than fabricating a URL that 404s. - Self-contained general-knowledge questions ("What is the capital of France?") don't need a
source.
Deep-link the exact passage (do this for URL/article-based quizzes). When you build a quiz from a web article/URL, append a Chrome text fragment to each question's source.url pointing at the exact sentence(s) in the source that justify the answer:
"source": {
"title": "Using Claude Code: the unreasonable effectiveness of HTML",
"url": "https://claude.com/blog/using-claude-code-the-unreasonable-effectiveness-of-html#:~:text=Instead%2C%20I%E2%80%99ve%20started"
}- Fragment syntax:
#:~:text=<url-encoded-start>for a short exact phrase, or#:~:text=<start>,<end>(both URL-encoded) to bracket a longer passage without encoding the whole thing. Copy the wording verbatim from the fetched article so the app can re-find it. - When several questions come from the same article, give them the same base URL and only vary the
#:~:text=fragment — the split-view pane then stays loaded and just re-highlights between questions. - Prefer a text fragment; fall back to a plain
#section-anchorif the page has a stable heading id, or a bare URL (no fragment) when neither is available. - Why: the server-run quiz app (see step 4) offers a split screen — quiz on the left, the source article on the right — and clicking "Show in article →" on the answer page scrolls the article to and highlights the fragment, so the learner verifies the answer against the real source. No fragment ⇒ the article still opens, just without the auto-jump. This is a server-mode feature; launch via
quiz_server.py, not the file fallback.
Workflow
1. Gather Content
For topic-based quizzes:
- Use your knowledge to generate relevant questions
- Cover key concepts, definitions, and important details
- Include a mix of difficulty levels
For URL-based quizzes:
- Use WebFetch to retrieve the content
- Extract key facts, concepts, and relationships
- Generate questions that test comprehension
- For each question, note the exact sentence(s) in the article that justify the answer and put them in the question's
source.urlas a#:~:text=deep-link (see "Source / Citation Field" → "Deep-link the exact passage"). This powers the split-screen "Show in article →" cross-check.
For user-provided content:
- Parse the text to identify testable concepts
- Create questions covering main points
- Include both factual and conceptual questions
2. Generate Quiz Questions
Create a balanced mix:
- 60-70% multiple-choice: Test recognition and understanding
- 30-40% open-ended: Test recall and deeper knowledge
Question quality guidelines:
- Clear, unambiguous wording
- One correct answer per question
- Distractors that are plausible but incorrect
- Avoid "all of the above" or "none of the above"
- Test understanding, not trick questions
- Vary difficulty: some easy, some challenging
The insight test (apply to EVERY question before keeping it):
Each question must force the reader to encode or retrieve a real piece of knowledge — a mechanism, a relationship, a "why", a consequence, a distinction that matters. If answering it only requires matching words the reader already sees, it is noise. Cut it or rewrite it.
Ban these low-value question types outright:
- Terminology/rebrand recall — "X was originally called Y, what is it now called?" or "what is the term for Z?" These test vocabulary swaps, not understanding. (Bad example to never emit: "OpenAI's June 2023 capability was originally called 'function calling.' What was it later rebranded to?" — the answer adds no knowledge, it's just word-matching.)
- Definitional lookup — "What does acronym X stand for?" unless the expansion itself teaches the concept.
- Fact-fishing with the answer in the stem — questions whose wording already contains or telegraphs the answer.
- Trivia — dates, names, and counts, UNLESS the number/name carries conceptual weight (e.g. a threshold that changes behavior).
Prefer questions that make the reader do cognitive work:
- Why / mechanism — "Why does progressive disclosure reduce context bloat?" not "What is progressive disclosure?"
- Distinction that matters — contrast two concepts on the axis that actually separates them (what changes as a result), not on which label is newer.
- Apply / predict — "Given situation S, what would the agent do and why?"
- Consequence / trade-off — "What breaks if you skip step X?" / "What does this design choice cost you?"
- Steelman a distractor — build wrong options from real misconceptions, so choosing correctly means the reader actually understands, not eliminates by absurdity.
Quick self-check per question: "After answering this, does the reader know something they'd need to think to produce — or did they just pattern-match a word?" If the latter, drop it.
Recommended quiz length:
- Quick quiz: 5-10 questions
- Standard quiz: 10-20 questions
- Comprehensive: 20-30 questions
3. Save the Quiz JSON
Save the quiz JSON file to the quiz-app directory:
~/quiz-app/<topic-slug>-quiz.jsonNaming convention:
- Use lowercase with hyphens
- Include descriptive topic name
- End with
-quiz.json
Examples:
python-basics-quiz.jsonai-fluency-quiz.jsonjavascript-arrays-quiz.json
3.5. Randomize Correct-Answer Positions (REQUIRED)
Right after saving the JSON and before launching, run the bundled shuffle script. LLM-authored quizzes have a strong positional bias — the correct answer clusters in one slot (usually "B", sometimes "A") — which lets a test-taker guess without knowing the material. This script independently shuffles each multiple-choice question's options and rewrites correctAnswer to match, then prints the before/after distribution so you can confirm the fix.
uv run ~/.claude/skills/quiz-generator/scripts/shuffle_answers.py ~/quiz-app/<topic-slug>-quiz.jsonIt edits the file in place, is value-preserving (the correct option is tracked by identity and only moved, never changed), and leaves open-ended questions and all other fields untouched. Typical output looks like Before: B=85% → After: A=35% B=20% C=20% D=25%. Add --seed N for a reproducible shuffle or --check to only report the current distribution. Do NOT try to balance answer positions by hand while authoring — author naturally and let this script do it.
4. Launch the Quiz App (via local server, Auto-Loaded)
Preferred: launch through the local quiz server — it enables the "Add to Anki" button (direct insert into the Anki DB), the "Delete Question" button (persists to the JSON on disk), and media serving:
uv run ~/quiz-app/quiz_server.py ~/quiz-app/<topic-slug>-quiz.jsonThis starts (or reuses) a server on http://127.0.0.1:8321 and opens the browser with the quiz pre-loaded and auto-started. The user also has a quiz shell alias for the same command. Note: the server runs in the foreground — launch it with run_in_background (or &) so it keeps serving after the command returns.
Continue on phone (QR): in server mode the app shows a minimal "📱 Phone" dock (bottom-right); hovering it reveals a QR encoding the machine's LAN URL for the current quiz and current question, so the user can scan and resume on their phone. This requires the server to be reachable over the LAN — the server binds 0.0.0.0 and QR generation uses the segno dependency (auto-installed by uv run). Both devices must be on the same Wi-Fi. If a server was already running from before this feature (bound to 127.0.0.1), kill it first (lsof -ti tcp:8321 | xargs kill) so the new LAN-bound instance takes over.
Fallback (no server): the app still works as a plain file via the URL hash protocol quiz-app.html#quiz=<base64-json>&autostart=1&file=<basename> (Anki/delete buttons then degrade gracefully):
python3 -c "
import base64, urllib.parse, pathlib, subprocess, time
json_path = pathlib.Path('~/quiz-app/<topic-slug>-quiz.json').expanduser()
data = json_path.read_text()
encoded = base64.b64encode(data.encode('utf-8')).decode('ascii')
name = urllib.parse.quote(json_path.name)
# Cache-buster query param forces the page to reload even if a stale tab is already open.
app = pathlib.Path('~/quiz-app/quiz-app.html').expanduser()
url = f'file://{app}?t={int(time.time())}#quiz={urllib.parse.quote(encoded)}&autostart=1&file={name}'
subprocess.run(['open', url])
"Replace <topic-slug>-quiz.json with the actual filename you saved.
The quiz will be open and ready to answer the first question. The JSON file is still saved to disk so the user can reload it later via the on-disk quiz list (server mode) or "Choose Quiz File".
Example Workflows
Example 1: Topic-based quiz
User: "Quiz me on JavaScript array methods"
Actions:
1. Generate 10-15 questions about array methods (map, filter, reduce, forEach, etc.)
2. Include multiple-choice for method selection and open-ended for syntax
3. Save as ~/quiz-app/javascript-arrays-quiz.json
4. Launch via the quiz server (step 4 above) pointing at javascript-arrays-quiz.json — quiz opens auto-started on question 1
5. Tell user: "Quiz is loaded and ready — answer away."Example 2: URL-based quiz
User: "Create a quiz from this article: https://example.com/python-tutorial"
Actions:
1. WebFetch the URL to extract content
2. Identify key concepts and generate 10-15 questions
3. Save as ~/quiz-app/python-tutorial-quiz.json
4. Launch via the quiz server (step 4 above) — app opens with the quiz auto-started
5. Tell user: "Quiz is loaded and ready to start."Example 3: Content-based quiz
User: "Test me on this content: [user provides text or notes]"
Actions:
1. Parse the provided content
2. Extract key facts and concepts
3. Generate questions covering the material
4. Save with descriptive filename
5. Launch quiz appQuestion Templates
Multiple-Choice Patterns
Definition questions:
{
"question": "What is [term]?",
"type": "multiple-choice",
"options": ["Correct definition", "Related but wrong", "Common misconception", "Unrelated concept"],
"correctAnswer": 0
}Best practice questions:
{
"question": "What is the recommended way to [action]?",
"type": "multiple-choice",
"options": ["Option A", "Option B", "Option C", "Option D"],
"correctAnswer": 2
}Comparison questions:
{
"question": "What is the key difference between [X] and [Y]?",
"type": "multiple-choice",
"options": ["Difference A", "Difference B", "They are the same", "Difference C"],
"correctAnswer": 0
}Open-Ended Patterns
Short answer:
{
"question": "What command is used to [action]?",
"type": "open-ended",
"acceptedAnswers": ["command", "command()", "the command command"]
}Definition recall:
{
"question": "Define [term] in one or two words.",
"type": "open-ended",
"acceptedAnswers": ["answer1", "answer2", "Answer1"]
}Quality Checklist
Before saving the quiz file, verify:
Content:
- Questions are clear and unambiguous
- Each question has exactly one correct answer
- Multiple-choice distractors are plausible
- Open-ended acceptedAnswers include common variations
- Mix of difficulty levels included
- No duplicate questions
Format:
- Valid JSON array structure
- Each object has required fields (question, type)
- Multiple-choice: options array and correctAnswer integer
- Open-ended: acceptedAnswers array
- correctAnswer is valid index (0 to options.length - 1)
File:
- Saved to quiz-app directory
- Descriptive filename with -quiz.json suffix
- No spaces in filename
Error Handling
If user wants more/fewer questions:
- Adjust the count based on their preference
- Quick assessment: 5-8 questions
- Standard review: 10-15 questions
- Comprehensive test: 20-30 questions
If content is too short for many questions:
- Generate quality over quantity
- Focus on key concepts
- Explain that limited content means fewer questions
If quiz app doesn't open:
- Provide the file path for manual opening
- Instruct user to open quiz-app.html in browser
- Remind them to select the generated JSON file
Tips for Success
Writing good questions:
- Focus on understanding, not memorization
- Avoid negatively phrased questions when possible
- Make sure context is provided in the question
- Test one concept per question
Creating effective distractors (the correct answer must not be guessable by shape):
- Keep every option the same length, register, and specificity as the correct one — no "obviously the complete/careful-sounding one wins" tell. If the right answer names three conditions, the distractors should each name three plausible conditions too.
- Build distractors from real misconceptions and near-misses a student who half-knows the material would actually fall for — not absurd or unrelated options a test-taker can eliminate without recalling anything.
- Include related-but-wrong terms and true-but-irrelevant statements (correct-sounding, wrong for this question), so choosing correctly requires retrieving the specific fact, not pattern-matching.
- Avoid giveaways: don't echo wording from the question stem only in the correct option, and don't hedge the correct answer with qualifiers ("usually", "in most cases") that distractors lack.
- Goal: the ONLY reliable path to the right option is to recall and encode the underlying knowledge. If a student could pick it from length, tone, or elimination alone, rewrite the distractors.
Open-ended answers:
- Include singular and plural forms
- Add common abbreviations
- Consider case variations (already case-insensitive)
- Keep accepted answers to reasonable variations
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

