agentleFS
Faaz17Faaz17/Agents-and-Skills/skills/documents/make-pdf/SKILL.md

make-pdf

Skill1 starsChanged 3 months agoMITView on GitHub

Turn a Markdown report into a clean, branded A4 PDF the president can read or print. Use whenever the user asks for a report/summary/proposal "as a PDF" or "to read properly". Works fully offline on Windows using pandoc + headless Chrome/Edge — no LaTeX or extra installs needed.

  • Deletes or force-pushes

12 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use gstack-upgrade, codex and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CodeWithBehnamSkill

    gstack-upgrade

    Upgrade gstack to the latest version. Detects global vs vendored install, runs the upgrade, and shows what's new.

    Also in 3 projects that use this

  • tygwanSkill

    codex

    Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

    Also in 3 projects that use this

  • SentrySkill

    spec

    Produce a verified spec — problem, desired outcome, and acceptance criteria — before building. Use when given a GitHub/Linear issue link, when starting from a fuzzy in-conversation idea, or asked to "figure out what to do" / "scope this" / "what should I build" — whenever the *what* isn't yet pinned down. Grills the ambiguities, checks the premise against the code, and produces acceptance criteria you sign off on — then hands to design-first.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run from the society root (Scoiety Folders/).

    line 14

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Make a PDF

Renders Markdown → styled HTML (pandoc) → PDF (headless Chrome). Produces society-branded A4 output with a title page, table of contents, and per-section page breaks. No internet, no LaTeX required.

The two-step pipeline

Run from the society root (Scoiety Folders/). Give your report YAML metadata at the top so the title page renders:

---
title: "Report Title"
subtitle: "A subtitle in small-caps"
author: "For <Person Name>, President 2026/27"
date: "1 July 2026"
---
# First Heading
...

Step 1 — Markdown → standalone HTML (CSS embedded):

pandoc "MyReport.md" -o "MyReport.html" -s --toc --toc-depth=1 \
  -c ".claude/skills/make-pdf/report.css" --embed-resources --standalone

Step 2 — HTML → PDF via headless Chrome:

CHROME="/c/Program Files/Google/Chrome/Application/chrome.exe"   # or Edge (see below)
UDD="$TMPDIR/ea_chrome_pdf_$$"
"$CHROME" --headless=new --disable-gpu --no-first-run --no-pdf-header-footer \
  --user-data-dir="$UDD" --virtual-time-budget=15000 \
  --print-to-pdf="<project>/MyReport.pdf" \
  "file:///<project>/MyReport.html"
rm -rf "$UDD"

Edge works identically — swap the executable: /c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe.

Gotchas (learned the hard way)

  • --print-to-pdf MUST be an absolute path. A relative path resolves against Chrome's own directory and fails with "Access is denied." Use the full C:/Users/.../file.pdf form (forward slashes are fine on Windows).
  • The input is a file:// URL with spaces percent-encoded (%20).
  • Use a throwaway --user-data-dir so it never collides with an open browser window (otherwise headless may attach to the running profile and skip printing).
  • --no-pdf-header-footer removes Chrome's default URL/date header/footer; page margins come from @page in report.css.
  • --toc-depth=1 lists only top-level sections; raise it for finer contents.

Verify

python -c "import re;d=open('MyReport.pdf','rb').read();print('pages~',len(re.findall(rb'/Type\s*/Page[^s]',d)),d[:8])"

Expect %PDF-1.4 and a sensible page count. Clean up the intermediate .html afterwards; keep the .md (editable source) and .pdf (deliverable).

Styling

report.css carries the society palette (ink #14202B, brass #A6803C, ECT-blue #11487E). Edit it to restyle every report at once. It targets pandoc's default HTML structure: header#title-block-header, nav#TOC, and h1/h2/h3.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.