Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

feat(skills): run the pptx and artifact skills at high reasoning effort

Ethan317028324f2f
diff --git a/apps/teamhub/internal/skill/builtin_catalog_test.go b/apps/teamhub/internal/skill/builtin_catalog_test.go
index 47923142..59b40f73 100644
--- a/apps/teamhub/internal/skill/builtin_catalog_test.go
+++ b/apps/teamhub/internal/skill/builtin_catalog_test.go
@@ -199,7 +199,7 @@ func assertImportedBuiltinSkillDefaults(t *testing.T, catalog builtinCatalog) {
adapted := map[string]string{
"simplexai_builtin_docx": "1.0.0",
"simplexai_builtin_pdf": "1.0.0",
- "simplexai_builtin_pptx": "1.0.3",
+ "simplexai_builtin_pptx": "1.0.4",
"simplexai_builtin_xlsx": "1.0.0",
"simplexai_builtin_skill_installer": "1.0.0",
}
diff --git a/skills/builtin/artifact/1.0.3/SKILL.md b/skills/builtin/artifact/1.0.3/SKILL.md
new file mode 100644
index 00000000..ca758f8d
--- /dev/null
+++ b/skills/builtin/artifact/1.0.3/SKILL.md
@@ -0,0 +1,223 @@
+---
+name: artifact
+description: Make a designed file people keep, share, print or present - a poster, flyer, invitation, announcement, one-pager, infographic, visual report or summary page, explainer, landing page, or a dashboard or interactive tool meant to be opened outside this conversation. Use it when the user asks for such a piece by name ("a poster for the hiring push", "a one-pager on Q3"), when the work is finished output meant for other people (a team, a manager, a meeting, a channel), or when the user asks for a file, page or link. Something to look at or use right here in the chat, now (a quick chart, dashboard, checklist or small tool), is not a file - send it inline as a chat card with the chat-card skill instead. Slide decks, Word documents and spreadsheets use their own skills. Builds one self-contained HTML file and covers the treatment, responsive or fixed-canvas layout, design fundamentals, and a render check.
+effort: high
+---
+
+# Designed visual pieces
+
+## When to make one
+
+Make the piece when:
+
+- the user asks for it by name ("a poster for the hiring push", "a one-pager
+ on Q3");
+- a visual page would be clearer than a chat reply: numbers to compare, a
+ process to show, an overview to scan;
+- the result is finished work for other people, such as an update for the
+ team, a summary for a manager or the case for a decision, also when the
+ request is phrased as a question;
+- the request names who will see it or where it goes (a meeting, a channel,
+ the whole company);
+- people will use it rather than only read it: fill it in, track progress,
+ check live numbers.
+
+When the user only wants your answer or opinion, or the result may be passed
+on but nothing says so, reply in the chat and offer the piece in one line.
+When the person wants to see or use the piece right here in the chat, now,
+do not make a file: send it inline as a chat card (see the chat-card skill).
+Writing that people will keep editing as text (a memo, a plan, meeting notes)
+goes into a document; pieces made to be looked at or used come here.
+
+Build it as one HTML file, because it previews anywhere and can be printed or
+turned into an image, and talk to the user about the piece.
+
+The piece may be opened in a narrow preview pane, a browser, or a phone. It
+must look deliberate at every width and never need sideways scrolling.
+
+## The file
+
+Write one self-contained `.html` file: a full document (`<!doctype html>`,
+`<meta charset="utf-8">`, a viewport meta, `<title>`), with its CSS and JS
+inline. Embed images as `data:` URIs or keep them next to the file and use
+relative paths. Load a library from a CDN only when it does real work (a chart
+or map library), pinned to an exact version.
+
+## Start from the user's own material
+
+Before designing, use your workspace tools (the documents and files available
+to you, and the user's knowledge search; see the `teamhub-files` skill and
+your instructions) to check what the user already has:
+
+- brand guidelines, logos, colors, fonts and templates;
+- documents and data about the topic;
+- photos of the company, team or product.
+
+Knowledge search covers text only, so look for images and design files among
+the files. Count content only if it is about the same topic and period; the
+organization's own brand guidelines, logos, colors, fonts and photos count for
+any piece made for that organization. Build the piece with what you find.
+
+## 1. Choose the treatment
+
+Decide what the page is for before designing it.
+
+- **Document pages** (report, memo, plan, explainer): calm and readable. Real
+ type hierarchy, considered spacing, a restrained palette, no big hero.
+- **Showcase pages** (landing page, poster, invitation, announcement): a
+ distinct visual identity with one bold idea, kept quiet around it.
+- **Tools and dashboards**: information design first. Summary before detail;
+ state shown by form (chips, colored markers) as well as numbers; controls
+ that look clickable; open in a realistic working state with real or clearly
+ marked example data. Semantic colors (good, warning, critical) are separate
+ from the accent.
+
+When the user or their organization already has a design system or brand
+(logo, colors, fonts, a template), apply it; the user's own words come first,
+then that system, then your choices. Ground every other choice in the
+subject: its own materials, terms and units, and include at least one detail
+only this subject would have (its real units and scales, its document
+conventions, its terms of art) as content, not ornament. Use real content;
+never use placeholder text.
+
+## 2. Layout that fits any width
+
+Decide the layout by how the piece is seen. A piece taken in as one composed
+frame, where the arrangement itself is the design and people will screenshot,
+print, project or forward it as an image, uses a **fixed canvas**: design at
+one size and scale the whole frame to the window. Choose the ratio from where
+it will be seen: 4:5 or 1:1 for chat and phones, 16:9 for screens, a paper
+size for print. A piece that is read, scrolled or operated uses a **fluid
+page** that reflows to any width.
+
+A **fluid page**:
+
+- Works from about 360 px (phone, narrow side panel) to wide desktop. The page
+ body never scrolls horizontally.
+- Side padding of at least 16 px at every width; running text about 60–75
+ characters wide (`max-width` in `ch` or `rem`).
+- Build rows with flex or grid and `gap`; let them wrap or stack to one column
+ when narrow (`grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr))`
+ or a media query). Give text-holding flex/grid children `min-width: 0`.
+- Relative units; `max-width: 100%` on images, video and fixed-ratio boxes;
+ nothing with a `min-width` wider than a phone.
+- Only wide tables, code and diagrams may be wider, each inside its own
+ `overflow-x: auto` wrapper.
+- Size type with `clamp()` so big numbers and headings shrink on small screens.
+
+A **fixed canvas**: design at the real size (e.g. 1080 × 1350 px for 4:5, or
+297 × 420 mm for A3) inside one stage element, and scale the whole stage to
+the window so it always fits without scrolling sideways:
+
+```html
+<div class="stage-wrap"><div class="stage" id="stage">…</div></div>
+<style>
+ html, body { margin: 0; }
+ .stage-wrap { width: 100%; overflow: hidden; }
+ .stage { width: 1080px; height: 1350px; transform-origin: top left; }
+ @media print { .stage { transform: none !important; } .stage-wrap { height: auto !important; } }
+</style>
+<script>
+ const stage = document.getElementById("stage");
+ function fit() {
+ const s = Math.min(1, document.documentElement.clientWidth / stage.offsetWidth);
+ stage.style.transform = `scale(${s})`;
+ stage.parentElement.style.height = stage.offsetHeight * s + "px";
+ }
+ addEventListener("resize", fit); fit();
+</script>
+```
+
+## 3. Design fundamentals
+
+- **Plan first, in tokens.** Before writing the page, put the design in a
+ `:root` block at the top of the style: 4–6 named colors, 2–3 font roles, a
+ spacing unit, and a one-line comment above it naming the layout concept.
+ Check the plan against the subject: any part that would fit any similar page
+ is a generic default, so change it in the plan before building. Derive
+ everything from the tokens.
+- **Both themes.** Define light values on `:root` and dark values under
+ `@media (prefers-color-scheme: dark)`, with `color-scheme` set; give `body`
+ an explicit background. Design the dark theme with the same care rather
+ than inverting the light one: keep contrast readable and the accent working
+ on both backgrounds. A design that deliberately has one look (a dark event
+ poster) may skip dark mode but still sets every color explicitly.
+- **Neutrals with intent**: greys slightly tinted toward the accent, not pure
+ mid-grey. One accent, used for what the reader must notice.
+- **Type**: pair a display face with a body face (Google Fonts or a system
+ stack with real fallbacks); keep a type scale; `text-wrap: balance` on
+ headings; letter-spacing on uppercase labels; `tabular-nums` where digits
+ line up.
+- **Consistency**: repeated cards, rows and badges share edges, padding and
+ baselines; content sets heights; no card left alone in a row or stretched
+ over empty space. Use borders, fills and shadows only to set off what needs
+ it, not on every block. Lead with big-number tiles only when those figures
+ are the point of the piece.
+- **Charts** drawn to one scale, with every tick label naming a value the
+ chart reaches, colors from the tokens, and marks and labels inside the
+ bounds. Structure (numbering, dividers, labels) only when it says something
+ true, such as a real sequence.
+- **Complete at rest**: everything meant to be read is visible once the page
+ loads, with no scrolling or animation needed to reveal it; previews and
+ thumbnails show only that first frame. Animate from a visible resting state,
+ never from `opacity: 0`, and size a hero to its content instead of `100vh`.
+- **Motion with purpose**: one orchestrated moment (a load sequence, a hover
+ detail) works better than scattered effects; often none is best.
+- **Copy**: plain, specific, active; name things as the reader knows them.
+ Write in short, direct sentences, free of mannered devices such as asides
+ set off by dashes, "not X but Y" framing, colon-then-reveal lines, scare
+ quotes and stock phrases.
+- **Avoid the stock AI look**: cream background with serif and terracotta,
+ black with one neon accent, broadsheet hairlines with dense columns,
+ purple-to-blue gradient heroes, Inter or Space Grotesk as the safe choice,
+ emoji as section markers, everything centered, the same rounded card
+ everywhere, accent bars on rounded cards. Follow the user's direction
+ exactly when they give one.
+- **Build cleanly**: valid markup, visible keyboard focus, respect
+ `prefers-reduced-motion`, no element overlapping another, and selectors
+ that do not cancel each other's spacing.
+- **Credit sources**: every number and every image not made by the user has
+ a short source line.
+
+## 4. Check once, then deliver
+
+Render the page headless at a narrow and a wide width, in light and dark, and
+look at each screenshot once. Use a screenshot tool your environment already
+has, or Playwright for Python: the `playwright` package is small, so add it to
+your Python environment when it is missing. Its browser is a separate, large
+download kept in a shared cache; use it when it is already there (check with
+`playwright install --dry-run chromium` or by launching it), and otherwise
+follow "When no browser is available" below. Launch the browser only through
+Playwright, which keeps it away from the system keychain; never run a browser
+executable directly.
+
+```python
+from playwright.sync_api import sync_playwright
+with sync_playwright() as p:
+ b = p.chromium.launch() # headless
+ for w, scheme in [(390, "light"), (1280, "light"), (1280, "dark")]:
+ pg = b.new_page(viewport={"width": w, "height": 900}, color_scheme=scheme)
+ pg.goto("file://<absolute path to page>.html")
+ print(w, scheme, "overflow:", pg.evaluate("document.documentElement.scrollWidth > innerWidth"))
+ pg.screenshot(path=f"<dir>/check-{w}-{scheme}.png", full_page=True)
+ b.close()
+```
+
+Check: no sideways overflow, nothing clipped or overlapping, text readable in
+both themes, the layout stacks sensibly at 390 px, charts and images intact.
+Make one round of fixes, then deliver.
+
+**When no browser is available**, keep going without downloading one yourself
+(it is a large download stored outside the workspace and can trigger system
+prompts). Check the source instead: no fixed widths wider than a phone,
+no `min-width` beyond the screen, wide content in its own scroll container,
+every color from the tokens in both themes, and the scaling script present on
+a fixed canvas. Deliver the piece, say that it was checked in the source but
+not rendered, and suggest a one-time setup so later pieces can be checked
+visually, with the reason:
+
+> To let me preview pages at phone and desktop width before handing them
+> over, install Playwright once: `pip install playwright` then
+> `playwright install chromium` (about 150 MB). It renders the page off
+> screen, catches layouts that break on narrow screens, and needs no further
+> setup.
diff --git a/skills/builtin/catalog.yaml b/skills/builtin/catalog.yaml
index 88884513..56e7d14d 100644
--- a/skills/builtin/catalog.yaml
+++ b/skills/builtin/catalog.yaml
@@ -103,11 +103,14 @@ skills:
version: 1.0.0
package_path: builtin/canvas/1.0.0
- skill_id: simplexai_artifact
- bootstrap_manifest_id: skill_manifest_simplexai_artifact_1_0_2
+ bootstrap_manifest_id: skill_manifest_simplexai_artifact_1_0_3
default_agent_types:
- anotherme
- general
manifests:
+ - manifest_id: skill_manifest_simplexai_artifact_1_0_3
+ version: 1.0.3
+ package_path: builtin/artifact/1.0.3
- manifest_id: skill_manifest_simplexai_artifact_1_0_2
version: 1.0.2
package_path: builtin/artifact/1.0.2
@@ -169,7 +172,7 @@ skills:
version: 1.0.0
package_path: builtin/pdf/1.0.0
- skill_id: simplexai_builtin_pptx
- bootstrap_manifest_id: skill_manifest_simplexai_builtin_pptx_1_0_3
+ bootstrap_manifest_id: skill_manifest_simplexai_builtin_pptx_1_0_4
default_agent_types:
- anotherme
- general
@@ -186,6 +189,9 @@ skills:
- manifest_id: skill_manifest_simplexai_builtin_pptx_1_0_3
version: 1.0.3
package_path: builtin/pptx/1.0.3
+ - manifest_id: skill_manifest_simplexai_builtin_pptx_1_0_4
+ version: 1.0.4
+ package_path: builtin/pptx/1.0.4
- skill_id: simplexai_builtin_skill_installer
bootstrap_manifest_id: skill_manifest_simplexai_builtin_skill_installer_1_0_0
default_agent_types:
diff --git a/skills/builtin/pptx/1.0.4/SKILL.md b/skills/builtin/pptx/1.0.4/SKILL.md
new file mode 100644
index 00000000..fcb177d4
--- /dev/null
+++ b/skills/builtin/pptx/1.0.4/SKILL.md
@@ -0,0 +1,238 @@
+---
+name: pptx
+description: Create a new PowerPoint PPTX deck with PptxGenJS, to a professional visual standard. Use whenever a new slide deck is a deliverable. Covers the workflow from material and research to a per-slide brief, tested layouts and palettes, the design rules (images, charts, diagrams) and slide-by-slide render checks.
+effort: high
+---
+
+# PowerPoint decks
+
+A finished deck must look rich and professional: every slide carries a real
+visual, not just a title and bullets. Read this whole file before building.
+
+## Runtime
+
+Install PptxGenJS into the current Context's `./agent` folder:
+
+```bash
+npm --prefix ./agent install pptxgenjs
+```
+
+This skill's folder holds `scripts/deck_template.js` (the starting script,
+with the shared title bar, footer and card helpers), `scripts/check_deck.js`
+(a content check), and in `references/` the tested slide layouts
+(`layouts.md`), the palettes (`palettes.md`) and PptxGenJS usage
+(`pptxgenjs.md`). Copy the template into `./playground/<scope>/` and run
+scripts from the Context workspace:
+
+```bash
+NODE_PATH="$(pwd)/agent/node_modules" node ./playground/<scope>/deck.js ./playground/<scope>/<Deck>.pptx
+```
+
+Keep work under `./playground/<scope>/`.
+
+## Workflow
+
+The brief decides the content: topic, audience, slide order and facts. These
+steps decide how you work, and every one of them runs whatever the brief says,
+including a brief that only says to search the web or already lists the
+slides. If a step cannot run, say why in the report.
+
+1. **Read the requirement.** Keep the slide order and the meaning of each
+ headline it gives; take numbers only from sources you can cite.
+2. **Find the Human's existing material first (required for every new deck).**
+ Before any web research, use your workspace tools (the documents and files
+ available to you, and the Human's knowledge search; see the `teamhub-files`
+ skill and your instructions) to check what the Human already has:
+ - documents, spreadsheets, slides and PDFs about the same project, team,
+ company or period, including any named in the brief;
+ - facts recorded in their chats, meetings and documents, searched from
+ several angles (results, causes, plans, asks, people);
+ - **images, logos, brand files, team or office photos** of the company.
+ Knowledge search covers text only, so look for these among the files.
+ When the topic plainly lies outside anything the Human keeps (public news
+ about someone else, a general explainer), one knowledge search is enough:
+ record the query and that nothing relevant came back.
+ Count content only if it is about the same project and period; the
+ company's own logo, brand images and team or office photos count for any
+ deck about that company. Read everything relevant, and write the inventory
+ (found / used / not used and why, with IDs) to
+ `./playground/<scope>/material.md`.
+3. **Research the gaps** on the web, citing every source.
+4. **Write the brief before coding**, in one go now that the material and
+ research are in. First read [brief-template.md](brief-template.md) in this
+ skill's folder; it is not repeated here. Then write
+ `./playground/<scope>/brief.md` in that structure: copy what the
+ requirement gives, fill every field it lacks yourself, marked as inferred,
+ and give every slide its claim headline, its layout (one from
+ `references/layouts.md`, or a custom one with the reason) and its exact
+ visual (which image, chart or diagram). A photo is named by its URL or
+ file, not just "photo"; plan one on the cover and on about every third or
+ fourth slide. When the requirement does not give the audience, goal,
+ setting or main message (a one-line request, say), infer them: pick the
+ goal the deck serves and use its order (decide: situation → problem →
+ options → recommendation → ask; understand: why it matters → how it works →
+ example → limits → summary; persuade: pain → promise → how → proof → call
+ to action; update: headline numbers → what went well → what didn't → risks
+ → next steps). Unless the requirement says otherwise, the audience is the
+ Human reading it on their own, in the language of the request. Report every
+ field you inferred as an assumption.
+5. **Collect images** (see Images) into `./playground/<scope>/img/`: download
+ every image the brief names and record each source. Drop a planned photo
+ only after you tried every source in the Images order (official sources,
+ at least two free photo libraries, then neutral photos) and found nothing
+ usable; list each search (query, site, result) in `brief.md`.
+6. **Build** only once every slide in `brief.md` has its layout and visual and
+ every image it names is in `img/`, with one script copied from
+ `scripts/deck_template.js`. Set `THEME` once from `references/palettes.md`,
+ build each slide from its layout in `references/layouts.md` with the
+ template's helpers, and see `references/pptxgenjs.md` for images, charts
+ and tables, so every slide looks the same.
+7. **Render and inspect every slide** (see Check), fix, and render again.
+8. **Report**: file path, the paths of `material.md` and `brief.md`, one line
+ per slide, the Human's material found / used / not used and why, other
+ sources used, every assumption, every missing fact, and any check you could
+ not run.
+
+## Design rules
+
+### Story on the slide
+- Every content slide's title is a **claim** (a sentence stating its point),
+ not a label. Reading the titles in order tells the story.
+- Keep each title to one line (about 60 Latin characters or 30 CJK
+ characters at 28 pt); shorten the wording rather than wrapping.
+- One point per slide. At most ~40 words of body text on a presented slide;
+ put detail in speaker notes.
+- Every fact has a short source line at the bottom of its slide.
+- A claim about a person's private life, an allegation, an investigation or
+ a legal dispute needs its primary source or two independent reputable
+ outlets that you actually read; a page you could not open does not count.
+ Never open a deck with such a claim on one source; if you keep it, say on
+ the slide that one outlet reports it.
+
+### Visual first
+- **Every slide has one visual anchor**: a photo, a native chart, a diagram
+ (flow, timeline, matrix, structure), KPI tiles or a big number. A slide that
+ is only a title and bullets is a defect, except a short agenda.
+- **Pick the visual from the content**: numbers that compare or change → chart;
+ a sequence or mechanism → flow or timeline; options or trade-offs → cards or
+ matrix; one striking figure → big number; people, products, places, mood →
+ photo. A deck usually mixes all of these; there is no fixed ratio, but a deck
+ without photos, without charts where there are numbers, or without a diagram
+ where there is a process is not finished.
+- **Vary the layouts**: never three slides in a row with the same layout. Use a
+ full-bleed photo cover, section dividers for decks over ~8 slides, half-slide
+ image beside text, cards and full-width charts.
+- Speaker notes (`slide.addNotes(...)`) on every slide when the brief asks for
+ them.
+
+### Images
+- **Every deck has real photos**: the cover, and image-beside-text, section and
+ card slides wherever they fit; beyond the cover, about every third or fourth
+ slide carries a photo.
+- Find them in this order:
+ 1. the Human's own images, logos and photos found in step 2 (use the
+ company logo on the cover or footer when there is one);
+ 2. official sources about the topic (company newsroom or press kit, product
+ pages, official logos);
+ 3. free photo libraries with a clear license (Unsplash, Pexels, Pixabay,
+ Wikimedia Commons), searching for the topic;
+ 4. if nothing on-topic fits, **neutral photos** from those libraries
+ (architecture, city skyline, office or meeting scenes, landscapes,
+ abstract textures) matching the deck's mood and colors.
+ Never leave an empty image area, and never use a tiny or blurry image
+ stretched up.
+- **Always credit the source**: a small caption on the image ("Image: <site> /
+ <author or page>") and the full URL in that slide's speaker notes; list all
+ credits on the sources slide or in the notes.
+- Download the largest reasonable size (≥1600 px wide for full-bleed). Fill
+ the frame with `sizing: { type: "cover" }`; never distort. Put text over a
+ photo only on a translucent dark overlay (a rectangle whose fill has a
+ `transparency` of about 50).
+
+### Charts
+- Native, editable charts only (`slide.addChart`), never chart screenshots;
+ style them as in `references/pptxgenjs.md`.
+- Highlight what the headline claims in the accent color and keep the rest
+ neutral grey; label values on the bars and remove gridlines and needless
+ legends.
+- One message per chart; the title says what the chart proves; source below.
+
+### Diagrams
+- Draw them with native shapes and connectors: flows of 3–6 steps, timelines,
+ 2×2 matrices only for two real dimensions, structure charts, cards, KPI
+ tiles. Consistent corners, line weights and colors; highlight the step the
+ slide is about.
+
+### Look
+- One style per deck: the one in the brief. Turn its name and description
+ into exact colors, fonts and layout habits once at the top of the script,
+ and use one accent color only for what the audience must notice. With no
+ style given, pick the palette in `references/palettes.md` that fits the
+ topic, never plain blue.
+
+- 16:9 on the layouts' 10 × 5.625 in canvas, with their margins; nothing
+ touches the edge except full-bleed photos and the layouts' own bands.
+- Type: the sizes the layouts set (slide titles 20 pt, cover and closing
+ titles 32–38 pt, body 10.5–14 pt, captions and sources 8–9 pt). Shorten
+ text rather than shrinking it.
+- **Size every text box to its content, for every viewer**: estimate the lines
+ from characters per line at the chosen size, then make the box at least
+ lines × font size × line height tall, plus its top and bottom insets, using
+ 1.2 for Latin text and 1.5 for Chinese, Japanese or Korean. Viewers such as
+ web previews keep the stored box size and scroll or clip what does not fit,
+ so never rely on auto-fit (`fit: "shrink"` or `"resize"`) to make room. Size
+ cards to their text instead of leaving large empty areas. Keep footers to
+ one short line.
+- Chinese text: set `THEME.font` to a CJK font such as PingFang SC or
+ Microsoft YaHei; `fontFace` sets the East Asian typeface too.
+
+## Check (every slide)
+
+First run the content check, which lists every slide's text and flags empty
+slides and leftover placeholder text:
+
+```bash
+NODE_PATH="$(pwd)/agent/node_modules" node <skill folder>/scripts/check_deck.js <deck.pptx> --slides <n>
+```
+
+Then render to images:
+
+```bash
+soffice --headless --convert-to pdf --outdir <dir> <deck.pptx> # LibreOffice
+pdftoppm -png -r 80 <dir>/<deck>.pdf <dir>/slide
+```
+
+If `soffice` is missing, try `micromamba install --yes --override-channels
+--channel conda-forge --prefix ./agent/conda libreoffice` and run it with
+`micromamba run --prefix ./agent/conda soffice ...`. If no renderer works, say
+so in the report.
+
+Check in two levels, so slide images do not fill your context:
+
+1. **Overview**: tile the slide images into contact sheets (e.g. with
+ ImageMagick `montage`, 4 per row, about 400 px wide each, up to 12 slides per sheet), open the
+ sheets, and list the slides that look wrong or uncertain against the
+ checklist below.
+2. **Detail**: open the single-slide image only for those slides, fix them,
+ re-render, and re-check only the slides you changed.
+
+The checklist:
+
+1. The title is a claim on one line; titles in order tell the story; order matches the brief.
+2. The slide has a visual anchor; no three consecutive slides share a layout.
+3. No text overflows its box, is cut off, overlaps, or touches the edge; footers stay on one line.
+ LibreOffice grows auto-fit boxes, so a render can hide an overflow: also
+ check in the script that every text box is at least as tall as the formula
+ above.
+4. No card, tile or text box is mostly empty; content fills its frame.
+5. Images are sharp, not distorted, credited on the slide and in the notes.
+6. Charts are native, labeled, and highlight what the title claims.
+7. Text sizes are the ones the layouts set and stay within the word budget.
+8. One style throughout: fonts, colors, title position, footer.
+9. Every number has a source; nothing invented; gaps are marked visibly.
+ Relevant material the Human already has is used, or the report says why
+ not (off-topic, superseded).
+10. Chinese text renders in a CJK font.
+11. Speaker notes present when asked; the last slide states the ask or next step.
+
+Fix every failure and render again before reporting.
diff --git a/skills/builtin/pptx/1.0.4/brief-template.md b/skills/builtin/pptx/1.0.4/brief-template.md
new file mode 100644
index 00000000..997f0c3a
--- /dev/null
+++ b/skills/builtin/pptx/1.0.4/brief-template.md
@@ -0,0 +1,38 @@
+# Deck brief template
+
+Write `./playground/<scope>/brief.md` in this structure. Copy every field the
+requirement gives; fill each missing one yourself and mark it "(inferred)".
+Refer to skills by name, never by a local file path.
+
+```markdown
+# Deck brief: <title>
+
+## Audience and goal
+- Audience: <who>
+- Goal: <what they should think or do afterwards>
+- Setting: <presented live | sent to read>, about <n> slides
+- Language: <language of slide text>
+
+## Main message
+<one sentence>
+
+## Look
+- Style: <name, e.g. McKinsey blue, or the user's template> — background, text and accent colors (hex), fonts, layout habits
+- Slide size: 16:9 unless stated
+
+## Storyline
+1. <claim headline> — <layout> — <the exact image, chart or diagram it shows, with its source>
+2. ...
+
+## Topic for finding material
+- Entities: <project, product, team, client, period, and aliases>
+- Mentioned by the Human: <documents, files, rooms, people they named>
+- Avoid: <topics, numbers or sources the Human excluded or that are sensitive for this audience>
+
+## Facts from the conversation
+- <quote anything the Human said that the deck needs>
+
+## Output
+- File: ./playground/<task-id>/<FileName>.pptx
+- Speaker notes: <yes | no>
+```
diff --git a/skills/builtin/pptx/1.0.4/references/NOTICE.md b/skills/builtin/pptx/1.0.4/references/NOTICE.md
new file mode 100644
index 00000000..1c8ba48d
--- /dev/null
+++ b/skills/builtin/pptx/1.0.4/references/NOTICE.md
@@ -0,0 +1,25 @@
+# Notice
+
+The slide layouts, palettes, PptxGenJS notes and scripts in this skill are
+adapted from pptx-deck (https://github.com/Atomic-man007/pptx-deck-plugin),
+published under the MIT License:
+
+> Copyright (c) dbaas-operation-agents contributors
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in
+> all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
diff --git a/skills/builtin/pptx/1.0.4/references/layouts.md b/skills/builtin/pptx/1.0.4/references/layouts.md
new file mode 100644
index 00000000..c334449f
--- /dev/null
+++ b/skills/builtin/pptx/1.0.4/references/layouts.md
@@ -0,0 +1,323 @@
+# Slide layouts
+
+Seven tested layouts on the 10 × 5.625 in canvas. Each block builds one slide
+with `deck`, `THEME`, `FONT` and the helpers `titleBar`, `pageFooter`,
+`accentCard` and `softShadow` from `scripts/deck_template.js`. Copy a block,
+replace the sample text with the brief's content, and keep the positions and
+sizes; shorten text rather than shrinking it.
+
+| Layout | Use it for |
+|---|---|
+| `cover` | the first slide |
+| `two-column` | a problem and its answer, before and after, a list beside a panel |
+| `flow` | a process, a pipeline, steps in order |
+| `cards` | four parallel points (2 × 2) |
+| `metrics` | up to six numbers that matter |
+| `phases` | three stages, a roadmap, next steps |
+| `closing` | the last slide: what is done, what is open, the ask |
+
+## cover
+
+```javascript
+{
+ const slide = deck.addSlide();
+ slide.background = { color: THEME.ink };
+
+ // Two vertical stripes on the left edge
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 0, y: 0, w: 0.55, h: 5.625,
+ fill: { color: THEME.main }, line: { color: THEME.main },
+ });
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 0.55, y: 0, w: 0.12, h: 5.625,
+ fill: { color: THEME.highlight }, line: { color: THEME.highlight },
+ });
+
+ slide.addText("Deck title", {
+ x: 1.0, y: 1.3, w: 8.5, h: 0.75,
+ fontSize: 38, fontFace: FONT, bold: true, color: THEME.paper, margin: 0,
+ });
+ slide.addText("One-line subtitle", {
+ x: 1.0, y: 2.15, w: 8.5, h: 0.4,
+ fontSize: 18, fontFace: FONT, color: THEME.main, margin: 0,
+ });
+ // Short rule under the subtitle
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 1.0, y: 2.7, w: 3.5, h: 0.05,
+ fill: { color: THEME.highlight }, line: { color: THEME.highlight },
+ });
+ slide.addText("Presenter | Team | Date", {
+ x: 1.0, y: 4.9, w: 8, h: 0.3,
+ fontSize: 11, fontFace: FONT, color: "888888", margin: 0,
+ });
+}
+```
+
+## two-column
+
+```javascript
+{
+ const slide = deck.addSlide();
+ slide.background = { color: THEME.paper };
+ titleBar(slide, "Claim headline", "Optional subheading");
+ pageFooter(slide, "Deck title | Date", 2);
+
+ // Left: a heading over a short bullet list
+ slide.addText("Left heading", {
+ x: 0.35, y: 1.05, w: 4.4, h: 0.35,
+ fontSize: 14, fontFace: FONT, bold: true, color: THEME.ink, margin: 0,
+ });
+ slide.addText([
+ { text: "First point", options: { bullet: true, breakLine: true } },
+ { text: "Second point", options: { bullet: true, breakLine: true } },
+ { text: "Third point", options: { bullet: true } },
+ ], {
+ x: 0.35, y: 1.45, w: 4.4, h: 2.5,
+ fontSize: 11, fontFace: FONT, color: THEME.ink,
+ });
+
+ // Right: a tinted panel with a colored top edge
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 5.1, y: 1.05, w: 4.55, h: 3.9,
+ fill: { color: THEME.canvas }, line: { color: "E0E0E0" },
+ });
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 5.1, y: 1.05, w: 4.55, h: 0.06,
+ fill: { color: THEME.main }, line: { color: THEME.main },
+ });
+ slide.addText("Right heading", {
+ x: 5.25, y: 1.15, w: 4.2, h: 0.35,
+ fontSize: 13, fontFace: FONT, bold: true, color: THEME.main, margin: 0,
+ });
+ slide.addText("Text for the right panel.", {
+ x: 5.25, y: 1.6, w: 4.2, h: 3.2,
+ fontSize: 10.5, fontFace: FONT, color: "555555", wrap: true, margin: 0,
+ });
+}
+```
+
+## flow
+
+```javascript
+{
+ const slide = deck.addSlide();
+ slide.background = { color: THEME.paper };
+ titleBar(slide, "Claim headline", "How it works");
+ pageFooter(slide, "Deck title | Date", 3);
+
+ const steps = [
+ { label: "Step 1\nInput", color: THEME.main },
+ { label: "Step 2\nProcess", color: THEME.support },
+ { label: "Step 3\nCheck", color: THEME.highlight },
+ { label: "Step 4\nOutput", color: "2E7D32" },
+ ];
+
+ steps.forEach((step, i) => {
+ const x = 0.5 + i * 2.3;
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x, y: 1.8, w: 2.0, h: 0.9,
+ fill: { color: THEME.canvas }, line: { color: step.color, width: 1.5 },
+ shadow: softShadow(3, 1, 0.1),
+ });
+ slide.addText(step.label, {
+ x, y: 1.8, w: 2.0, h: 0.9,
+ fontSize: 11, fontFace: FONT, bold: true, color: step.color,
+ align: "center", valign: "middle", margin: 0,
+ });
+ // Connector to the next step
+ if (i < steps.length - 1) {
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: x + 2.0, y: 2.2, w: 0.28, h: 0.06,
+ fill: { color: "888888" }, line: { color: "888888" },
+ });
+ slide.addText("▶", {
+ x: x + 2.16, y: 2.12, w: 0.18, h: 0.22,
+ fontSize: 9, fontFace: FONT, color: "888888", margin: 0,
+ });
+ }
+ });
+}
+```
+
+## cards
+
+```javascript
+{
+ const slide = deck.addSlide();
+ slide.background = { color: THEME.paper };
+ titleBar(slide, "Claim headline", "Four points");
+ pageFooter(slide, "Deck title | Date", 4);
+
+ const cards = [
+ { heading: "First point", text: "One or two lines on it.", color: THEME.main },
+ { heading: "Second point", text: "One or two lines on it.", color: THEME.highlight },
+ { heading: "Third point", text: "One or two lines on it.", color: "2E7D32" },
+ { heading: "Fourth point", text: "One or two lines on it.", color: THEME.support },
+ ];
+
+ cards.forEach((card, i) => {
+ const column = i % 2;
+ const row = Math.floor(i / 2);
+ accentCard(slide,
+ 0.3 + column * 4.85, 1.1 + row * 1.9, 4.5, 1.7,
+ card.heading, card.text, card.color);
+ });
+}
+```
+
+## metrics
+
+```javascript
+{
+ const slide = deck.addSlide();
+ slide.background = { color: THEME.paper };
+ titleBar(slide, "Claim headline", "The numbers");
+ pageFooter(slide, "Deck title | Date", 5);
+
+ const metrics = [
+ { value: "98%", label: "Uptime", note: "Last 30 days", color: "2E7D32" },
+ { value: "1.2s", label: "Response time", note: "P99", color: THEME.main },
+ { value: "400+", label: "Tests passing", note: "Automated", color: THEME.highlight },
+ { value: "12", label: "Rules active", note: "Enforced", color: THEME.support },
+ { value: "< 5m", label: "Deploy time", note: "Per service", color: "6A1B9A" },
+ { value: "Zero", label: "Incidents", note: "This quarter", color: "E65100" },
+ ];
+
+ metrics.forEach((metric, i) => {
+ const x = 0.3 + (i % 3) * 3.2;
+ const y = 1.1 + Math.floor(i / 3) * 1.9;
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x, y, w: 3.0, h: 1.6,
+ fill: { color: THEME.paper }, line: { color: "E0E0E0" },
+ shadow: softShadow(3, 1, 0.08),
+ });
+ // Colored top edge
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x, y, w: 3.0, h: 0.07,
+ fill: { color: metric.color }, line: { color: metric.color },
+ });
+ slide.addText(metric.value, {
+ x: x + 0.15, y: y + 0.15, w: 2.7, h: 0.65,
+ fontSize: 30, fontFace: FONT, bold: true, color: metric.color, margin: 0,
+ });
+ slide.addText(metric.label, {
+ x: x + 0.15, y: y + 0.82, w: 2.7, h: 0.3,
+ fontSize: 11.5, fontFace: FONT, bold: true, color: THEME.ink, margin: 0,
+ });
+ slide.addText(metric.note, {
+ x: x + 0.15, y: y + 1.15, w: 2.7, h: 0.3,
+ fontSize: 9, fontFace: FONT, color: "888888", margin: 0,
+ });
+ });
+}
+```
+
+## phases
+
+```javascript
+{
+ const slide = deck.addSlide();
+ slide.background = { color: THEME.paper };
+ titleBar(slide, "Claim headline", "Three stages");
+ pageFooter(slide, "Deck title | Date", 6);
+
+ const phases = [
+ { label: "STAGE 1\nNow", color: THEME.main,
+ items: ["First action", "Second action", "Third action"] },
+ { label: "STAGE 2\nNext", color: THEME.highlight,
+ items: ["First action", "Second action", "Third action"] },
+ { label: "STAGE 3\nLater", color: THEME.support,
+ items: ["First action", "Second action", "Third action"] },
+ ];
+
+ phases.forEach((phase, i) => {
+ const x = 0.3 + i * 3.2;
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x, y: 1.05, w: 3.0, h: 3.8,
+ fill: { color: THEME.canvas }, line: { color: phase.color, width: 1 },
+ shadow: softShadow(4, 2, 0.08),
+ });
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x, y: 1.05, w: 3.0, h: 0.65,
+ fill: { color: phase.color }, line: { color: phase.color },
+ });
+ slide.addText(phase.label, {
+ x: x + 0.12, y: 1.1, w: 2.76, h: 0.55,
+ fontSize: 11, fontFace: FONT, bold: true, color: THEME.paper,
+ align: "center", valign: "middle", margin: 0,
+ });
+ phase.items.forEach((item, j) => {
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: x + 0.15, y: 1.85 + j * 0.82, w: 0.07, h: 0.42,
+ fill: { color: phase.color }, line: { color: phase.color },
+ });
+ slide.addText(item, {
+ x: x + 0.32, y: 1.82 + j * 0.82, w: 2.5, h: 0.52,
+ fontSize: 10.5, fontFace: FONT, color: THEME.ink, wrap: true, margin: 0,
+ });
+ });
+ });
+}
+```
+
+## closing
+
+```javascript
+{
+ const slide = deck.addSlide();
+ slide.background = { color: THEME.main };
+
+ // Stripe on the right edge
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 9.5, y: 0, w: 0.5, h: 5.625,
+ fill: { color: THEME.highlight }, line: { color: THEME.highlight },
+ });
+
+ slide.addText("Summary", {
+ x: 0.5, y: 0.4, w: 8, h: 0.65,
+ fontSize: 32, fontFace: FONT, bold: true, color: THEME.paper, margin: 0,
+ });
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 0.5, y: 1.1, w: 5, h: 0.05,
+ fill: { color: THEME.paper }, line: { color: THEME.paper },
+ });
+
+ const done = ["Done item 1", "Done item 2", "Done item 3"];
+ const open = ["Open item 1", "Open item 2"];
+
+ slide.addText("Done", {
+ x: 0.5, y: 1.25, w: 4.2, h: 0.32,
+ fontSize: 13, fontFace: FONT, bold: true, color: "FFCCCC", margin: 0,
+ });
+ done.forEach((item, i) => {
+ slide.addText("✓ " + item, {
+ x: 0.5, y: 1.62 + i * 0.42, w: 4.5, h: 0.34,
+ fontSize: 11, fontFace: FONT, color: THEME.paper, margin: 0,
+ });
+ });
+
+ slide.addText("Open", {
+ x: 5.3, y: 1.25, w: 3.8, h: 0.32,
+ fontSize: 13, fontFace: FONT, bold: true, color: "FFCCCC", margin: 0,
+ });
+ open.forEach((item, i) => {
+ slide.addText("◎ " + item, {
+ x: 5.3, y: 1.62 + i * 0.42, w: 4.0, h: 0.34,
+ fontSize: 11, fontFace: FONT, color: "FFE0E0", margin: 0,
+ });
+ });
+
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 0.5, y: 4.2, w: 8.8, h: 0.05,
+ fill: { color: THEME.paper }, line: { color: THEME.paper },
+ });
+ slide.addText("The ask or the next step.", {
+ x: 0.5, y: 4.35, w: 8.8, h: 0.32,
+ fontSize: 12, fontFace: FONT, bold: true, color: THEME.paper, margin: 0,
+ });
+ slide.addText("Presenter | Team | Date", {
+ x: 0.5, y: 5.0, w: 8.8, h: 0.25,
+ fontSize: 9, fontFace: FONT, color: "FF9999", margin: 0,
+ });
+}
+```
diff --git a/skills/builtin/pptx/1.0.4/references/palettes.md b/skills/builtin/pptx/1.0.4/references/palettes.md
new file mode 100644
index 00000000..08921049
--- /dev/null
+++ b/skills/builtin/pptx/1.0.4/references/palettes.md
@@ -0,0 +1,62 @@
+# Palettes
+
+`THEME` at the top of the deck script holds the deck's colors and font. Colors
+are 6-digit hex without `#`.
+
+```javascript
+const THEME = {
+ main: "0070C0", // title bars and the strongest accents
+ support: "404040", // subheadings and second-level accents
+ ink: "1A1A1A", // body text and dark backgrounds
+ paper: "FFFFFF", // light backgrounds and text on dark
+ canvas: "F5F5F5", // soft slide and card backgrounds
+ highlight: "FF6B35", // the one color for what must stand out
+ font: "Calibri",
+};
+```
+
+## Choosing one
+
+Use the brief's style when it names one or gives brand colors. Otherwise pick
+the row whose purpose fits the deck; do not fall back to plain blue.
+
+| Palette | main | support | highlight | ink | canvas | font | Fits |
+|---|---|---|---|---|---|---|---|
+| Corporate blue | `0070C0` | `003087` | `00B0F0` | `1A1A1A` | `F0F4F8` | Calibri | finance, enterprise |
+| Executive dark | `1E2761` | `408EC6` | `7A2048` | `0A0A0A` | `F5F5F5` | Calibri | leadership, board |
+| Tech green | `00897B` | `00695C` | `FF6F00` | `212121` | `F1F8F6` | Calibri | engineering, operations |
+| Startup bold | `6C63FF` | `3D5AFE` | `FF6584` | `1A1A2E` | `F8F8FF` | Calibri | product, pitch |
+| Minimal mono | `212121` | `616161` | `FF5252` | `000000` | `FAFAFA` | Calibri | design, consulting |
+| Warm business | `B85042` | `E7E8D1` | `A7BEAE` | `2C2C2C` | `FDF6F0` | Georgia | retail, people, culture |
+| Deep navy | `003153` | `005F73` | `EE9B00` | `001220` | `F0F4F8` | Calibri | healthcare, legal |
+| Vivid orange | `E85D04` | `F48C06` | `023E8A` | `1A1A1A` | `FFF8F2` | Calibri | marketing, sales |
+
+`paper` stays `FFFFFF` in every palette.
+
+## Fonts
+
+| Font | Feel | Notes |
+|---|---|---|
+| Calibri | clean, modern | the default; available almost everywhere |
+| Arial | neutral, corporate | the universal fallback |
+| Georgia | warm, editorial | suits people and culture topics |
+| Trebuchet MS | friendly, rounded | suits product and startup topics |
+| Cambria | formal serif | suits legal and finance topics |
+
+A viewer without the chosen font falls back to another one, so check the
+render. The font also sets the East Asian typeface: when the slides contain
+Chinese, use a CJK font instead, such as "PingFang SC" or "Microsoft YaHei".
+
+## Where each color goes
+
+```javascript
+// Title bar → THEME.main
+// Title bar text → THEME.paper
+// Slide background → THEME.paper (or THEME.canvas)
+// Card edge → THEME.main (or THEME.highlight)
+// Body text → THEME.ink
+// Muted text and captions → "888888"
+// Done, success → "2E7D32"
+// Open, warning → THEME.highlight
+// Dividers → "E0E0E0"
+```
diff --git a/skills/builtin/pptx/1.0.4/references/pptxgenjs.md b/skills/builtin/pptx/1.0.4/references/pptxgenjs.md
new file mode 100644
index 00000000..51bd7b85
--- /dev/null
+++ b/skills/builtin/pptx/1.0.4/references/pptxgenjs.md
@@ -0,0 +1,234 @@
+# PptxGenJS notes
+
+## A deck in brief
+
+```javascript
+const PptxGenJS = require("pptxgenjs");
+
+const deck = new PptxGenJS(); // one new instance per deck
+deck.layout = "LAYOUT_16x9";
+deck.author = "Author";
+deck.title = "Deck title";
+
+const slide = deck.addSlide();
+slide.addText("Hello", { x: 0.5, y: 0.5, fontSize: 36, color: "363636" });
+
+deck.writeFile({ fileName: "deck.pptx" });
+```
+
+Canvas sizes, in inches: `LAYOUT_16x9` 10 × 5.625 (the default and the one the
+layouts use), `LAYOUT_16x10` 10 × 6.25, `LAYOUT_4x3` 10 × 7.5, `LAYOUT_WIDE`
+13.3 × 7.5.
+
+## Text
+
+```javascript
+slide.addText("Plain text", {
+ x: 1, y: 1, w: 8, h: 2, fontSize: 24, fontFace: "Arial",
+ color: "363636", bold: true, align: "center", valign: "middle",
+});
+
+// Letter spacing is charSpacing; letterSpacing is ignored.
+slide.addText("SPACED", { x: 1, y: 1, w: 8, h: 1, charSpacing: 6 });
+
+// Mixed formatting in one box
+slide.addText([
+ { text: "Bold ", options: { bold: true } },
+ { text: "italic", options: { italic: true } },
+], { x: 1, y: 3, w: 8, h: 1 });
+
+// Several lines: breakLine on every run but the last
+slide.addText([
+ { text: "Line 1", options: { breakLine: true } },
+ { text: "Line 2", options: { breakLine: true } },
+ { text: "Line 3" },
+], { x: 0.5, y: 0.5, w: 8, h: 2 });
+```
+
+A text box has inner padding by default. Set `margin: 0` when its text must
+line up with a shape, line or image at the same x.
+
+`fontFace` sets the Latin and the East Asian typeface together, so text in
+Chinese needs a font that has Chinese glyphs (for example "PingFang SC" or
+"Microsoft YaHei").
+
+## Lists
+
+```javascript
+slide.addText([
+ { text: "First", options: { bullet: true, breakLine: true } },
+ { text: "Second", options: { bullet: true, breakLine: true } },
+ { text: "Third", options: { bullet: true } },
+], { x: 0.5, y: 0.5, w: 8, h: 3 });
+
+// Indented and numbered items
+{ text: "Sub-item", options: { bullet: true, indentLevel: 1 } }
+{ text: "First", options: { bullet: { type: "number" }, breakLine: true } }
+```
+
+Use `bullet: true`, never a typed "•": the typed one shows a second bullet.
+
+## Shapes
+
+```javascript
+slide.addShape(deck.shapes.RECTANGLE, {
+ x: 0.5, y: 0.8, w: 1.5, h: 3.0,
+ fill: { color: "FF0000" }, line: { color: "000000", width: 2 },
+});
+slide.addShape(deck.shapes.OVAL, { x: 4, y: 1, w: 2, h: 2, fill: { color: "0000FF" } });
+slide.addShape(deck.shapes.LINE, {
+ x: 1, y: 3, w: 5, h: 0, line: { color: "FF0000", width: 3, dashType: "dash" },
+});
+
+// Translucent fill (0 opaque, 100 invisible)
+slide.addShape(deck.shapes.RECTANGLE, {
+ x: 1, y: 1, w: 3, h: 2, fill: { color: "0088CC", transparency: 50 },
+});
+
+// Rounded corners need ROUNDED_RECTANGLE; rectRadius does nothing on RECTANGLE.
+slide.addShape(deck.shapes.ROUNDED_RECTANGLE, {
+ x: 1, y: 1, w: 3, h: 2, fill: { color: "FFFFFF" }, rectRadius: 0.1,
+});
+
+// Shadow
+slide.addShape(deck.shapes.RECTANGLE, {
+ x: 1, y: 1, w: 3, h: 2, fill: { color: "FFFFFF" },
+ shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.15 },
+});
+```
+
+| Shadow option | Values | Note |
+|---|---|---|
+| `type` | `"outer"`, `"inner"` | |
+| `color` | 6-digit hex | no `#`, no alpha digits |
+| `blur` | 0–100 pt | |
+| `offset` | 0–200 pt | never negative: a negative offset corrupts the file |
+| `angle` | 0–359° | where the shadow falls: 135 bottom-right, 270 up |
+| `opacity` | 0.0–1.0 | the only place for shadow transparency |
+
+To shadow upward, for a bar along the bottom, use `angle: 270` with a positive
+offset. Gradient fills are not supported; use a gradient image as the
+background instead.
+
+## Images
+
+```javascript
+slide.addImage({ path: "img/photo.jpg", x: 1, y: 1, w: 5, h: 3 }); // file
+slide.addImage({ path: "https://example.com/photo.jpg", x: 1, y: 1, w: 5, h: 3 }); // URL
+slide.addImage({ data: "image/png;base64,iVBOR...", x: 1, y: 1, w: 5, h: 3 }); // base64
+
+slide.addImage({
+ path: "img/photo.jpg", x: 1, y: 1, w: 5, h: 3,
+ rotate: 45, rounding: true, transparency: 50,
+ flipH: true, flipV: false,
+ altText: "What the image shows",
+ hyperlink: { url: "https://example.com" },
+});
+```
+
+Fit an image to its frame without distorting it:
+
+```javascript
+{ sizing: { type: "contain", w: 4, h: 3 } } // fits inside, keeps the ratio
+{ sizing: { type: "cover", w: 4, h: 3 } } // fills the frame, keeps the ratio, may crop
+{ sizing: { type: "crop", x: 0.5, y: 0.5, w: 2, h: 2 } } // a chosen part
+```
+
+Or size it from its pixel ratio:
+
+```javascript
+const pixelWidth = 1978, pixelHeight = 923, height = 3.0;
+const width = height * (pixelWidth / pixelHeight);
+slide.addImage({ path: "img/photo.jpg", x: (10 - width) / 2, y: 1.2, w: width, h: height });
+```
+
+PNG, JPG and GIF work everywhere; SVG works in current PowerPoint.
+
+## Backgrounds
+
+```javascript
+slide.background = { color: "F1F1F1" };
+slide.background = { color: "FF3399", transparency: 50 };
+slide.background = { path: "https://example.com/bg.jpg" };
+slide.background = { data: "image/png;base64,iVBOR..." };
+```
+
+## Tables
+
+```javascript
+slide.addTable([
+ ["Header 1", "Header 2"],
+ ["Cell 1", "Cell 2"],
+], {
+ x: 1, y: 1, w: 8, h: 2,
+ border: { pt: 1, color: "999999" }, fill: { color: "F1F1F1" },
+});
+
+// Styled header and merged cells
+slide.addTable([
+ [{ text: "Header", options: { fill: { color: "6699CC" }, color: "FFFFFF", bold: true } }, "Cell"],
+ [{ text: "Merged", options: { colspan: 2 } }],
+], { x: 1, y: 3.5, w: 8, colW: [4, 4] });
+```
+
+## Charts
+
+```javascript
+slide.addChart(deck.charts.BAR, [{
+ name: "Sales", labels: ["Q1", "Q2", "Q3", "Q4"], values: [4500, 5500, 6200, 7100],
+}], { x: 0.5, y: 0.6, w: 6, h: 3, barDir: "col", showTitle: true, title: "Quarterly sales" });
+
+slide.addChart(deck.charts.LINE, [{
+ name: "Temperature", labels: ["Jan", "Feb", "Mar"], values: [32, 35, 42],
+}], { x: 0.5, y: 4, w: 6, h: 3, lineSize: 3, lineSmooth: true });
+
+slide.addChart(deck.charts.PIE, [{
+ name: "Share", labels: ["A", "B", "Other"], values: [35, 45, 20],
+}], { x: 7, y: 1, w: 5, h: 4, showPercent: true });
+```
+
+The defaults look dated. A clean chart:
+
+```javascript
+slide.addChart(deck.charts.BAR, data, {
+ x: 0.5, y: 1, w: 9, h: 4, barDir: "col",
+ chartColors: ["0D9488", "14B8A6", "5EEAD4"], // from the deck's palette
+ chartArea: { fill: { color: "FFFFFF" }, roundedCorners: true },
+ catAxisLabelColor: "64748B", valAxisLabelColor: "64748B", // quiet axis labels
+ valGridLine: { color: "E2E8F0", size: 0.5 }, // light value grid only
+ catGridLine: { style: "none" },
+ showValue: true, dataLabelPosition: "outEnd", dataLabelColor: "1E293B",
+ showLegend: false, // one series needs no legend
+});
+```
+
+Other useful options: `legendPos` (`"b"`, `"t"`, `"l"`, `"r"`, `"tr"`),
+`lineSmooth` for line charts. Chart types: BAR, LINE, PIE, DOUGHNUT, SCATTER,
+BUBBLE, RADAR. Data label positions: `"outEnd"`, `"inEnd"`, `"center"`.
+
+## Slide masters
+
+```javascript
+deck.defineSlideMaster({
+ title: "TITLE_SLIDE",
+ background: { color: "283A5E" },
+ objects: [{ placeholder: { options: { name: "title", type: "title", x: 1, y: 2, w: 8, h: 2 } } }],
+});
+
+const titleSlide = deck.addSlide({ masterName: "TITLE_SLIDE" });
+titleSlide.addText("Title", { placeholder: "title" });
+```
+
+## What breaks a deck
+
+1. A `#` in a color (`"#FF0000"`) corrupts the file; write `"FF0000"`.
+2. Alpha digits in a color (`"00000020"`) corrupt the file; set `opacity` (or
+ `transparency`) instead.
+3. A typed bullet character doubles the bullet; use `bullet: true`.
+4. Runs without `breakLine: true` run together on one line.
+5. `lineSpacing` on bullets leaves large gaps; use `paraSpaceAfter`.
+6. Reusing a deck instance mixes decks; create a new one each time.
+7. Reusing an options object corrupts the second shape: PptxGenJS converts its
+ values in place. Build a new object for every call, as `softShadow()` does.
+8. A straight accent strip cannot cover rounded corners; put accent strips on
+ `RECTANGLE` cards, not `ROUNDED_RECTANGLE`.
diff --git a/skills/builtin/pptx/1.0.4/scripts/check_deck.js b/skills/builtin/pptx/1.0.4/scripts/check_deck.js
new file mode 100644
index 00000000..e03fd6d3
--- /dev/null
+++ b/skills/builtin/pptx/1.0.4/scripts/check_deck.js
@@ -0,0 +1,63 @@
+// Content check for a built deck: lists each slide's text and fails when a
+// slide has no text, still holds placeholder text, or the slide count differs
+// from the expected one.
+// NODE_PATH="$(pwd)/agent/node_modules" node check_deck.js <deck.pptx> [--slides N]
+// Uses JSZip, which comes with pptxgenjs.
+
+const fs = require("node:fs");
+const JSZip = require("jszip");
+
+const PLACEHOLDER = /\b(TODO|XXX|TBD|PLACEHOLDER|lorem|ipsum)\b|\[insert/i;
+
+async function slideTexts(path) {
+ const zip = await JSZip.loadAsync(fs.readFileSync(path));
+ const presentation = await zip.file("ppt/presentation.xml").async("string");
+ const relations = await zip.file("ppt/_rels/presentation.xml.rels").async("string");
+ const targets = new Map(
+ [...relations.matchAll(/Id="(rId\d+)"[^>]*Target="([^"]+)"/g)].map((m) => [m[1], m[2]]),
+ );
+ const texts = [];
+ // Slides in presentation order, skipping masters and layouts.
+ for (const [, id] of presentation.matchAll(/<p:sldId [^>]*r:id="(rId\d+)"/g)) {
+ const target = targets.get(id);
+ const file = target && zip.file(`ppt/${target.replace(/^\/?ppt\//, "")}`);
+ if (!file) continue;
+ const xml = await file.async("string");
+ const runs = [...xml.matchAll(/<a:t>([^<]*)<\/a:t>/g)].map((m) => m[1].trim()).filter(Boolean);
+ texts.push(runs.join(" "));
+ }
+ return texts;
+}
+
+async function main() {
+ const [path, flag, count] = process.argv.slice(2);
+ if (!path) {
+ console.error("usage: node check_deck.js <deck.pptx> [--slides N]");
+ process.exit(2);
+ }
+ const expected = flag === "--slides" ? Number(count) : undefined;
+ const texts = await slideTexts(path);
+ const problems = [];
+ texts.forEach((text, i) => {
+ if (!text) problems.push(`slide ${i + 1}: no text`);
+ const match = text.match(PLACEHOLDER);
+ if (match) problems.push(`slide ${i + 1}: placeholder text "${match[0]}"`);
+ });
+ if (expected !== undefined && texts.length !== expected) {
+ problems.push(`slide count: expected ${expected}, found ${texts.length}`);
+ }
+
+ console.log(`${path}: ${texts.length} slides`);
+ texts.forEach((text, i) => console.log(` ${String(i + 1).padStart(2)} ${text.slice(0, 70)}`));
+ if (problems.length) {
+ console.log(`\n${problems.length} problem(s):`);
+ problems.forEach((problem) => console.log(` - ${problem}`));
+ process.exit(1);
+ }
+ console.log("\nno problems found");
+}
+
+main().catch((error) => {
+ console.error(error);
+ process.exit(1);
+});
diff --git a/skills/builtin/pptx/1.0.4/scripts/deck_template.js b/skills/builtin/pptx/1.0.4/scripts/deck_template.js
new file mode 100644
index 00000000..092e7000
--- /dev/null
+++ b/skills/builtin/pptx/1.0.4/scripts/deck_template.js
@@ -0,0 +1,172 @@
+// Starting point for a new deck. Copy it next to your outputs, set THEME from
+// references/palettes.md, replace the sample slides with layouts from
+// references/layouts.md, then run:
+// NODE_PATH="$(pwd)/agent/node_modules" node <copy>.js <output>.pptx
+// Requires pptxgenjs in ./agent (npm --prefix ./agent install pptxgenjs).
+
+const PptxGenJS = require("pptxgenjs");
+
+// Colors are 6-digit hex without "#". font must cover every script in the deck:
+// for Chinese text use a CJK font such as "PingFang SC" or "Microsoft YaHei".
+const THEME = {
+ main: "0070C0", // title bars and the strongest accents
+ support: "003087", // subheadings and second-level accents
+ ink: "1A1A1A", // body text and dark backgrounds
+ paper: "FFFFFF", // light backgrounds and text on dark
+ canvas: "F5F5F5", // soft slide and card backgrounds
+ highlight: "FF6B35", // the one color for what must stand out
+ font: "Calibri",
+};
+
+const FONT = THEME.font;
+
+const deck = new PptxGenJS();
+deck.layout = "LAYOUT_16x9"; // 10 x 5.625 in
+deck.author = "Author";
+deck.title = "Deck title";
+
+// A new object on every call: PptxGenJS rewrites option objects in place.
+function softShadow(blur, offset, opacity) {
+ return { type: "outer", color: "000000", blur, offset, angle: 135, opacity };
+}
+
+// Colored band across the top of a content slide, with its title.
+function titleBar(slide, heading, subheading) {
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 0, y: 0, w: 10, h: 0.85,
+ fill: { color: THEME.main }, line: { color: THEME.main },
+ });
+ slide.addText(heading, {
+ x: 0.35, y: 0.08, w: 9.3, h: 0.48,
+ fontSize: 20, fontFace: FONT, bold: true,
+ color: THEME.paper, valign: "middle", margin: 0,
+ });
+ if (subheading) {
+ slide.addText(subheading, {
+ x: 0.35, y: 0.56, w: 9.3, h: 0.22,
+ fontSize: 10, fontFace: FONT, color: "DDDDDD",
+ valign: "middle", margin: 0,
+ });
+ }
+}
+
+// Thin band along the bottom with a label and the page number.
+function pageFooter(slide, label, page) {
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 0, y: 5.38, w: 10, h: 0.25,
+ fill: { color: THEME.canvas }, line: { color: "E0E0E0" },
+ });
+ slide.addText(label || "", {
+ x: 0.2, y: 5.39, w: 8.5, h: 0.22,
+ fontSize: 8, fontFace: FONT, color: "888888", valign: "middle", margin: 0,
+ });
+ if (page) {
+ slide.addText(String(page), {
+ x: 9.4, y: 5.39, w: 0.4, h: 0.22,
+ fontSize: 8, fontFace: FONT, color: "888888",
+ align: "right", valign: "middle", margin: 0,
+ });
+ }
+}
+
+// White card with a colored strip down its left edge.
+function accentCard(slide, x, y, w, h, heading, text, color) {
+ const strip = color || THEME.main;
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x, y, w, h,
+ fill: { color: THEME.paper }, line: { color: "E0E0E0", width: 0.5 },
+ shadow: softShadow(4, 2, 0.08),
+ });
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x, y, w: 0.07, h,
+ fill: { color: strip }, line: { color: strip },
+ });
+ if (heading) {
+ slide.addText(heading, {
+ x: x + 0.16, y: y + 0.1, w: w - 0.22, h: 0.28,
+ fontSize: 11, fontFace: FONT, bold: true, color: THEME.ink, margin: 0,
+ });
+ }
+ if (text) {
+ slide.addText(text, {
+ x: x + 0.16, y: y + (heading ? 0.42 : 0.1),
+ w: w - 0.22, h: h - (heading ? 0.55 : 0.2),
+ fontSize: 10, fontFace: FONT, color: "555555", wrap: true, margin: 0,
+ });
+ }
+}
+
+// ---- Sample slides: replace them with layouts from references/layouts.md.
+
+// Cover
+{
+ const slide = deck.addSlide();
+ slide.background = { color: THEME.ink };
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 0, y: 0, w: 0.55, h: 5.625,
+ fill: { color: THEME.main }, line: { color: THEME.main },
+ });
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 0.55, y: 0, w: 0.12, h: 5.625,
+ fill: { color: THEME.highlight }, line: { color: THEME.highlight },
+ });
+ slide.addText("Deck title", {
+ x: 1.0, y: 1.3, w: 8.5, h: 0.75,
+ fontSize: 36, fontFace: FONT, bold: true, color: THEME.paper, margin: 0,
+ });
+ slide.addText("One-line subtitle", {
+ x: 1.0, y: 2.15, w: 8.5, h: 0.4,
+ fontSize: 18, fontFace: FONT, color: THEME.main, margin: 0,
+ });
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 1.0, y: 2.7, w: 3.5, h: 0.05,
+ fill: { color: THEME.highlight }, line: { color: THEME.highlight },
+ });
+ slide.addText("Author | Team | Date", {
+ x: 1.0, y: 4.9, w: 8, h: 0.3,
+ fontSize: 11, fontFace: FONT, color: "888888", margin: 0,
+ });
+}
+
+// Four cards
+{
+ const slide = deck.addSlide();
+ slide.background = { color: THEME.paper };
+ titleBar(slide, "Claim headline for this slide", "Optional subheading");
+ pageFooter(slide, "Deck title | Date", 2);
+ accentCard(slide, 0.3, 1.1, 4.4, 1.6, "First point", "One or two lines on it.", THEME.main);
+ accentCard(slide, 5.0, 1.1, 4.4, 1.6, "Second point", "One or two lines on it.", THEME.highlight);
+ accentCard(slide, 0.3, 2.9, 4.4, 1.6, "Third point", "One or two lines on it.", THEME.support);
+ accentCard(slide, 5.0, 2.9, 4.4, 1.6, "Fourth point", "One or two lines on it.", "2E7D32");
+}
+
+// Closing
+{
+ const slide = deck.addSlide();
+ slide.background = { color: THEME.main };
+ slide.addShape(deck.shapes.RECTANGLE, {
+ x: 9.5, y: 0, w: 0.5, h: 5.625,
+ fill: { color: THEME.highlight }, line: { color: THEME.highlight },
+ });
+ slide.addText("Closing line", {
+ x: 0.5, y: 1.5, w: 8.5, h: 0.9,
+ fontSize: 42, fontFace: FONT, bold: true, color: THEME.paper, margin: 0,
+ });
+ slide.addText("The one thing to remember, or the ask.", {
+ x: 0.5, y: 2.7, w: 8.5, h: 0.5,
+ fontSize: 16, fontFace: FONT, color: "DDDDDD", margin: 0,
+ });
+ slide.addText("Author | Team | Date", {
+ x: 0.5, y: 5.0, w: 8.5, h: 0.3,
+ fontSize: 10, fontFace: FONT, color: "AAAAAA", margin: 0,
+ });
+}
+
+const output = process.argv[2] || "deck.pptx";
+deck
+ .writeFile({ fileName: output })
+ .then(() => console.log(`wrote ${output}`))
+ .catch((error) => {
+ console.error(error);
+ process.exit(1);
+ });