brand-pptx
Skill270 starsChanged 6 months agoMITView on GitHub
Brand-aware PowerPoint engine. Use to (1) EXTRACT a company's brand from a .pptx template into a reusable "Brand Profile", (2) COMPREHEND the template with the model (optional), (3) VERIFY it, (4) GENERATE a new on-brand .pptx from an IntermediateDocument. Trigger on "extract our brand", "use our deck template", "generate a branded deck from our profile", or when a ./brand-kit exists. For one-off slide edits with no saved brand profile, use the normal pptx skill instead. NOT for .docx (brand-docx), .xlsx (brand-xlsx), or PDFs.
In this repository3 other files it gives its agents.
- docs/llms.txtllms.txt
- brand-docxSkill
- brand-xlsxSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 11 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Use this skill when the user wants reusable branded PowerPoint generation from a company .pptx template and variable user-provided content.
- Very specific: line 24
Every brand skill (brand-docx, brand-pptx, brand-xlsx) implements the same contract.
- Very specific: line 45
Treat python scripts/cli.py ...
- Distinctive: line 47
Run the dependency preflight before starting extract / comprehend / verify / generate, and report missing or unusable dependencies before …
- Distinctive: line 50
Do not put style names, colors, fonts, or brand identifiers in an IntermediateDocument.
- Distinctive: line 51
If the user did not provide a template or enough content, ask for the missing input.
- Distinctive: line 57
Before doing any work, run:
- Distinctive: line 63
Use its output to decide the run mode:
- Distinctive: line 65
If a required Python dependency is missing, install/repair it before extraction or generation.
- Very specific: line 67
If only visual renderers are missing or unusable (soffice plus pdftoppm or optional PyMuPDF/fitz), the core L0 workflow can still run, but …
- Very specific: line 72
If optional OCR (tesseract) is missing, the visual audit can still run, but rendered residual-text proof is incomplete.
- Distinctive: line 81
Run the dependency preflight above and report any degraded capability.
- Very specific: line 83
If no matching brand-kit/<name> exists, extract one.
- Distinctive: line 88
Run QA and report any warnings honestly.
- Very specific: line 92
Before generation, inspect profile.json.artifact_catalog when the user asks to mimic a specific template piece.
- Very specific: line 116
Reuse before re-deriving: When a comprehension is present, prefer its component / section fragments (comprehension.fragments in …
- Distinctive: line 119
Never name a layout, font, size, or hex: If a block needs something the role table cannot express, say so in the QA summary instead of …
- Very specific: line 125
Ask for feedback only after you have returned the generated .pptx and its QA summary - never before or during generation.
- Very specific: line 142
When the SAME QA finding recurs across runs, you can also propose a shell-bound correction with propose-overrides: the comprehend-input …
- Distinctive: line 159
Read reference/comprehension.md for the full guidance, the six questions, and the anti-overfitting directive.
- Distinctive: line 191
Verify has no output to render, so all modes behave as L0 at verify time.
- Very specific: line 211
Read the manifest path from stdout (visual manifest: <path>).
- Very specific: line 215
If any checklist item FAILS (or an L1 WARNING is confirmed visually as a real defect, or a visual.ocr_residual_text hit is confirmed as …
- Very specific: line 231
After every repair, regenerate and rerun --qa deep or --qa strict.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
brand-pptx
Use this skill when the user wants reusable branded PowerPoint generation from
a company .pptx template and variable user-provided content.
This is an AI-agent skill for Codex and Claude Code. The user should describe
the deck they want; the agent converts that request into an IntermediateDocument,
uses the internal Python engine, verifies the output, and returns the generated
.pptx.
The seven verbs: three deterministic + four model-assisted
Every brand skill (brand-docx, brand-pptx, brand-xlsx) implements the same
contract. The deterministic core is extract / verify / generate; on top of it
sit the optional learning verbs comprehend / learn / propose-overrides /
refine, each fail-closed (the engine validates every proposal and authors every
value).
| Verb | Input | Output |
| extract | a company .pptx template | a reusable Brand Profile |
| comprehend (optional, model-driven) | a saved profile + a model-authored comprehension.json | the profile with a validated, cached comprehension block |
| verify | a saved Brand Profile | QA findings + a verdict |
| generate | content (an IntermediateDocument) + a profile | a new on-brand .pptx |
| learn (deterministic distillation) | the profile's cross-run generation history | recurring QA findings distilled into shell-frozen overrides, advisory until --accept |
| propose-overrides (model-driven) | the recurring remainder learn could not bind + a model-authored proposal | shell-backed corrections through the same fail-closed sink, advisory until --accept |
| refine | end-of-generation user feedback (text or a screenshot) as a refinement.json delta | the existing comprehension overlaid for FUTURE generations, advisory until --accept |
comprehend is optional: generate works on the deterministic profile alone.
See reference/comprehension.md for the full step.
Hard Rules
- Treat
python scripts/cli.py ...as an internal engine command, not the user-facing workflow. scripts/cli.pyis a LAUNCHER that locates the engine root by itself: it works from this skill folder AND from the repo/plugin root (setBRAND_DOCS_ROOTto override). Never guess deeper paths likescripts/brandkit/....- Run the dependency preflight before starting extract / comprehend / verify / generate, and report missing or unusable dependencies before proceeding.
- Extract opens the source template read-only and saves
brand-kit/<name>/template/shell.pptxbyte-for-byte. - Generate opens the saved shell and resolves every semantic block through
profile.json. - Do not put style names, colors, fonts, or brand identifiers in an IntermediateDocument.
- If the user did not provide a template or enough content, ask for the missing input.
- Return the generated file path plus a QA summary.
- Consult
profile.json.artifact_catalogbefore generation when the user asks to mimic a specific piece of the template.
Preflight (always first)
Before doing any work, run:
python scripts/cli.py doctorUse its output to decide the run mode:
- If a required Python dependency is missing, install/repair it before extraction or generation; the core engine is not ready.
- If only visual renderers are missing or unusable (
sofficepluspdftoppmor optional PyMuPDF/fitz), the core L0 workflow can still run, but a full visual audit cannot be claimed. Tell the user what is missing, include the install/repair hint printed bydoctor, and either proceed with degraded QA or install the renderer first. - If optional OCR (
tesseract) is missing, the visual audit can still run, but rendered residual-text proof is incomplete. Report that limitation when judging stale placeholders or field caches. - For
--qa deepor--qa strict, prefer repairing/installing renderers before generation. If the environment cannot run them,deepgenerates a degraded manifest andstrictfails with a visual proof blocker.
Agent Workflow
- Run the dependency preflight above and report any degraded capability.
- Determine the brand name and locate the user-provided
.pptxtemplate. - If no matching
brand-kit/<name>exists, extract one. - Comprehend the template (optional, model-driven; see below). Skip when a current comprehension is already cached or no model is available.
- Convert the user's outline/content into
IntermediateDocumentJSON. - Generate the
.pptxwith the internal engine. - Run QA and report any warnings honestly.
- Feedback (only after returning the file): invite a refinement of the understanding for future decks (see below).
Before generation, inspect profile.json.artifact_catalog when the user asks
to mimic a specific template piece. It records OOXML parts, media parts, slide
layouts, masters, placeholder geometry, slide texts, and slide size.
Authoring the IntermediateDocument
The IDoc is where "correct deck" becomes "great deck". Author it role-first, against the profile, never layout-first:
- Read
brand-kit/<name>/PROFILE.mdbefore writing a block. It lists the role table and the brand palette tokens. Choose every block by MEANING from that table; the engine maps it to the template's real masters and layouts. - One idea per slide. A slide carries one heading and a few supporting blocks; split dense content across slides instead of shrinking it. Decks read in seconds per slide, not minutes.
- Lead with structure. Cover fields first, an agenda where the deck keeps sections, then one section heading per major topic so the template's section scaffolding stays meaningful.
- Prefer native objects.
chart,table(merged cells included) and diagram blocks are authored NATIVELY: never describe a chart in prose or paste it as an image when a native block exists. - Color discipline. Placeholders inherit the brand from the layout: the
default is NO run color. For true emphasis, reference a palette role
(
primary,text, ...) or a theme slot (accent1), never a hex. - Reuse before re-deriving. When a comprehension is present, prefer its
component/sectionfragments (comprehension.fragmentsinprofile.json) with{{slot}}values over hand-building recurring slides. - Never name a layout, font, size, or hex. If a block needs something the role table cannot express, say so in the QA summary instead of inventing formatting: the resolver is the only author of values.
Feedback (end of generation)
Ask for feedback only after you have returned the generated .pptx and its
QA summary - never before or during generation. Invite the user to reply with
text or a screenshot of the deck, and name the roles, palette colors, and
sections you actually used so the answer is concrete. A screenshot is your own
multimodal read; the engine only ever ingests the structured JSON delta you
distil from it.
Turn the answer into a small refinement delta of verbatim ids and merge it with
the refine verb (see reference/comprehension.md):
python scripts/cli.py refine --name <brand> --input refinement.json --acceptA refinement improves FUTURE generations of this brand only - it mutates the
saved profile, never the .pptx you just produced. To apply it, generate again.
When the SAME QA finding recurs across runs, you can also propose a shell-bound
correction with propose-overrides: the comprehend-input bundle surfaces the
recurring generation_history, and you NAME a shell-backed re-point (a stub role to
an existing healthy role, a number_format mask the shell uses, or a captured demo
value) that the engine binds fail-closed (see
reference/comprehension.md). It is advisory until
--accept, improves FUTURE generations only, and every live correction surfaces
as an INFO override_applied finding in QA.
Internal Extract
python scripts/cli.py extract --name <brand> --template <template.pptx> --scope projectInternal Comprehend (optional, model-driven)
Read reference/comprehension.md for the full guidance, the six questions, and the anti-overfitting directive. In short:
python scripts/cli.py comprehend-input --name <brand> # prints {facts, excerpt} for the model
python scripts/cli.py comprehend --name <brand> --input comprehension.json # the ONLY writerSkip this verb when comprehension.status is present and its
source_shell_sha256 equals the live provenance.shell.sha256. Never re-run it
at generate time.
pptx readiness. The PowerPoint extractor surfaces cover anchors, the agenda/section-list field inventory when present, and slide regions. A current comprehension can therefore steer cover fill, demo-slide clearing, and agenda/section-list regeneration. If a deck genuinely has no agenda/section field, do not force one; a ref into an empty inventory is fail-closed and will be rejected. Deeper native-object authoring remains a pptx enrichment milestone.
Internal Verify
python scripts/cli.py verify --name <brand> --scope auto --qa auto--qa selects the QA depth (see reference/visual-audit.md):
fast: deterministic L0 only.auto: L0 + L1 visual pixel proxies when renderers (sofficepluspdftoppmor optional PyMuPDF/fitz) are present; otherwise L0 plus a single INFOvisual.unavailable.deep: L0 + L1 + avisual_manifest.jsonand per-page PNGs; iftesseractis installed the manifest also includes OCR text/hits. The orchestrator must then run the L2 step (see below).strict: deep visual audit plus gate errors when full render proof is unavailable or L1/OCR evidence is not clean.
Verify has no output to render, so all modes behave as L0 at verify time; the visual stages run at generate time.
Internal Generate
python scripts/cli.py generate --name <brand> --input <intermediate-document.json> --output <output.pptx> --scope auto --qa autoSee reference/comprehension.md and reference/visual-audit.md.
Visual audit (two-stage)
The engine renders the output and runs deterministic pixel proxies, but the qualitative visual judgement is yours (the orchestrator), never the engine's - the Python engine never calls a model. To run the full two-stage audit:
- Generate with
--qa deep. The engine renders each slide to a PNG, runs the L1 proxies, and writesvisual_manifest.jsonnext to the output in an<output-file>.visual/dir, such asdeck.pptx.visual/(a side artifact; the.pptxbytes never change). - Read the manifest path from stdout (
visual manifest: <path>). - Open the PNGs listed in
pages[*].png. For every entry inchecklist, judge PASS/FAIL against the rendered pages, takingl1_findingsandocr.hitsinto account. - If any checklist item FAILS (or an L1 WARNING is confirmed visually as a real
defect, or a
visual.ocr_residual_texthit is confirmed as stale visible template text): repair the IntermediateDocument/content or the generated composition, regenerate, then re-run the audit. Loop until the checklist is clean, or until no further targeted repair can be justified without user input.
L1 findings are WARNING-only and never fail the gate by themselves; the real qualitative gate is your L2 judgement.
During repair, treat the template as a source of reusable layout affordances, not
a rule to preserve blindly. If inherited placeholders, section/agenda slides,
layout geometry, or other template structures create blank slides, overlaps,
stale entries, or visibly broken pagination, diagnose the structure as the cause
and make the smallest targeted composition change. It is acceptable to collapse,
move, or remove inherited scaffolding when preserving it damages the final deck.
After every repair, regenerate and rerun --qa deep or --qa strict.
Current Guarantees and Limits
M2 supports title/content deck generation from the saved shell. Long content is
split across multiple content slides with a conservative capacity guard. When a
current comprehension block is present, generation reconciles the deck by keeping
structural slides, filling cover placeholders in place, clearing corroborated
demo slides, and regenerating the agenda/section list from the new headings.
Table blocks are authored as native PowerPoint table objects (honoring
colspan/rowspan merges). Chart, SmartArt, KPI and image blocks are also authored
natively and on-brand (a real graphicFrame chart inheriting the deck theme,
chevron/box autoshapes for SmartArt, a brand-styled metric table for KPIs, a
placed picture for images). A divider has no native pptx form and degrades
loudly (a visible block_degraded warning, never a silent drop).
The two-stage visual audit closes the "L0-only" gap: L1 deterministic pixel
proxies catch rendered-layout defects L0 cannot see (blank/broken slides, content
bleeding past the slide edges), and the L2 manifest drives the orchestrator's
qualitative judgement and repair loop. See
reference/visual-audit.md. When soffice and both
PDF rasterizers (pdftoppm, optional PyMuPDF/fitz) are absent (e.g. CI), the
audit degrades cleanly to L0 plus a single INFO
visual.unavailable; exit codes are unchanged.
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
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.

