agentleFS
alvaroofernaandezalvaroofernaandez/dotfiles/skills/pdf-report/SKILL.md

pdf-report

Skill5 starsChanged 3 days agoMITView on GitHub

Generic print-grade A4 PDF documents (reports, analyses, manuals, memos) via headless Chromium with layout guards. Use for 'hazme un PDF', 'documento imprimible'.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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
  1. Distinctive:

    Do not use it for slide decks, web pages, or anything the reader will scroll.

    line 18
  2. Very specific:

    Lead with the answer: Every section opens with an .answer block stating the conclusion.

    line 52
  3. Distinctive:

    One idea per block: If a panel needs three paragraphs, it is two panels.

    line 57
  4. Distinctive:

    Numbers carry their method: Every estimate states its basis somewhere in the doc.

    line 58
  5. Very specific:

    Never solve an overflow by trimming words.

    line 70
  6. Distinctive:

    Do not invent values to fill a component.

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

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

PDF Report

Produces A4 PDFs that read like consultancy work: dense with data, scannable without effort, and branded with a real visual identity. The output is print-grade, not a web page saved as PDF.

When to use

Any deliverable that leaves the organization as a document: internal reports for partners, client proposals, budgets, technical analyses, dossiers, one-pagers.

Do not use it for slide decks, web pages, or anything the reader will scroll.

Quick path

aval pdf init <ruta>/propuestas/<nombre> \
  --brand-dir <ruta-a-tus-imagenes-de-marca> --people person-1,person-2
cd <ruta>/propuestas/<nombre>
# edit informe.html, then:
node render.mjs

aval pdf init copies the template, the renderer and a DESIGN.md, then builds assets/brand.css (fonts, logos, portraits, 40 Lucide icons, all base64) and installs Playwright. The brand directory is a parameter: it holds logo.png, banner.png and one <name>.jpg per portrait, and nothing about it is baked into this skill. The HTML is self-contained afterwards: no network at print time.

Then iterate: edit informe.html, run node render.mjs, read the guards, fix, repeat.

The three rules

  1. Never edit the <style> block. It is the design system, extracted from a validated document. Structure goes in the body; if you need a new component, add it to references/components.md first so the next document inherits it.
  2. Every guard must read none before you ship. They are in render.mjs and they catch what reviewing thumbnails does not. Details in references/guards.md.
  3. Verify on the rendered PDF, not the preview. pdftoppm -f N -l N -r 130 -png out.pdf /tmp/check then read the image. The browser preview and a PDF viewer do not always agree.

Writing for readers who will not read

The audience is technical and impatient. Structure carries more than prose.

  • Lead with the answer. Every section opens with an .answer block stating the conclusion. The reasoning comes after, for whoever wants it.
  • Fixed shapes beat free prose. Module cards always run Qué hace / Esfuerzo / La trampa / Decisión, in that order, so three of them can be compared diagonally.
  • Tables over paragraphs whenever the content has more than one dimension.
  • One idea per block. If a panel needs three paragraphs, it is two panels.
  • Numbers carry their method. Every estimate states its basis somewhere in the doc.

Copy rules: no em dashes, no marketing verbs (potenciar, impulsar, revolucionar), no adjectives doing the work of evidence. Spanish copy is neutral Spanish, tuteo with no voseo, per the global rules.

Page budget

One page is one argument. If a page holds two, split it; if it holds half, merge it or give it real content. Add class="dense" to a .page that carries a long table plus panels: it tightens spacing without touching hierarchy or colour.

Never solve an overflow by trimming words. Reflow rarely removes a line. Use dense, or move content to another page.

Figures and sources

The template is built for documents that carry data, so the layout assumes numbers are present: figure blocks, total rows and meters all exist in the catalogue. Whatever the subject, every figure states where it comes from. Put the basis in the document — a method note, a source line, a footnote — rather than leaving a number unattributed.

Do not invent values to fill a component. If a figure is not available, remove the block or mark it as pending; a placeholder that looks like data is worse than an empty slot.

References

FileRead it when
references/components.mdBuilding any page: the copy-paste catalogue
references/guards.mdA guard fires and you need to know what it means
references/DESIGN.template.mdStarting a project (aval pdf init copies it for you)

Known traps

These cost real debugging time. They are already handled in the template; do not undo them.

  • Google Fonts subsets. Taking only the first woff2 from the CSS API drops accents, ñ and €. aval pdf assets embeds every subset with its unicode-range.
  • strong on dark surfaces. A global strong { color: var(--ink) } makes bold text vanish on .panel-ink and .answer. The override is in the stylesheet.
  • Variant specificity. .gantt .bar (0,2,0) beats .b-ghost (0,1,0). Declare bar variants at the same specificity as the base.
  • Portraits. The circle is baked into the PNG, not applied with border-radius + cover: some PDF viewers resolve that clip wrong and show the sitter's chest.
  • Gradients and the contrast guard. Gradients are background-image and cannot be read from the tree. .cover and .closing declare their lightest stop via data-bg. Over the brand gradient, small white text needs at least 75% opacity to pass AA.

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.