Use when given an engineering or mathematics homework PDF and asked to solve some or all problems, produce a submission-ready answer document, or generate a verified solution PDF.
Turn a homework PDF into a solved answer document with verified mathematics and verified output artifacts.
Core principle: treat homework completion as a gated workflow: read first, solve by question, verify by question, then assemble, build, and verify the final artifacts.
Default mode unless the user says otherwise:
.tex and compiled .pdfUse this skill when the user wants any of the following from a homework PDF:
Do not use this skill for essays or research-writing tasks where outside sources are the main work.
solver subagent and a separate fresh verifier subagent.This skill is designed to work as a standalone GitHub skill.
pdf skill exists, use it. Otherwise, use the platform's native PDF-reading tools.This skill uses a strict separation-of-roles workflow:
If your platform does not support subagents, emulate the same workflow sequentially:
digraph homework_solver_flow {
"Intake" [shape=box];
"Read PDF" [shape=box];
"Question decomposition" [shape=box];
"Dispatch solver per group" [shape=box];
"Dispatch verifier per group" [shape=box];
"All groups verified?" [shape=diamond];
"Normalize notation and style" [shape=box];
"Assemble document" [shape=box];
"Build artifacts" [shape=box];
"Final artifact verification" [shape=box];
"Report result" [shape=doublecircle];
"Intake" -> "Read PDF";
"Read PDF" -> "Question decomposition";
"Question decomposition" -> "Dispatch solver per group";
"Dispatch solver per group" -> "Dispatch verifier per group";
"Dispatch verifier per group" -> "All groups verified?";
"All groups verified?" -> "Dispatch solver per group" [label="no, fix and re-verify"];
"All groups verified?" -> "Normalize notation and style" [label="yes"];
"Normalize notation and style" -> "Assemble document";
"Assemble document" -> "Build artifacts";
"Build artifacts" -> "Final artifact verification";
"Final artifact verification" -> "Report result";
}
.tex, .pdf, or both.After intake and PDF read, announce the concrete deliverable plan.
If subagents are available, dispatch one fresh solver subagent per question group.
If subagents are not available, the controller performs this phase directly but must still produce the same structured output for later verification.
The solver phase must produce exactly:
needs manual reviewThe solver is responsible for solving, not for granting trust.
For every solver result, run a separate verifier phase for the same question group.
If subagents are available, dispatch a separate fresh verifier subagent.
If subagents are not available, the controller must perform an explicit second-pass verification against the checklist below before assembly.
The verifier must check:
The verifier must return one of:
APPROVEDAPPROVED_WITH_NOTESREJECTEDIf the verifier returns REJECTED, do not assemble that question. Send it back through a fix-and-re-verify loop.
If the verifier returns APPROVED_WITH_NOTES, the controller must either:
Do not silently ignore verifier notes.
The verifier phase must be distinct from the solver phase. A quick reread of the same draft is not enough; use the checklist deliberately and record the result.
No question may enter the final document until all of the following are true:
Skipping this gate is a workflow violation.
Before writing LaTeX, normalize across all approved question groups:
The main agent is responsible for this step. Do not make assembly a blind concatenation of subagent outputs.
Use:
<pdf-stem><subset-if-any>_solution<language-if-nondefault><style-if-nondefault>.<ext>
Rules:
_q2_q5_cn or _bilingual_examExamples:
hw2.pdf -> hw2_solution.tex, hw2_solution.pdfhw2.pdf with Q4 and Q5 -> hw2_q4_q5_solution.texhw2.pdf bilingual exam brief -> hw2_solution_bilingual_exam.texFallback only if the PDF stem is unavailable:
assignment_solution.texassignment_solution.pdflatexmk, pdflatex, and xelatexlatexmk is unhealthyPreferred order:
latexmk if healthyIf the first build fails:
latexmk is blocked by MiKTeX state or update warnings, switch to direct pdflatex -interaction=nonstopmode -halt-on-error <file.tex>xelatex is available, use direct xelatex instead of forcing extra packages into a pdflatex patharticle, geometry, amsmath, amssymb.tex file if .pdf compilation is blocked.Do this only after the output files exist.
Check this exact list:
.tex exists.pdf exists if requested| Situation | Action |
|---|---|
| Full assignment PDF | Read, decompose, solve, verify, assemble, build, verify |
| Selected questions only | Keep subset in one document and encode it in filename |
| Many independent questions | Solve in parallel, verify in parallel, then normalize before assembly |
| Unreadable PDF text or figure | Stop and ask |
| No custom PDF skill installed | Use native PDF extraction tools and continue |
| No subagent support | Run solver phase, then a separate verifier phase manually |
| Solver finished but no verifier yet | Do not assemble that question |
| Verifier rejects a question | Fix and re-verify before proceeding |
| Compilation succeeded | Continue to artifact verification; do not infer math correctness |
| No working TeX engine | Report blocker and still deliver .tex |
| Mistake | Fix |
|---|---|
| Solver output is copied directly into LaTeX | Run verifier first, then normalize before assembly |
| One question is verified but others are not | Keep per-question gates; verify every included question |
| Build success is reported as overall success | Separate mathematical verification from artifact verification |
| Figures are mentioned but not drawn | Create the figure before final verification |
| Different questions use conflicting notation | Normalize centrally before assembly |
When the user gives a homework PDF and wants a solved deliverable, use this skill first. Follow the strict order: read the PDF, decompose the work, run the solver phase, run the verifier phase, pass the question gate, normalize, assemble, build, then perform final artifact verification.
If you skip a gate, you are not following this skill.
Edit PDFs with natural-language instructions using the nano-pdf CLI.