Generate professional math practice worksheets and full answer keys as PDFs. Compiles LaTeX to PDF using tectonic (free, no account needed). Supports any math topic from elementary through high school (Pre-Algebra, Algebra 1/2, Geometry, Pre-Calc). Handles coordinate plane grids, geometric figures, tables, and multi-part problems. Use when a user asks for a math worksheet, practice problems, homework help sheet, or answer key for any K-12 math topic.
Generate professional math practice worksheets and full answer keys as PDFs. Compiles LaTeX to PDF using tectonic (free, no account needed). Supports any math topic from elementary through high school (Pre-Algebra, Algebra 1/2, Geometry, Pre-Calc). Handles coordinate plane grids, geometric figures, tables, and multi-part problems. Use when a user asks for a math worksheet, practice problems, homework help sheet, or answer key for any K-12 math topic.
Math Worksheet Generator
Generate a student worksheet PDF + full step-by-step answer key PDF for any K-12 math topic. Compiles LaTeX with tectonic (no TeX installation required — it auto-downloads packages).
Model Selection (Automatic)
This skill auto-detects the best available reasoning model and uses it for problem generation. Reasoning models (o1, o3, DeepSeek R1, Gemini DeepThink) work through math step-by-step and make significantly fewer errors than standard models.
Model rankings are kept fresh via a three-layer fallback:
Hosted JSON (fetched from GitHub, 7-day cache) — updated by maintainers as models ship
Bundled JSON (references/model-rankings.json) — updated with each skill release on ClawhHub
Hardcoded defaults in the script — last-resort, never stale enough to cause failures
To update rankings without waiting for a skill release: edit the hosted JSON at the GitHub URL in references/model-rankings.md. The skill picks it up within 7 days.
Step 0 — run model detection before anything else:
Optionally add a quiet note: "Using Opus — solid math accuracy and excellent LaTeX. For the hardest Algebra 2 problems, a reasoning model (DeepThink/o1) would be marginally better."
NONE — standard model only; proceed but surface a clear recommendation:
⚠️ No reasoning model or Opus detected. Worksheet generated with [current model].
For best accuracy, especially on multi-step problems, configure one of:
• Gemini 2.5 Pro DeepThink — google.generativeai.com (free tier available)
• o1 / o3 — platform.openai.com
• DeepSeek R1 — platform.deepseek.com (very affordable)
• Claude Opus — console.anthropic.com
SymPy verification will catch most errors regardless.
Status
Model examples
Action
FOUND_REASONING
DeepThink, o1, o3, R1
Spawn silently, no warning
FOUND_STRONG
Claude Opus 4.x
Spawn silently, optional quiet note
NONE
Sonnet, Flash, GPT-4o
Use current model + show recommendation
Prerequisites
brew install tectonic # macOS/Linux — downloads packages on demand
Output directory (create if needed): ~/Documents/Worksheets/
Topic: e.g. "factoring trinomials", "solving two-step equations"
Problem count: default 10 if not specified
Format preference: timed quiz, homework practice, mixed difficulty, or topic drill
Photo input shortcut: If the user sends a photo of homework or a textbook page, use the image tool to extract problem types, format, and difficulty — then mirror that style exactly.
2. Design problems
Design problems appropriate to the student's level. Increase difficulty gradually across the set. Every problem must be mathematically correct — verify your own solutions.
See references/problem-library.md for topic-specific problem type menus.
3. Write LaTeX source
Write three.tex files to /tmp/:
ws_TOPIC_DATE.tex — student worksheet (blank work areas)
Work space defaults: \vspace{5cm} per problem; 8cm for multi-step; 10cm+ for graphs.
4. Write and run the verification file
Before compiling, write /tmp/verify_TOPIC_DATE.json — a structured data file describing each problem and its expected answer. The bundled scripts/verify.py evaluates this using SymPy. No generated code is ever executed.