cheatsheet

A command that creates a one-page exam reference sheet from course materials and an error log. It gathers common patterns, final formulas, and the user's recurring mistakes, then can also make a PDF.

In plain words
What is it for?
Use it to prepare a quick exam reference from course indexes, formula notes, coverage summaries, and logged errors. The output is saved as cheatsheet/final.md and can optionally be converted to PDF.
Why use it?
It saves time spent searching through notes and keeps the most relevant study material in one compact document. It also includes corrections for mistakes that have appeared before.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/optimeta/paideia/cheatsheet
Clone the repo
git clone --depth 1 https://github.com/OPTIMETA/PAIDEIA
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,669 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00029 $0.01669
Opus 5 $0.00015 $0.00834
Sonnet 5 $0.00006 $0.00334
Haiku 4.5 $0.00003 $0.00167

Measured 3d ago against content hash 2fc5b5c9b2db, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

cheatsheet scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

`brew install font-nanum` / `sudo apt-get install fonts-nanum`, or keep the
plugins/paideia/commands/cheatsheet.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Output language

Read INTERFACE_LANG from .course-meta (default en). All user-facing prose — chat output, clarification questions, and narrative sections of any MD file you write (including the cheatsheet's prose) — must be in that language. Keep in English regardless: file paths, slash command names, pattern IDs (P1, P2…), YAML keys, LaTeX, code, and the literal section anchors downstream tools regex on.

Load skills/exam-drill/SKILL.md. Read course-index/patterns.md, course-index/coverage.md, course-index/summary.md, and errors/log.md.

Arguments: $ARGUMENTS

Procedure:

  1. Collect highest-value items:

    • Top 5 patterns by frequency of appearance (from patterns.md)
    • All formulas boxed in derivations/*.md (final results)
    • User's most-frequent error types (from errors/log.md) — with the correction, not the error
    • ⚪ no-HW sections (and any ⚠weak-flagged §) with one key formula each — never drilled, so reference-grade only
  2. Structure the cheatsheet (target: fits on 1 page @ 10pt):

    # <Course name> — Cheatsheet
    
    _Generated <date>. For exam reference only._
    
    ## Core formulas
    <table or compact list of boxed results from derivations/>
    
    ## Pattern quick-ref
    | Pk | Recognition | Move |
    |---|---|---|
    ...top 8 patterns only
    
    ## Traps to remember (from my errors/log)
    - <correction 1>
    - <correction 2>
    ...max 5
    
    ## No-HW formulas (memorize these — ⚪ sections no HW drilled)
    <one formula per ⚪ section, boxed>
    
  3. Write to cheatsheet/final.md.

  4. If --pdf in arguments:

    • Load skills/pdf/SKILL.md
    • Convert cheatsheet/final.md to cheatsheet/final.pdf using reportlab
    • Use 2-column layout, 9pt font, no margins (for maximum density)
    • Remember: NO Unicode subscripts/superscripts in reportlab — use <sub>/<super> XML tags
    • CJK fonts (required when INTERFACE_LANG=ko). reportlab's built-in Type-1 fonts (Helvetica/Times) cannot render Hangul — every Korean glyph silently comes out blank, so a ko cheatsheet PDF would be empty of prose. Register a CJK-capable TrueType font first and use it for every style (fontName=). reportlab's TTFont only parses TrueType (glyf) outlines — a CFF/OpenType-flavoured .ttc/.otf raises on registration. macOS AppleSDGothicNeo.ttc is CFF on recent macOS, so it reliably throws and the loop falls through to the next candidate; that's expected, not an error. Probe these in order (glyf-loadable Hangul fonts first) and keep the first that registers:
      from reportlab.pdfbase import pdfmetrics
      from reportlab.pdfbase.ttfonts import TTFont
      KFONT, candidates = "Helvetica", [
          "/System/Library/Fonts/Supplemental/AppleGothic.ttf",    # macOS (glyf — loads)
          "/usr/share/fonts/truetype/nanum/NanumGothic.ttf",       # Ubuntu (fonts-nanum)
          "/opt/homebrew/share/fonts/NanumGothic.ttf",             # macOS Homebrew font-nanum
          "/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc",# Noto CJK
          "/System/Library/Fonts/AppleSDGothicNeo.ttc",            # macOS (CFF — usually fails; last resort)
      ]
      for cand in candidates:
          try:
              pdfmetrics.registerFont(TTFont("KFont", cand)); KFONT = "KFont"; break
          except Exception:
              continue
      
      If none is found on a ko course, tell the user (in INTERFACE_LANG) to brew install font-nanum / sudo apt-get install fonts-nanum, or keep the .md and read it directly — don't ship a blank-glyph PDF.
    • Glyph coverage — keep \ell as , don't downgrade to l. In the LaTeX→text pass, map \ell to the real U+2113 ℓ (the angular-momentum symbol, all over central-force formulas) — not to an ASCII l. CJK fonts almost always carry ℓ (AppleGothic, Nanum and Noto all do), so the glyph renders; silently rewriting \elll makes ℓ²/(2μr²) read like a lowercase L and is the more common failure here than a missing glyph. Only fall back to italic l if the registered font truly lacks the glyph — test it (a present glyph maps to a non-zero id; 0 is .notdef):
      from reportlab.pdfbase.pdfmetrics import getFont
      def has_glyph(ch):
          if KFONT == "Helvetica": return False
          return getFont(KFONT).face.charToGlyph.get(ord(ch), 0) != 0
      ELL = "ℓ" if has_glyph("ℓ") else "<i>l</i>"   # use ELL wherever \ell / ℓ appears
      
    • Use pypandoc if available as alternative: pypandoc.convert_file('final.md', 'pdf', outputfile='final.pdf') (its LaTeX engine needs a CJK-aware mainfont, e.g. -V mainfont='Apple SD Gothic Neo', for Korean too)
    • Build with a scratch script outside the course folder. Don't write the reportlab build script into cheatsheet/ — it gets left behind in the user's committed course folder when the post-run cleanup is skipped. Put it in a temp path instead (e.g. SCRIPT=$(mktemp /tmp/paideia-cheatsheet-XXXX.py)), run it from there to emit cheatsheet/final.pdf, then delete it. If you do write one inside cheatsheet/ anyway, remove it after the PDF is verified — cheatsheet/ should end with only final.md and final.pdf.

Read the full file on GitHub · 117 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 117 lines · 29 tokens per session scan B 2fc5b5c9b2db

Subscribe to this mod's changes

cheatsheet is a command published in the GitHub repository OPTIMETA/PAIDEIA (91 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 1,669 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.