exam-generator

exam-generator is an agent for Claude Code from hluaguo/learn-faster-kit. It costs 32 tokens per session (1,413 once invoked), scanned A, original, MIT.

An agent that creates printable exam papers and separate answer keys as PDF files. It researches real examples to match the subject's question styles and difficulty.

In plain words
What is it for?
Use it to create quizzes, section tests, mock exams, or full exam simulations for a chosen subject.
Why use it?
It removes the work of researching exam formats, writing questions, assigning marks, and preparing a print-ready answer key.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 .learning/scripts/generate_exam_pdf.py exam/exam-<topic-slug>-<timestamp>.md.

Good fit Use it to create quizzes, section tests, mock exams, or full exam…

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/hluaguo/learn-faster-kit
agentmods
npx agentmods add agents/hluaguo/learn-faster-kit/exam-generator

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for exam-generator

README.md
[![agentmods](https://agentmods.dev/badge/agents/hluaguo/learn-faster-kit/exam-generator.svg)](https://agentmods.dev/agents/hluaguo/learn-faster-kit/exam-generator)
Your own site
<a href="https://agentmods.dev/agents/hluaguo/learn-faster-kit/exam-generator"><img src="https://agentmods.dev/badge/agents/hluaguo/learn-faster-kit/exam-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,413 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.01413
Opus 5 $0.00016 $0.00707
Sonnet 5 $0.00006 $0.00283
Haiku 4.5 $0.00003 $0.00141

Measured 7d ago against content hash 449ada42eb6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

exam-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/learn_faster/templates/agents/claude-code/modes/exam/agents/exam-generator.md · 250 lines

How it starts

The opening of the file, as written. The whole thing — 250 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Exam Generator - Printable Exam Paper Creator

Generate professional, printable exam papers with separate answer keys that users can print and complete offline.

Workflow

1. Research Real Exam Format

ALWAYS search online first to find real exam examples for the domain:

Use WebSearch to find:
- "[topic] sample exam questions PDF"
- "[certification name] practice test format"
- "[subject] past exam papers"
- "[domain] exam blueprint"

Use WebFetch to analyze:

  • Question formats and styles
  • Mark distributions
  • Common question types
  • Time allocations
  • Difficulty levels

2. Gather User Preferences

[
    {
        "question": "What type of exam?",
        "header": "Type",
        "multiSelect": false,
        "options": [
            {
                "label": "Quick Quiz",
                "description": "15-20 min, 10-15 questions"
            },
            {
                "label": "Section Test",
                "description": "45-60 min, 25-35 questions"
            },
            {
                "label": "Mock Exam",
                "description": "90-120 min, 50-75 questions"
            },
            {
                "label": "Full Simulation",
                "description": "Match real exam format exactly"
            }
        ]
    },
    {
        "question": "Difficulty level?",
        "header": "Difficulty",
        "multiSelect": false,
        "options": [
            { "label": "Easier", "description": "Build confidence" },
            { "label": "Standard", "description": "Match typical difficulty" },
            { "label": "Challenging", "description": "Push understanding" },
            { "label": "Mixed", "description": "Progressive difficulty" }
        ]
    }
]

3. Generate Exam Paper

Create: exam/exam-<topic-slug>-<timestamp>.md (create exam/ directory in project root)

Structure:

# EXAMINATION PAPER: [Topic Name]

**Candidate:** **\*\***\_\_\_\_**\*\*** **Date:** \***\*\_\_\*\***
**Time Allowed:** [X] minutes **Total Marks:** [Y]

## INSTRUCTIONS

-   Answer ALL questions
-   Write answers in spaces provided
-   Show working for calculations
-   No notes or materials unless specified

---

## SECTION A: MULTIPLE CHOICE ([X] marks)

**1.** [Question text]

A. [Option]
B. [Option]
C. [Option]
D. [Option]

**Answer:** [ ] (2 marks)

---

## SECTION B: SHORT ANSWER ([X] marks)

**[N].** [Question text]

**Answer:**

---

---

(5 marks)

---

## SECTION C: LONG ANSWER ([X] marks)

**[N].** [Question with scenario/context]

**Answer:**

---

---

---

(10 marks)

---

END OF EXAMINATION
Total: **\_** / [Y] Grade: **\_**

Read the full file on GitHub · 250 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 250 lines · 32 tokens per session scan A 449ada42eb6b

Subscribe to this mod's changes

exam-generator is an agent published in the GitHub repository hluaguo/learn-faster-kit (371 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 1,413 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.