Presentations

From fanfan-de/anybox · View interactive version

Presentations is an AI agent skill from the GitHub repository fanfan-de/anybox. Create editable Microsoft PowerPoint `.pptx` decks locally with code-first slide modules, PNG previews, layout JSON, and strict layout QA. Use when the user wants an Office presentation, slide deck, PPT, PPTX, or PowerPoint artifact.

How to use this skill

Skill file

PowerPoint PPTX Builder Skill

Use this skill when the durable output should be an editable Microsoft PowerPoint .pptx file.

Contract

Required Workflow

  1. Draft or update slide modules in workspaces/<task-id>/slides/.
  2. Run plugin scripts from the active project directory. If the script files are not present in the project, call the installed plugin script with an absolute path; --workspace workspaces/<task-id> is resolved relative to the current project directory.
  3. Render each changed slide:
node scripts/render_slide.mjs --workspace workspaces/<task-id> --slide slides/slide-01.mjs
  1. Run layout QA:
node scripts/check_layout_quality.mjs --workspace workspaces/<task-id>
  1. Build the deck only after previews and QA pass:
node scripts/build_deck.mjs --workspace workspaces/<task-id>
  1. Deliver only workspaces/<task-id>/output/final.pptx unless the user explicitly asks for previews or QA artifacts.

Sandbox Notes

Slide modules run in a practical child-process sandbox with an import whitelist, workspace path checks, output directory controls, and timeouts. This is not a strong security boundary. Do not write shell commands, read home directories, read secrets, access the network, or perform side effects in slide modules.

Allowed slide module import:

import {
  Presentation,
  Layers,
  Text,
  Shape,
  Panel,
  Row,
  Column,
  Image,
  composeSlide,
  textStyle,
  stroke,
  fill,
} from "@anybox/presentation-runtime";

Slide Module Example

import {
  Layers,
  Text,
  Shape,
  composeSlide,
  textStyle,
  stroke,
} from "@anybox/presentation-runtime";

export async function slide01(presentation, ctx) {
  const slide = presentation.slides.add();

  composeSlide(
    slide,
    Layers({ width: 1280, height: 720 }, [
      Shape({
        fill: "#F7F4ED",
        line: stroke("none"),
        position: { left: 0, top: 0 },
        width: 1280,
        height: 720,
      }),
      Text("Quarterly Review", {
        role: "title",
        position: { left: 80, top: 80 },
        width: 900,
        height: 70,
        style: textStyle("font: 44px Arial; weight: 700; color: #17202A"),
      }),
    ]),
  );

  return slide;
}

Quality Gates

Before final delivery, confirm:

If LibreOffice is unavailable, the build falls back to SVG/PNG/layout QA and records loFinalRenderSkipped in the build summary.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.