agentleFS
studiokyoungstudiokyoung/claude-skills/skills/deck/SKILL.md

deck

Skill0 starsChanged 50 days agoMITView on GitHub

Builds and updates presentation decks in one fixed form (a header label with the logo, one headline, one accent figure, dark and light pages alternating, one image, a footer with the page counter) from a short brief, with colors, fonts, logo and backgrounds injected from a per-project profile. Use when the user asks for a deck, slides, a pitch or investor presentation, a new slide for an existing deck, or two design candidates for the same slide. Writes build.cjs in a small element DSL, renders a self-contained HTML deck plus per-slide and full PDFs with Playwright, fails on text overflow or overlap, missing or broken images, page errors, fonts that do not load and Type 3 fonts, warns on form drift, draws a contact sheet, merges new pages into an existing PDF by a page map, and records the chosen lane in the person's own words. Not for PPTX, not for repairing somebody else's PDF, and not a source of facts for the copy (the brief is).

  • Installs packages

12 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use implement and review.

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.
  • Hugging FaceSkill

    implement

    Make tests pass. Invoke after /write-tests produces failing tests.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 4

    Distinctive

    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:

    Where the numbers come from: Every figure on a slide needs a source file named in the brief.

    line 74
  2. Very specific:

    Write <project>/BRIEF.md from references/BRIEF-TEMPLATE.md (eight fields) and have the user confirm it.

    line 79
  3. Distinctive:

    Not PPTX, not Keynote, not Google Slides.

    line 239
  4. Distinctive:

    Not a PDF repair tool: existing pages are copied, never edited.

    line 240
  5. Very specific:

    Not a Figma writer: references/pipeline.md records the path that exists elsewhere.

    line 241
  6. Distinctive:

    Not a copywriter: facts come from the brief with sources, or they are not on the slide.

    line 242

“Common” is measured: kept by at least 6 in 10 of the 11 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

deck

One form, any palette. Six things define the form, and a page carries the ones it needs (dividers and the close carry no image): a small header label with the logo on the right, one headline (two lines at most, the second line may carry the accent), one accent figure, pages that alternate dark and light with accent pages for dividers and the close, one image (a phone frame or a full-bleed still), and a footer rule with a label, a note and the page counter. references/form.md defines each as a helper and, where it can be measured, a lint rule. Colors, fonts, logo and backgrounds come from the project's deck.profile.json, never from this skill.

The canonical deliverable is the assembled PDF. The HTML deck is the viewing copy and the only place a video plays. Figma is not a target of this skill (see references/pipeline.md for the path that exists elsewhere).

Everything runs from references/deck-tools/. First use on a machine: cd <skill dir>/references/deck-tools && npm install && npx playwright install chromium-headless-shell (Playwright, pdf-lib and pngjs, then the headless browser, which npm install does not fetch; the second step is a no-op when the browser is already cached). Playwright is resolved from the project first, then from deck-tools.

1. Intake

Establish three things before writing anything:

  • Project folder. <project>/deck.profile.json must exist. If it does not, write this blank profile there and ask for every value; never guess a brand color:

    {
      "name": "<project>",
      "canvas": { "w": 1920, "h": 1080 },
      "palette": { "ink": "#......", "paper": "#......", "accent": "#......", "muted": "#......", "rule": "#......", "panel": "#......" },
      "fonts": { "body": { "family": "Inter", "files": { "400": "", "500": "" } }, "mono": { "family": "Space Mono", "files": { "400": "" } }, "tracking": -2 },
      "logo": "assets/logo.svg",
      "footer": { "label": "<LABEL>" }
    }

    The palette is six #rrggbb colors. Font files are static TTF or OTF only, every weight of a role or none; empty entries mean the bundled Inter and Space Mono. The logo is an SVG file that opens with <svg or <?xml and sets its colors with fill="..." attributes, because the chrome rewrites them per page: masks and gradients are not supported (their fills get rewritten too), CSS or style fills are not recolored, and the loader refuses a logo that is not such an SVG. logo may be omitted: then no logo is drawn. A deck in a script the fonts do not cover (Hangul, emoji) falls back to system glyphs and fails pdf-type3, so the profile must name a font that covers it. Add backgrounds (one image per role, dark, light, accent, baked at full size: 3200 x 1800 for a 1920 x 1080 page) and deck (total, and existing for the PDF being updated) only when the project has them; without deck.total or a page map the counter total is the slide count. The loader checks that every file the profile names exists. references/sample/ is the worked example; its profile points at its own assets, so do not copy it into a project.

  • Mode. new (a deck or slides from scratch), update (slides inserted into an existing PDF through deck.pages.json), or lanes (two models write the same slides from the same brief and the user picks).
  • Where the numbers come from. Every figure on a slide needs a source file named in the brief. No source, no number.

