From Kinematic Chains to LaTeX: How I Built an Exam Cheat Sheet with Claude Code
Thereâs a particular kind of panic that sets in when youâre staring down a mechanical engineering final covering everything from radiation heat transfer to PID controller tuningâand all your knowledge needs to fit on a single side of paper.
My solution: point Claude Code at my project documentation and let it do the compression.
The Challenge: Too Much Knowledge, Too Little Paper
The exam topics read like a greatest hits album of mechanical engineering:
- Heat transfer and radiation with view factors
- Rotational dynamics (torque, kinetic energy, moment of inertia)
- Transfer functions, poles, zeros, and Bode plots
- PI/PID controller tuning and stability analysis
- Magnetic bearing systems and dynamic stiffness
- Kinematic chain analysis for the flywheel rotor assembly
All of this had to fit on one side of one sheet. The constraint wasnât just spaceâit was useful space. A cheat sheet crammed with formulas you canât find under pressure is worse than no cheat sheet at all.
The Approach: Mine the Project Report
Rather than starting from scratch, I pointed Claude at my existing project documentation. The CLAUDE.md file in my course repository already contained the essential specifications: baseline system parameters, thermal model equations, state of charge definitions, and controller gains.
The key insight was treating this as a data extraction problem rather than a content creation problem. All the formulas already existedâthey just needed reorganizing for quick reference.
Hereâs the prompt I used:
I need to create a one-page cheat sheet for my ME final exam.
The CLAUDE.md file in this repo has all the key formulas and
system parameters from my flywheel energy storage project.
Extract the most important equations and generate an HTML file
optimized for printing with Chrome headlessâthree columns,
8pt font, minimal margins. Group related concepts together.
Claudeâs first draft was too verbose. My follow-up:
Strip out all proseâjust formulas, variable definitions, and
the "gotcha" notes about common mistakes. Also, the thermal
radiation section is missing the view factor formula.
That second pass got much closer. The source documentation had formulas with full explanations:
## Thermal Model
- Rotor emissivity: 0.4 (LOW - limits heat dissipation!)
- Housing emissivity: 0.9
- Two-surface radiation formula:
Q = Ď Ă A_rotor Ă (T_rotorâ´ - T_housingâ´) / F_rad
Claude compressed this into three tight lines with the formula and a bolded warning about low rotor emissivity being a design limitation.
Why HTML Instead of LaTeX?
I considered LaTeX initiallyâitâs the standard for academic documents. But for a cheat sheet, HTML with CSS offered practical advantages:
- Faster iteration. Tweaking column widths in CSS takes seconds; debugging LaTeX layout issues takes longer.
- Precise margin control. Chromeâs headless print-to-PDF respects CSS
@pagerules exactly. - No dependency headaches. HTML works everywhere; LaTeX requires a full TeX distribution.
The CSS that made the density possible:
@page {
size: letter;
margin: 0.25in;
}
body {
font-size: 8pt;
line-height: 1.2;
column-count: 3;
}
And the command to generate the final PDF:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--headless --print-to-pdf=cheatsheet.pdf --no-margins cheatsheet.html
The Real Value: Context Preservation
What struck me most was how Claude navigated the project context. The CLAUDE.md file wasnât just formulasâit contained notes about common mistakes and derived values that wouldnât be obvious from raw specifications.
These annotations made it into the cheat sheet. For example, the state of charge calculation includes a non-obvious gotcha: 50% SoC corresponds to ~34,641 RPM, not 30,000 RPM as you might naively expect from linear interpolation. Why? Because kinetic energy scales with Ď² (E = ½IĎ²), so state of charge isnât linear with RPMâitâs quadratic.
That kind of contextual knowledge is exactly what you need when your brain is running at half capacity from exam stress.
What Actually Worked
I used the cheat sheet this morning. The three-column density worked well for scanningârelated concepts were grouped together, so I could find formulas quickly. The 8pt font was readable but definitely at the lower limit.
The most valuable part turned out to be the gotcha notes. During one problem, I almost used absolute amperes instead of per-unit current in the motor efficiency functionâexactly the mistake the cheat sheet warned against in bold.
Practical Takeaways
Structure documentation for reuse. The CLAUDE.md file wasnât created for cheat sheet generationâit was created to help Claude understand the project during development. Well-structured documentation serves multiple purposes.
Specify output constraints early. Telling Claude âHTML with minimal margins, print via Chrome headlessâ upfront shaped the entire output.
Let AI compress, not create. Asking Claude to reorganize verified content is safer than asking it to generate technical formulas from memory. One caveat: errors in your source docs will propagate faithfully.
Include the gotchas. A cheat sheet that just lists equations is barely better than a textbook. Notes about common mistakes are what actually save you during the exam.
Iterate on density. My first pass was too verbose by about 40%. Donât expect the first output to be print-ready.
The Documentation Payoff
Thereâs something fitting about using AI to prepare for an exam on control systems. The flywheel project itself was about modeling complex systems with feedback loopsâand thatâs exactly what happened when iterating on this cheat sheet. Each pass refined the output, rejecting what didnât fit, amplifying what mattered.
But the bigger lesson isnât about AI or control theory. The CLAUDE.md file I wrote to help Claude understand my project during development became exam prep material weeks later. Write documentation once for understanding; reuse it for everything else.