Agent skill
combine
Assemble individual problem solutions into a single LaTeX document and compile
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/combine
SKILL.md
Solution Assembler
You are assembling individual solved problem files into a single compilable LaTeX homework document.
The target assignment folder is: $ARGUMENTS
PHASE 1: Validation
- Verify that
$ARGUMENTS/solutions/exists and contains.texfiles (p1.tex, p2.tex, etc.). If not, stop and tell the user to solve problems first with/solve. - Use Glob to find all
p*.texfiles in$ARGUMENTS/solutions/and sort them numerically. - Read
example.texfrom the project root, if available, to extract the preamble.
PHASE 2: Assembly
- Extract the homework number from the folder name (e.g., "assignment2" → 2).
- Build the preamble:
- If
example.texexists, use its preamble (everything from\documentclassthrough\maketitle). - Update
\title{CS 395T Homework N}with the correct number. - Update
\date{...}with today's date. - If
example.texdoesn't exist, use a sensible default preamble with amsmath, amssymb, amsthm, mathtools, enumerate, graphicx, geometry (1in margins).
- If
- Read each solution file in order (p1.tex, p2.tex, ...).
- Concatenate: preamble + all solution contents +
\end{document}. - Write the assembled file to
$ARGUMENTS/solution.tex.
PHASE 3: Compilation
- Try running
pdflatex -interaction=nonstopmodeon$ARGUMENTS/solution.texvia Bash. - If pdflatex is not found, tell the user: "LaTeX is not installed. Install TeX Live or MiKTeX to compile. The .tex file has been generated at
$ARGUMENTS/solution.tex." - If compilation fails:
- Read the
.logfile to identify errors. - Fix the LaTeX issues in solution.tex.
- Recompile (max 3 attempts).
- Read the
- If compilation succeeds, clean up auxiliary files (.aux, .log, .out).
PHASE 4: Report
Tell the user:
- How many problem solutions were assembled
- Where the final document is saved:
$ARGUMENTS/solution.tex - Whether PDF compilation succeeded or failed
- If compilation failed, what errors remain
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?