2. Brief

Write <project>/BRIEF.md from references/BRIEF-TEMPLATE.md (eight fields) and have the user confirm it. The brief is the only input a lane gets: profile path, the slides requested (key, number, role, position), the facts the copy may use with their sources, stills and video with the frame choice, reference images, the word budget, the rules (language, no em-dashes, no promise the screen does not make, no commits, assets stay untouched) and the deliverables.

3. Build

A build file exports one function and calls only the DSL:

module.exports = ({ dsl, profile, total }) => [
  { key: 'fx', number: 16, bg: 'dark', elements: [
    ...dsl.chrome(16, 'SECTION / TOPIC', undefined, 'Illustrative.'),
    dsl.stack('Headline', 76.8, 190, 1160, 1.2, [dsl.text('First line.', 0, 0, 1160, 110), dsl.text('Second line.', 0, 0, 1160, 110, dsl.C.accent)]),
    dsl.phone('assets/screen.png', 'LABEL'),
  ] },
];

key is a lowercase id (letters, digits, dashes) and names the slide's files. bg is a role (dark, light, accent) or a #rrggbb color. number is the printed counter: give chrome() the same value, and in update mode it must equal the page's position in the map. Asset paths are relative to the project. The full contract (elements, helpers, defaults) is in references/form.md.

  • new and update: write <project>/build.cjs yourself.
  • lanes: put the brief in place and let each lane write lanes/<lane>/build.cjs, with asset paths relative to the project as above. A lane never renders; you render both. Which model runs a lane and from where is the project's rule, not this skill's; this skill only reads the lane folders.

4. Render and validate

In update mode, write deck.pages.json (section 6) first and pass --pages, so every slide prints the merged deck's length as its total.

node <skill dir>/references/deck-tools/render.mjs --project <project> [--pages deck.pages.json] [--only key,key]

Outputs under <project>/out/: deck.html (the viewing copy), print.html (what was printed), pdf/<key>.pdf, deck.pdf, preview/<key>.png, contact-sheet.png, validation.json; the last stdout line is a JSON summary. --only renders just the named slides and removes the other slides' PDFs and previews, so render everything before a merge. --out (default out) must be new, empty or an earlier render's folder: every render writes a .deck-out marker there and removes validation.json first, so a failed run never leaves a previous ok report behind. Every flag is in references/pipeline.md.

  • Exit 0: rendered. Warnings never block; report every one (headline-count, accent-count, alternation, word-budget, local-link, map-slide-missing, and number-missing: a slide without number, so its printed counter cannot be checked).
  • Exit 1 with a one-line deck: ... message: the profile, the build, the page map, --out or the --only list is wrong, and nothing was rendered. The other files in out/ are the previous run's; do not read them as this run's result. Fix it and render again.
  • Exit 1 with validation.json written: failures (text-overflow, text-overlap, image-missing, image-broken, video-missing, number-mismatch, page-error, font-load, pdf-type3). video-missing is a video source file that does not exist (its poster still prints, so the PDF and previews look fine); number-mismatch is a printed counter that differs from the slide's number. missingAssets in validation.json lists every asset path that was not found. Fix the build and render again.
  • Exit 2: Playwright or its browser is missing, or the message is deck-tools dependencies are not installed; run: cd <tools> && npm install. Run the command the message names. A stack trace naming a missing package (ERR_MODULE_NOT_FOUND, Cannot find package) means the same thing: the first-use install above has not run.

For lanes, render each lane against the project's profile and assets into its own folder, then compare the same slide:

node <skill dir>/references/deck-tools/render.mjs --project <project> --build lanes/<lane>/build.cjs --out lanes/<lane>/out
node <skill dir>/references/deck-tools/compare.mjs <project>/lanes/<a>/out/preview/<key>.png <project>/lanes/<b>/out/preview/<key>.png --out <project>/lanes/diff-<key>.png --sheet <project>/lanes/compare-<key>.png

compare.mjs prints the changed-pixel share and PSNR, writes a magenta map of where the two differ (--out), and draws the two previews side by side (--sheet: lane a on the left, lane b on the right, each captioned with its file name; it needs the browser). Read both validation.json files.

