ワンクリックで
homework-solver
// Use when given an engineering or mathematics homework PDF and asked to solve all or selected questions, answer sketch or plot problems, redraw assignment figures, or work from noisy OCR-extracted homework text.
// Use when given an engineering or mathematics homework PDF and asked to solve all or selected questions, answer sketch or plot problems, redraw assignment figures, or work from noisy OCR-extracted homework text.
| name | homework-solver |
| description | Use when given an engineering or mathematics homework PDF and asked to solve all or selected questions, answer sketch or plot problems, redraw assignment figures, or work from noisy OCR-extracted homework text. |
Turn a homework PDF into a solved answer document with verified mathematics and verified output artifacts.
Core principle: treat homework completion as a gated controller workflow: read first, solve one question group, produce any required figures for that group, verify that same group with a fresh verifier, pass the question gate, 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.
.tex and compiled .pdf.solver subagent and a separate fresh verifier subagent.dispatch solver -> collect solver output -> produce required figures for that group -> dispatch fresh verifier for the same group -> resolve verifier notes -> pass question gate.This skill is designed to work as a standalone GitHub skill.
pdf.pdf skill exists, use it. Otherwise, use the platform's native PDF-reading tools.This skill uses a strict separation-of-roles workflow:
controller owns intake, decomposition, dispatch, gating, normalization, build choice, and final reportingsolver handles one question groupverifier independently checks that same question groupassembler role writes the final document using only approved question groupsIf your platform does not support subagents, emulate the same workflow sequentially:
The controller is never allowed to treat solver output as already trusted work.
digraph homework_solver_flow {
"Intake" [shape=box];
"Read PDF" [shape=box];
"Question decomposition" [shape=box];
"Dispatch solver for one group" [shape=box];
"Produce required figures for same group" [shape=box];
"Dispatch fresh verifier for same group" [shape=box];
"Question gate" [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 for one group";
"Dispatch solver for one group" -> "Produce required figures for same group";
"Produce required figures for same group" -> "Dispatch fresh verifier for same group";
"Dispatch fresh verifier for same group" -> "Question gate";
"Question gate" -> "All groups verified?";
"All groups verified?" -> "Dispatch solver for one group" [label="no, next group or 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.sketch, plot, draw, graph, and redraw as mandatory visual deliverables, not optional presentation choices.After intake and PDF read, announce the concrete deliverable plan.
If the user asked to complete the homework and did not narrow the format, proceed toward .tex and .pdf generation without waiting for a second prompt.
Treat visual outputs as first-class deliverables, not optional polish.
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.
Use the Solver Contract below as the required output format.
When subagents are available, the controller must keep prompts narrow, role-specific, and self-contained.
Do not make a subagent infer its role from surrounding conversation. State the role, scope, required output format, and forbidden actions directly in the prompt.
Give each solver subagent only the context needed to solve one question group.
The controller must provide:
The solver must return exactly these sections:
question ids coveredextracted prompt summaryassumptions or theorems usedderivation or proof outlinefinal answersfigure requirementsnotation introduceduncertainty or needs manual reviewThe solver is responsible for solving, not for granting trust.
If the prompt for that group asks for any visual result, figure requirements must say exactly what figure will be produced in the final deliverable. It must never say none for a sketch/plot/draw/redraw question.
Use section labels exactly as written above. Do not merge sections, rename them, or replace them with free-form prose.
If the solver omits a required section, adds assembly work, or blends verification into the answer, the controller must reject that output and re-dispatch.
Give each verifier subagent only the context needed to verify the same question group.
The controller must provide:
The verifier must return exactly these sections:
verdict with one of: APPROVED, APPROVED_WITH_NOTES, REJECTEDfindings by question groupcorrected result if neededresidual uncertainty if anyThe verifier is responsible for independent checking, not for assembly or final reporting.
Use section labels exactly as written above. Do not collapse them into a narrative summary.
Inside findings by question group, cover the verifier checklist in this order:
If the verifier returns a verdict without findings, changes scope, or silently approves malformed solver output, the controller must reject that output and re-dispatch.
Treat verifier verdicts as workflow states, not suggestions.
APPROVED:
corrected result if needed should be empty or explicitly say noneAPPROVED_WITH_NOTES:
REJECTED:
REJECTED to a note just to keep movingThe controller must treat subagent outputs as typed workflow artifacts, not casual notes.
After a question group's mathematics has been solved, produce any required figures for that same group before it reaches the verifier or the question gate.
For every solved question group, run a separate verifier phase after any required figures for that group have been produced.
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.
In that fallback mode, the controller must still write down a verifier artifact using the same four sections required by the Verifier Contract: verdict, findings by question group, corrected result if needed, and residual uncertainty if any.
When extracted text is noisy, the controller should preserve the raw extraction alongside any summary so the verifier can challenge the controller's interpretation instead of inheriting it silently.
The verifier must check:
The verifier must return one of the verdicts defined in Verdict Handling above.
If 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.
The controller must resolve verifier output for one group before dispatching assembly work that depends on that group.
No question may enter the final document until all of the following are true:
APPROVED, or APPROVED_WITH_NOTES with all notes already resolved for this groupSkipping 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.If the mathematics is verified and the .tex file is complete, but .pdf generation is blocked by environment or toolchain issues, report the result as a blocked artifact outcome rather than full completion.
.pdf artifact could not be produced..tex file and any intermediate build logs or blocker details needed for the user to continue..pdf is still missing.Do this only after the output files exist.
If .pdf generation was requested but blocked, do not run this checklist as though the final artifact set were complete. Instead, report the blocked artifact outcome from the Build Workflow and verify only the artifacts that do exist.
In a blocked artifact outcome, treat figure verification as follows: required figures must still exist in the available artifacts, and their source or intermediate form must be inspectable enough for the controller to confirm that each required figure is present and corresponds to the solved question group, even if final PDF readability could not be confirmed.
Check this exact list:
.tex exists.pdf exists if requested| Situation | Action |
|---|---|
| Full assignment PDF | Read, decompose, solve, produce required figures, verify, gate, assemble, build, verify |
| Question says sketch/plot/draw/redraw | Produce the corresponding figure by default; do not wait for a second user request |
| Selected questions only | Keep subset in one document and encode it in filename |
| Many independent questions | Keep one-group-at-a-time solve -> produce required figures -> verify -> gate sequencing; do not batch-solve or batch-verify |
| 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, and still write the verifier artifact in contract form |
| 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 or blocked PDF build | Report a blocked artifact outcome and still deliver .tex |
.tex and .pdf generation as optional when the user asked to complete the homework and did not opt out| Mistake | Fix |
|---|---|
| Solver output is copied directly into LaTeX | Produce required figures, run verifier review on the solved work and figures, then normalize before assembly |
| One question is verified but others are not | Keep per-question gates; verify every included question |
| All questions are solved first, then verified later | Enforce solve -> produce required figures -> verify -> gate for each group before moving on |
| Build success is reported as overall success | Separate mathematical verification from artifact verification |
| Minor OCR damage is treated as license to guess missing math | Summarize only when meaning is fully clear; otherwise stop and ask |
| Figures are mentioned but not drawn | Create the figure during Step 4C before verifier review and before the question gate; sketch/plot/draw/redraw questions always require the figure by default |
| Manual fallback says verification happened but leaves no verifier artifact | Write the same verifier sections even without subagents |
| Different questions use conflicting notation | Normalize centrally before assembly |
| Other installed skills get pulled in automatically | Restrict companion skills to pdf only |
When the user gives a homework PDF and wants a solved deliverable, use this skill first. Only pdf may be used alongside it. Follow the strict order: read the PDF, decompose the work, run solve -> produce required figures -> verify -> gate for one group at a time, normalize, assemble, build, then perform final artifact verification or report a blocked artifact outcome.
If you skip a gate, you are not following this skill.