Oh my ppt layout

From arcsin1/oh-my-ppt · View interactive version

Oh my ppt layout is an AI agent skill from the GitHub repository arcsin1/oh-my-ppt. Must be read before creating, relaying out, or repairing Oh My PPT slide layouts. Defines the per-page decision path, the named layout pattern catalog, canvas budgeting, collision avoidance, chart overpack guardrails, and title readability rules.

How to use this skill

Skill file

Oh My PPT Layout

This skill is the decision backbone for slide structure. Deep examples live in the references:

When to use

When not to use

1. The per-page decision path

Before writing HTML, answer these in order. The first three decide the role and density; the rest decide structure and budget.

  1. PPT message — what is the one sentence this page should make the audience remember within 3 seconds? Source material is evidence; the slide is an edited message.
  2. Role — what is this slide? (cover / data exhibit / comparison / timeline / concept / process / summary / quote / image-focus)
  3. Reading path — what does the audience see first → understand second → remember last?
  4. Content shape — which source facts support the message, which can be grouped, and which becomes compact secondary detail? A slide is a designed argument, not a document dump.
  1. Density — low (one hero or primary visual with limited support), medium (main + 1–2 support), or high (grid/table/matrix only when the content truly demands it)?
  2. Pattern + skeleton — use a named layout pattern from references/catalog.md when it clarifies the reading path or solves a known density risk; if the page risks becoming top-heavy, a canonical 1600×900 zone skeleton is a useful starting point. These are references, not a closed menu: create a fresh composition when the page thesis or style calls for it, while keeping the same semantic anchor and readable budget.
  3. Height budget — calculate the height budget so the chart and modules fit within 900px while preserving actual gaps between independent modules (see §4).
  4. Self-check width/height: Before calling the write tool, estimate the final layout. Width must fit 1600px and height must fit 900px, including padding, title/subtitle, rows, gaps, chart frames, footnotes, and likely text wrapping. If either dimension exceeds the canvas, redesign the composition and check again.

Then sketch the layout before writing (kept in your head, not emitted to the page). Picture the page as zones — what sits in each zone, roughly how tall, and how the zones balance across the full 1600×900. Confirm the sketch has a clear primary focus, actual gaps between independent modules, and no accidental large empty band; only then write the HTML. A quick shape for the sketch:

role: data-focus
density: medium
pattern: trend-exhibit
skeleton: chart-plus-insight-stack
zones: title/claim (~80, top) · dominant chart/visual middle (~420-500) · 1-2 metric chips or one insight band attached to chart · optional footnote — balanced, no accidental empty band
balance check: 3-second message visible, clear primary focus, actual gaps between independent modules, no crowded second support row
density check: if the source has too many facts, summarize before writing; do not turn every fact into a visible card
image policy: standard mode, no image request slot

The sketch is a thinking aid, not a template — keep the composition creative; just make sure the planned zones have clear hierarchy and actual gaps between independent modules before you write. The chosen pattern and skeleton are what you check against the structure recipe in catalog.md.

2. Layout pattern catalog entry

The catalog is advisory — patterns and skeletons are structure choices, not templates. Any pattern is re-visualized by the current style; the structure stays the same while style owns the look. Canonical 1600×900 skeletons and full four-part pattern definitions (input shape / structure recipe / budget rule / failure signs) are in references/catalog.md. Intent → pattern quick lookup:

| Intent | Patterns |

| --- | --- |

| cover | hero-title-center · hero-title-asymmetric · hero-big-number · section-divider |

| quote | hero-quote |

| summary | summary-takeaways · executive-brief |

| data-focus | kpi-hero · metric-band · trend-exhibit · chart-annotated |

| comparison | compare-two-zone · compare-options · decision-matrix |

| concept | concept-center-satellites · framework-2x2 · framework-pyramid |

| process | process-linear · process-loop |

| timeline | timeline-strip |

| image-focus | asset-image-hero · asset-text-visual-split |

The same role and density can produce several valid patterns — pick the one whose reading path and module count best match the content.

3. Canvas and spacing

Body content uses grid/flex flow

For code comparison of collision-prone vs reliable structures, read references/layout.md.

4. Height budgeting

Total canvas: 1600px wide × 900px tall. Before writing HTML, calculate the height budget in order — you run this calc yourself per page, there is no preset module size to copy:

  1. Outer padding (e.g. p-6 = 48px, p-8 = 64px)
  2. Title + subtitle area (~60–80px including gap)
  3. Gaps between modules (each gap-4 = 16px, gap-6 = 24px)
  4. Safety reserve (24–40px; use 40px for dense chart/table slides)
  5. Remaining = maximum space for chart/data modules. Size the primary module so the page carries its height while preserving actual gaps between independent modules. Do not leave modules small at the top with a large accidental empty band, and do not fill the slot by adding unnecessary cards.

Chart frame h-[Npx] must fit within the remaining space and feel intentional. Chart.js cannot use flex-1 / h-full, so first calculate the content slot, subtract support modules, then choose a role-appropriate chart height from the chart slot. Hero/main 380–560px, standard 280–360px, and compact support 220–280px are starting ranges for a 1600×900 canvas, not a composition template; scale or depart from them when the current canvas, chart semantics, or visual relationship calls for it. The chart skill's height comment must include the dedicated marker @ppt-chart-height=N, and the h-[Npx] class must use the same number. Never write chart height = 420 and then output h-[240px]. If the total exceeds 900px or becomes too dense, change the composition and hierarchy before shrinking everything.