5. Eyes

Open out/contact-sheet.png and every out/preview/<key>.png yourself and look at each page before saying anything is done: header label and logo in place and readable on the background, one headline, the accent where the brief put it, the image clipped cleanly, nothing cut at the edges, footer label, note and counter readable. A clean validation.json is not a reviewed deck. Then show the user the contact sheet (for lanes, the side-by-side lanes/compare-<key>.png and the diff map).

6. Merge (update mode)

Write <project>/deck.pages.json:

{
  "sources": { "core": "assets/core.pdf" },
  "pages": [{ "from": "core", "page": 1 }, { "slide": "open" }, { "from": "core", "page": 2 }],
  "out": "out/deck-combined.pdf"
}

sources names each existing PDF (any name but slide). A {"from","page"} entry copies that page unchanged; a {"slide":"key"} entry takes out/pdf/key.pdf. out is optional. With the slides rendered against the map (section 4):

node <skill dir>/references/deck-tools/merge.mjs --project <project> [--pages deck.pages.json]

Merge reads <project>/out/ and no other folder, so the slides must come from a render with the default --out. It refuses (exit 1, one line) a render it cannot trust: out/validation.json missing (a stale or failed run removed it), a render with failures, or a subset render made with --only. Render the whole deck until it is clean, then merge. --force merges anyway and the manifest records forced: true with the reason; use it only when the user accepts that, and say so in the delivery note. Merge also refuses an out that is one of its inputs (a source PDF or a slide PDF), so it never writes over a file it reads.

Outputs out/deck-combined.pdf (or the map's out), out/final/contact-sheet.png and out/final/manifest.json (bytes and sha256 per file, the map, the render summary, the warnings). The contact sheet is the merged PDF rasterised with PDFKit on macOS (one Swift run); elsewhere slides show their previews and original pages grey placeholders, and the manifest's thumbnails says which. Encrypted PDFs are refused; export an unencrypted copy. Open the final contact sheet and look at every page as in section 5.

The warnings print to stderr and sit in the manifest:

  • counter-mismatch: a slide prints a number that is not its position in the map. Fix the build, render and merge again.
  • existing-counters: original pages moved, so their printed counters no longer match their position. A PDF page cannot be renumbered.
  • existing-total: the deck length changed, so original pages still print the old total.
  • annotations-lost: a link on an original page did not survive the copy.
  • page-size-scaled: slide pages were scaled to the first source's page size (Chromium prints a 1920px page at 1440 x 810 pt).

Say every warning out loud in the delivery note.

7. Record

  • Lanes: when the user picks, append one line to <project>/lanes/LANES.md with the date and their words as they said them, then copy the chosen lanes/<lane>/build.cjs to <project>/build.cjs and render the project root (section 4, into the default out/); in update mode, merge after that render (section 6). The lane renders live under lanes/, and merge reads only out/.
  • Delivery: write <project>/out/final/README.txt: what changed (per page), typography (the font faces that loaded), deliverables with sizes, validation performed, known limits (every warning), and the rebuild commands.
  • Run record, last: node <skill dir>/references/record-run.mjs --skill deck --cwd <project> --json '{"verdict":"rendered","mode":"new|update|lanes","slides":<n>,"fails":0,"warns":<n>,"lane":"<lane or null>"}' (verdict is rendered only when exit was 0 and the eyes step was done; otherwise not-rendered with "reason").

Boundaries

  • Not PPTX, not Keynote, not Google Slides. The PDF is canonical.
  • Not a PDF repair tool: existing pages are copied, never edited.
  • Not a Figma writer: references/pipeline.md records the path that exists elsewhere.
  • Not a copywriter: facts come from the brief with sources, or they are not on the slide.
  • references/dead-ends.md lists what was tried and dropped (video inside the PDF, outlined text, PPTX, live gradients, variable fonts); read it before proposing any of them.

Verification (self-check before you report)

  • The profile came from the project, and no brand value was typed from memory.
  • Every number on every slide traces to a source named in BRIEF.md.
  • render.mjs exited 0 and validation.json has summary.fails: 0; every warning is listed in the report.
  • You looked at the contact sheet and every preview PNG yourself.
  • Update mode: manifest.json warnings are repeated in the delivery note.
  • Lanes: LANES.md has their words, not yours.
  • The run record was written.

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.