/padhai:padhaifrom padhai
Generates exam-ready university notes as a master-solution PDF from a syllabus and optional previous-year questions. Works for any university, board, or autonomous college.
Ships in padhai. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Padhai turns one unit's syllabus (plus optional previous-year questions) into a master-solution PDF: every likely exam question with a complete, mark-worthy answer, in a clean black-and-white exam format, with diagrams, worked numericals and a rapid revision sheet.
The student must be able to study only this PDF and walk into the exam ready. Quality bar: better than paid guidebooks. Accuracy matters more than speed.
Read these references when you reach the step that needs them:
| File | Read it when |
|---|---|
references/inputs.md | Step 1: collecting and checking what the student gave |
references/answer-writing.md | Steps 3 and 6: choosing questions, writing answers |
references/format.md | Step 6: the exact markup for every element |
references/figures.md | Step 5: making diagrams and charts |
references/quality.md | Steps 4, 7 and 8: verification and the final checklist |
examples/ml-unit3-classification/ | Any time: a complete, real unit (15 questions) to imitate |
Scripts live in scripts/ (paths below are relative to this skill folder):
build.py (HTML + PDF), check.py (lint), qa.py (contact sheets to look at), fig_lib.py (figure helpers), render_math.js (offline maths).
Required: subject name, unit name/number, and the syllabus text of the unit (its topics and sub-topics).
Optional (ask once, all together; never block on them):
If the syllabus is missing, stop and ask for it. A unit name alone ("Unit 3 DBMS") is not enough: the same title means different topics at different universities. If the student cannot get it, draft a topic list from the unit title, show it, and write nothing until they confirm or edit it.
If you work unattended (no one to answer), use what you have, state the reading you took at the top of your reply, and continue.
Details and edge cases: references/inputs.md.
pip install beautifulsoup4 matplotlib numpy pillow # required
pip install pypdf pymupdf # optional: page count, faster QA
cd <skill>/scripts && npm install katex # optional: offline maths (needs Node.js)
PDF output needs any Chromium-family browser (Chrome, Edge, Chromium, Brave); build.py finds it. Without one, the HTML file is the deliverable and the student prints it to PDF from any browser.
Create a unit folder in the working directory (e.g. dbms-unit3/) and copy assets/config.example.json into it as config.json.
No code execution available (plain chat)? Follow the same method and write the notes as clean Markdown using the same structure (numbered questions with [marks] [PYQ: date] tags, tables, "Step N:" lists, Exam Tip and Memory Hook blocks, revision sheet). Draw diagrams as simple text/Mermaid blocks. Check every number by working it twice.
Show the student the planned list (number, question, marks, PYQ/Expected) in one short message. In an interactive session, continue unless they object; do not wait for approval.
calc.py in the unit folder): numerical answers, worked examples, tables of values, example datasets. Never write a number you did not compute or copy from the question.Write figs.py (or several f1.py, f2.py, …) in the unit folder using scripts/fig_lib.py. Every long answer that explains a structure, process, architecture, cycle, comparison or curve gets a figure. Then look at every figure: run python <skill>/scripts/qa.py figs <unit> and open the sheet images. Fix every overlap, clipped label or arrow through text, then re-run. Rules: references/figures.md.
Write the parts as 01_<name>.html, 02_<name>.html, … in the unit folder, using only the markup in references/format.md (copy patterns from the example unit). The build adds the header table, the free-notes notice, question index, Q/Ans boxes, "Step N:" numbering, Sr. No. columns and page headers automatically, so you write content, not layout.
Core rules (full guide: references/answer-writing.md):
python <skill>/scripts/check.py <unit> # fix every ERROR; read every WARN
python <skill>/scripts/build.py <unit> # -> <unit>/<output>.html and .pdf
python <skill>/scripts/qa.py pdf <unit>/<output>.pdf # contact sheets in <unit>/qa/
Open and look at every contact sheet, and at any suspicious page with qa.py page <pdf> <n>. Fix and rebuild until clean: formulas overflowing their box, tables running off the page, figures with overlapping text, a heading stranded at a page bottom, blank pages, raw $ or LaTeX visible, missing figures.
Run the checklist in references/quality.md (every syllabus item answered, every PYQ present once with all its dates, every number traced to calc.py, every figure looked at). Then give the student the PDF (and the HTML) with a short note:
One unit per PDF. For the next unit, reuse the same folder layout and config.
assets/config.example.json (opens in a new tab)assets/fig_example.py (opens in a new tab)assets/part_template.html (opens in a new tab)assets/qr.svg (opens in a new tab)assets/style.css (opens in a new tab)examples/ml-unit3-classification/01_partA.html (opens in a new tab)examples/ml-unit3-classification/02_partB.html (opens in a new tab)examples/ml-unit3-classification/03_partC.html (opens in a new tab)examples/ml-unit3-classification/04_partD.html (opens in a new tab)examples/ml-unit3-classification/05_partE.html (opens in a new tab)examples/ml-unit3-classification/06_rev.html (opens in a new tab)examples/ml-unit3-classification/README.md (opens in a new tab)examples/ml-unit3-classification/calc.py (opens in a new tab)examples/ml-unit3-classification/config.json (opens in a new tab)examples/ml-unit3-classification/fig/bayes.svg (opens in a new tab)examples/ml-unit3-classification/fig/cm2.svg (opens in a new tab)examples/ml-unit3-classification/fig/cm3.svg (opens in a new tab)examples/ml-unit3-classification/fig/imb.svg (opens in a new tab)examples/ml-unit3-classification/fig/kcurves.svg (opens in a new tab)examples/ml-unit3-classification/fig/knn.svg (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub krishnanaicker/padhai --plugin padhaiOther plugins' skills for the same job