photos-to-pdf
Skill2 starsChanged 59 days agoMITView on GitHub
Use when combining photos/scans into a neat submission PDF.
In this repository16 other files it gives its agents.
- canvas-course-syncSkill
- categorizerSkill
- course-knowledge-baseSkill
- course-study-sessionSkill
- email-draftingSkill
- exam-prepSkill
- grade-calculatorSkill
- homework-checklistSkill
- meetings-and-clubsSkill
- note-formatting-rulesSkill
- roadmapSkill
- school-advisorSkill
- study-notes-workflowSkill
- suite-updateSkill
- verification-before-completionSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Run the script with all the HW photos → submit-ready PDF in the same folder (name it e.g.
- Very specific: line 28
Verify: render each page to PNG (page.get_pixmap() → save) and look at it — confirm nothing is rotated or clipped before telling the user …
- Distinctive: line 29
If a page turns out sideways or cropped, fix orientation/scale in the script and re-run (then re-copy to Downloads).
- Distinctive: line 34
Check EXIF orientation before trusting pixel dimensions — a "portrait" file may actually be an upright landscape shot.
- Distinctive: line 36
Always visually verify the rendered pages (vision_analyze) — a PDF that parses can still contain sideways pages.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Config: resolve
<PLACEHOLDER>tokens from~/.hermes/school-config.md(seecanvas-course-sync→ School config). Never edit SKILL.md with real values.
Photos → Neat PDF
Turn one or more photos/scans of written work into a single clean PDF for submissions (Canvas HW drops, lab reports, notes) or archival.
Script: scripts/photos_to_pdf.py
"C:/Users/<USER_NAME>/AppData/Local/hermes/hermes-agent/venv/Scripts/python.exe" \
"$SKILL_DIR/scripts/photos_to_pdf.py" "<output.pdf>" "<img1>" ["<img2>" ...]- One image per US-Letter page; page orientation follows the image (portrait img → portrait page, landscape img → landscape page).
- Applies EXIF rotation (phone vertical shots), fits the image inside 0.5" margins, centers it, and prints a small gray caption = the source filename (strips the extension) so multi-part submissions stay self-labeled.
- PNG output preserves sharpness; JPEGs/HEIC input fine via PIL.
Workflow
- File the user's work JPGs into
<Course>/Materials/Homework/HW{n}/first (seecanvas-course-syncskill). If the user also drops an AI-chat export (Gemini guide), it lives beside them as reference. - Run the script with all the HW photos → submit-ready PDF in the same folder (name it e.g.
<COURSE_CODE> - HW1 Submission.pdf). - Copy the finished PDF into
C:/Users/<USER_NAME>/Downloads/— the user uploads/submits from Downloads (explicit preference). Keep the archive copy inHW{n}/so it's recoverable; refresh the Downloads copy whenever the PDF is regenerated. - Verify: render each page to PNG (
page.get_pixmap()→ save) and look at it — confirm nothing is rotated or clipped before telling the user it's ready to submit. - If a page turns out sideways or cropped, fix orientation/scale in the script and re-run (then re-copy to Downloads).
Pitfalls
- PIL + PyMuPDF live in the Hermes venv python (
C:/Users/<USER_NAME>/AppData/Local/hermes/hermes-agent/venv/Scripts/python.exe), not the system python. - Check EXIF orientation before trusting pixel dimensions — a "portrait" file may actually be an upright landscape shot.
- Blurry/pixelated output = the embed got downsampled; embedded pixels must stay at source resolution (verify
page.get_images()dims match the source). Display size ≠ pixel size - only resize for display, never for storage. - Always visually verify the rendered pages (vision_analyze) — a PDF that parses can still contain sideways pages.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