In side-by-side or multi-column layouts, columns share width, not height. Do not divide the vertical content slot by the number of columns (for example, no 732/2 just because the page has left metrics and a right chart). Each column starts with the same vertical content slot; subtract only the modules stacked vertically inside that same column. A metric rail beside the chart affects width and hierarchy, not the chart height calculation.

Charts, tables, timelines, and long lists must share the same budget as titles and notes. Budget the chart frame height before writing HTML. Full walkthroughs are in references/layout.md.

5. Overpacked chart slide guardrails

Do not treat the missing runtime padding as permission to add more content. The slide canvas is full height, but dense content still needs actual gaps between independent modules.

For chart slides, decide the chart role before choosing layout density:

6. Title readability

Titles are part of the reading path, not a fixed header decoration.

7. Avoid accidental under-fill without overloading the page

This section applies to content and data pages. Low-density pages — cover, big-number, quote, section-divider — still need a dominant visual or typographic element that makes the composition feel complete. The failure is accidental under-fill where a few tiny modules sit at the top and the rest of the slide feels forgotten. Two forms hit this skill:

Before expanding, decide whether the page is truly sparse. A full source table, a multi-indicator comparison, or a chart plus a clear takeaway is already enough content; do not add more cards or a second summary layer. In those cases, fix distribution through hierarchy, actual module gaps, grouping, chart/table sizing, and compact annotations — not by adding content.

When the page content is truly sparse, supplement and expand in-page from the source material with substance (not decoration), but keep the result low-to-medium density. Strategies:

  1. Expand the argument — add context, comparison, baseline, reason, implication, or a "so what" line.
  2. Add a visual anchor — a diagram, axis, progress bar, timeline strip, comparison bracket, or quadrant using divs/SVG.
  3. Evidence rail — 1–2 supporting cards or metric chips alongside the main message; use 3 only when they are very short and parallel.
  4. Split into zones — claim + evidence, number + context, before + after, cause + effect.
  5. Give the main idea its full zone — scale up the hero number or chart so it owns its zone; a larger hero reads better than an empty band.
  6. Pair a modest chart with right-sized support — if a chart's zone is much taller than the chart needs (e.g. a 5-bar chart in a ~600px cell), do not stretch the chart to an awkward height. Keep the chart at a readable size and use the remaining space only for the support the content actually needs, in whatever form best serves the reading path.

Expansion is conditional and conservative. If the slide is already medium/high density, or if the source already provides enough facts for the page, the fix is not more content; it is compression and hierarchy. Turn extra facts into a short evidence rail, compact table rows, grouped bullets, chart annotations, or one key-takeaway band so the page still fits 1600x900 cleanly with actual gaps between independent modules.

Stay grounded: extend from the source material's theme, conclusions, and data direction. Reasonable inference, explanation, implication, and framing are allowed; do not invent unsupported specific facts, numbers, cases, quotes, or source claims.

For dense source tables or lists, preserve the source meaning by editing it into a presentation, not by mirroring the document. Choose one primary expression (timeline, table, chart, hero metric, or comparison) and avoid repeating the same fact again as equal-weight summary cards. If all rows truly matter, use a compact table/timeline or split the material across pages; do not stack full cards until the slide becomes a data archive.

These map directly onto catalog patterns (summary-takeaways, kpi-hero, compare-two-zone, concept-center-satellites, etc.).

8. Deck-level rhythm

Across a deck, vary the structure so consecutive slides feel different, not like the same template with swapped content.

Limitation: deck-level rhythm applies to the deck-generation main flow where the model writes several pages in sequence. Single-page edit does not control neighbor pages, so it only needs to fit the page it is given.

9. Style coordination (boundary and priority)

Oh My PPT separates two concerns:

The current style may include its own "layout" advice and composition tendencies; that is expected. When style and this skill interact:

When a style's "layout" section conflicts with a structural rule here, follow the structural rule and keep the style's visual treatment.

10. Failure repair strategy

When a slide overflows, collides, exceeds the canvas, or is under-filled (a large empty band because the modules cover only part of the height):

  1. Revisit density and hierarchy first — decide what should be hero, support, annotation, or background.
  2. Change the pattern — switch to a different catalog pattern whose structure recipe absorbs the content better (e.g. from a card grid to an evidence rail, bento grid, metric band, or timeline strip).
  3. Change representation — convert full cards into labels, bands, rows, annotations, or compact modules only when the density calls for it.
  4. Rebudget chart height — if the page has a chart, calculate the content slot, subtract support modules to get the chart slot, and choose a role-appropriate h-[Npx]; update the height comment so the final number matches the class.
  5. Check nesting — flatten any deep wrapper chains that consume vertical space.

For under-fill (the mirror problem), apply §7: enlarge the primary module modestly, preserve actual gaps between independent modules, or add one substantive evidence/annotation zone in-page. Do not patch an empty page with decorative filler or a pile of new cards.

For the full P0/P1/P2 self-check list, read references/checklist.md.

11. Cross-skill references

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.