MiniGrayGay/cheatsheet-generator-skill

Turn your course slides and PDFs into dense, exam-ready LaTeX cheatsheets.

โ˜… 0Forks 0HTMLGitHub โ†—Compare

Project website โ†—

README

๐Ÿ“„ Claude Cheatsheet Generator

Turn your course slides and PDFs into dense, exam-ready LaTeX cheatsheets โ€” powered by Claude Code.

One command. Browser-based config. AI-generated LaTeX. Iterative editing loop. Done.

you: /cheatsheet-generator
      โ†“
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚  Phase 1: Configure in browser                         โ”‚
 โ”‚  โ†’ paper size, columns, colors, font, file selection   โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚  Phase 2: Claude reads your materials & generates .tex  โ”‚
 โ”‚  โ†’ PDFs, PPTX, Markdown, images โ€” all supported        โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚  Phase 3: Live editor in browser                        โ”‚
 โ”‚  โ†’ request changes in natural language, Claude edits    โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
      โ†“
 cheatsheet.tex โ€” ready for Overleaf (XeLaTeX)

๐Ÿ“ธ Examples

Generated cheatsheets โ€” compiled in Overleaf with XeLaTeX:

Generated cheatsheet example 1: Mathematical Optimization

Generated cheatsheet example 3: Distributed Systems

Generated cheatsheet example 2: Machine Learning

Sample materials are available in skills/cheatsheet-generator/examples/sample_materials/ โ€” try them yourself!


โœจ Features

  • Multi-format input โ€” reads PDFs (with images/diagrams), PPTX (text + embedded media), Markdown, plain text, and images (PNG/JPG)
  • Browser-based configuration โ€” clean UI to set paper size, columns (2โ€“6), font, margins, color scheme, detail level, and select which files to include
  • 5 color schemes โ€” Classic, Ocean, Forest, Sunset, Mono โ€” all designed for print readability
  • Extreme density โ€” fills every inch of the page with color-coded, abbreviated, formula-heavy content
  • Smart organization โ€” groups by topic hierarchy, not source file order; prioritizes exam-focus topics
  • Iterative editing โ€” browser-based editor where you describe changes in plain English (or attach images); Claude applies them live
  • Image-aware โ€” upload screenshots of formulas or diagrams during editing; Claude sees and incorporates them
  • XeLaTeX-ready โ€” output compiles directly in Overleaf with custom fonts

๐Ÿš€ Quick Start

Install

npx skills add https://github.com/Evan715823/cheatsheet-generator-skill

Then install Python dependencies:

pip install flask python-pptx pymupdf

Use

  1. cd into a folder containing your course materials (PDFs, slides, notes)
  2. Run Claude Code and type:
    generate a cheatsheet for my exam based on the <your material files>
    
    Or use the slash command directly:
    /cheatsheet-generator
    
  3. A browser window opens โ€” configure your cheatsheet layout, select files, pick a color scheme
  4. Claude reads all materials and generates cheatsheet.tex
  5. Another browser window opens โ€” request edits in natural language until you're happy
  6. Upload cheatsheet.tex to Overleaf, compile with XeLaTeX

๐ŸŽจ Color Schemes

Classic Ocean Forest Sunset Mono
๐Ÿ”ต Deep blue ๐ŸŒŠ Royal blue ๐ŸŒฒ Forest green ๐ŸŒ… Burnt orange โฌ› Slate gray
Cyan / Purple Teal / Indigo Teal / Brown Crimson / Magenta Blue-gray tones
Green Sea green Olive Amber Cool gray

All schemes include yellow highlight for critical formulas.


โš™๏ธ Configuration Options

Category Options
Paper Letter, A4, A3
Orientation Landscape, Portrait
Columns 2 โ€“ 6
Font size 4 โ€“ 8 pt
Font Verdana, Arial, Helvetica Neue, Times New Roman, Courier New, CMU Serif
Margins 2 โ€“ 12 mm
Detail level Concise (bullets only), Moderate (short explanations), Detailed (derivations + examples)
Content toggles Include proofs, examples, derivations
Exam focus Free-text field to prioritize specific topics

๐Ÿ“ Project Structure

skills/cheatsheet-generator/
โ”œโ”€โ”€ SKILL.md                    # Claude Code skill definition (orchestrator)
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ config_server.py        # Phase 1: browser config form server
โ”‚   โ””โ”€โ”€ editor_server.py        # Phase 3: iterative editing server
โ”œโ”€โ”€ templates/
โ”‚   โ”œโ”€โ”€ cheatsheet_base.tex     # Parameterized LaTeX template
โ”‚   โ”œโ”€โ”€ config_form.html        # Configuration UI
โ”‚   โ””โ”€โ”€ editor_ui.html          # Editing/preview UI
โ””โ”€โ”€ examples/
    โ”œโ”€โ”€ sample_output.tex       # Reference cheatsheet (compilable)
    โ”œโ”€โ”€ sample_materials/       # Sample PDFs to try the skill
    โ””โ”€โ”€ screenshots/            # README images

๐Ÿ”ง How It Works

Phase 1 โ€” Configure

A local Flask server launches and opens a browser form. You configure layout (paper, columns, font, margins), content settings (detail level, proofs, examples), select a color scheme, and pick which files to include. Submitting writes .cheatsheet_config.json and the server exits.

Phase 2 โ€” Generate

Claude reads every selected file:

  • PDFs โ€” read directly (text + images via multimodal vision)
  • PPTX โ€” extracts text via python-pptx + all embedded images
  • Markdown/Text โ€” read directly
  • Images โ€” read directly (Claude is multimodal)

Then generates a complete cheatsheet.tex using the base template with your config values. Content is organized by topic, color-coded with semantic commands (\concept{}, \process{}, \category{}, \important{}), and packed to fill the entire page.

Phase 3 โ€” Edit

Another Flask server launches with a split-panel editor:

  • Left: LaTeX source with syntax highlighting + optional PDF preview
  • Right: natural language edit requests + image upload + change history

The server uses a blocking HTTP protocol โ€” no polling, no file watching. When you submit a request, Claude reads the current .tex, applies your change, and posts the result back. Repeat until satisfied, then click Done.


๐Ÿ’ก Tips

  • Compile with XeLaTeX in Overleaf (not pdfLaTeX) โ€” required for fontspec custom fonts
  • Exam focus field is powerful โ€” write "focus on: gradient descent, bias-variance tradeoff" and those topics get more space
  • Image upload in editor โ€” screenshot a formula from your textbook, paste/drag it into the editor, and ask Claude to add it
  • Multiple cheatsheets โ€” run the skill in different folders for different courses; each gets its own cheatsheet.tex
  • Install latexmk and pdftoppm for live PDF preview in the editor (optional)

๐Ÿ“‹ Requirements

Dependency Required Purpose
Claude Code โœ… AI engine
Python 3.8+ โœ… Server scripts
Flask โœ… Web servers
python-pptx โš ๏ธ PPTX reading (install if you have slides)
pymupdf โš ๏ธ PDF text extraction fallback
latexmk + pdftoppm โŒ Optional: live PDF preview in editor

๐Ÿ“„ License

MIT


Contributors

Evan715823MiniGrayGay

Issues