agentleFS
Light-hdzLight-hdz/claude-skills/open-slide/SKILL.md

open-slide

Skill0 starsChanged 7 months agoApache-2.0View on GitHub

Use when creating, editing, or initializing PPT/presentation slides with the open-slide framework — an AI-agent-native slide generation framework for React. Triggers: "create slides", "make a presentation", "init open-slide", "edit slide", "tweak this page", "fix the layout", "change the palette", or any work under `slides/<id>/index.tsx`.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 8 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every page renders into a fixed 1920×1080 canvas.

    line 67
  2. Very specific:

    Use absolute pixel values for font-size, padding, positioning.

    line 69
  3. Very specific:

    Prefer inline style={{ ...

    line 71
  4. Distinctive:

    Element height = font_size × line_height × number_of_lines: Add gaps (32-64px) between elements.

    line 94
  5. Distinctive:

    If you need to shrink type below the scale's lower bound or tighten line-height < 1.4 → split into two pages.

    line 111
  6. Very specific:

    Never: use overflow: auto/scroll, negative margins, or transforms to hide overflow.

    line 112
  7. Very specific:

    Every new slide MUST declare a top-level export const design: DesignSystem:

    line 116
  8. Very specific:

    Only skip the design const for a one-off slide whose palette is intentionally locked.

    line 140
  9. Very specific:

    Place under slides/<id>/assets/.

    line 154
  10. Distinctive:

    Only when a page NEEDS a real user-provided image (product screenshot, team photo, chart from their data):

    line 164
  11. Distinctive:

    Never use for decoration, stock photos, or filler.

    line 170
  12. Distinctive:

    Always the first child inside the JSX element it refers to.

    line 219
  13. Distinctive:

    Read file, find all markers, decode text

    line 225
  14. Distinctive:

    Remove each marker line after applying edit

    line 228
  15. Very specific:

    Verify zero remaining markers, run pnpm tsc --noEmit

    line 229

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

open-slide — AI-Agent-Native Slide Framework

open-slide is a slide framework built for AI agents. Describe your deck in natural language, your agent writes React. open-slide handles canvas, scaling, navigation, hot reload, and present mode.

Project Initialization

npx @open-slide/cli init my-slide
cd my-slide
pnpm dev

This scaffolds a minimal workspace:

my-slide/
├── slides/          # Your slides go here
├── themes/          # Optional theme definitions
├── open-slide.config.ts
├── package.json
└── pnpm-lock.yaml

The dev server runs at http://localhost:5173. Each slide is at http://localhost:5173/s/<slide-id>.

Hard Rules (NEVER VIOLATE)

  1. Only write slides/<kebab-case-id>/index.tsx — a single file per deck. Assets go in slides/<id>/assets/.
  2. Never touch package.json, open-slide.config.ts, or other slides.
  3. No dependencies — only React and standard web APIs are available.
  4. One index.tsx + assets — no sibling files (Card.tsx, components/, helpers.ts). Helper components/constants go inside index.tsx.
  5. No README.md or prose files inside slide folders.

File Contract

import type { DesignSystem, Page, SlideMeta } from '@open-slide/core';

export const design: DesignSystem = {
  palette: { bg: '#0f172a', text: '#f8fafc', accent: '#fbbf24' },
  fonts: {
    display: 'system-ui, -apple-system, sans-serif',
    body: 'system-ui, -apple-system, sans-serif',
  },
  typeScale: { hero: 180, body: 40 },
  radius: 12,
};

const Cover: Page = () => <div>...</div>;
const Body: Page = () => <div>...</div>;

export const meta: SlideMeta = { title: 'My Slide' };
export default [Cover, Body] satisfies Page[];
  • export default = non-empty array of zero-prop React components (one per page, in order).
  • meta.title (optional) shows in the slide header.
  • meta.theme (optional) back-links to a theme under themes/<id>.md.
  • Slide id = kebab-case folder name, short and descriptive.

Canvas — 1920×1080 Fixed

Every page renders into a fixed 1920×1080 canvas. The framework scales it.

  • Use absolute pixel values for font-size, padding, positioning. No rem, no vw/vh, no %.
  • Root element of each page: width: '100%'; height: '100%'.
  • Prefer inline style={{ ... }}. Global CSS is scoped — be careful.
  • Canvas does NOT scroll. Content below 1080px is silently cropped.

Type Scale

ElementSize
Hero title140–200px
Section heading80–120px
Page heading56–80px
Body text32–44px
Caption / label22–28px

Spacing

  • Content padding: 100–160px from canvas edges. Never let text touch the edge.
  • Line-height: 1.2 for headings, 1.5–1.7 for body.
  • Breathing room between elements: 32–64px.

Vertical Budget (CRITICAL — #1 cause of broken slides)

Usable height = 1080 − 2×padding. With 120px: 840px. With 160px: 760px.

Element height = font_size × line_height × number_of_lines. Add gaps (32-64px) between elements. Verify every page fits BEFORE writing.

Worked example (120px padding, budget 840px):

ElementHeight
Heading: 80px × 1.2 × 1 line96px
Gap64px
Body: 40px × 1.6 × 3 lines192px
Gap48px
5 bullets: 40px × 1.6 × 1 line each320px
4 gaps between bullets: 24px each96px
Total816px ✓ fits

Page-level rules:

  • One heading + body OR one heading + ≤5 short bullets. Not both.
  • Bullets fit on one line. If wrapping, shorten or split.
  • Hero title pages (140-200px): title + 1 subtitle only.
  • If you need to shrink type below the scale's lower bound or tighten line-height < 1.4 → split into two pages.
  • Never use overflow: auto/scroll, negative margins, or transforms to hide overflow.

Design System

Every new slide MUST declare a top-level export const design: DesignSystem:

export const design: DesignSystem = {
  palette: { bg: '#f7f5f0', text: '#1a1814', accent: '#6d4cff' },
  fonts: {
    display: 'Georgia, "Times New Roman", serif',
    body: '-apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif',
  },
  typeScale: { hero: 168, body: 36 },
  radius: 12,
};

Consumption:

  • var(--osd-X) for visual properties — instant updates while user drags Design panel sliders:
    • --osd-bg, --osd-text, --osd-accent
    • --osd-font-display, --osd-font-body
    • --osd-size-hero, --osd-size-body
    • --osd-radius
  • Direct design.X reads — for JS arithmetic or UI labels (update via HMR on commit, not while dragging).

Format constraints: must be export const design: DesignSystem = { ... } at module top level with a literal object (no spreads, no helper calls).

Only skip the design const for a one-off slide whose palette is intentionally locked.

Visual Direction

Pick ONE coherent look across every page:

  • Palette: 1 background, 1 primary text, 1 accent, 1 muted. Define as constants.
  • Typography: 1 display font + 1 body font. Heavy headings (800-900), normal body (400-500).
  • Layout: single content padding (e.g. 120px), consistent across pages.
  • Aesthetic: pick ONE — minimal, maximalist, editorial, retro, brutalist, soft/pastel, neon, paper/print.

Consult the frontend-design skill for deeper aesthetic guidance.

Assets

Place under slides/<id>/assets/. Import as ES modules:

import hero from './assets/hero.jpg';
<img src={hero} style={{ width: '100%', height: '100%', objectFit: 'cover' }} />

Skip assets/ for pure-text slides.

ImagePlaceholder

Only when a page NEEDS a real user-provided image (product screenshot, team photo, chart from their data):

import { ImagePlaceholder } from '@open-slide/core';
<ImagePlaceholder hint="Product hero screenshot" width={1280} height={720} />

Never use for decoration, stock photos, or filler. If typography/layout can carry the page — do that.

Repeated Elements: Component, NOT map

// ✅ CORRECT — each card is its own JSX node (inspector edits one at a time)
const Card = ({ src, label }: { src: string; label: string }) => (
  <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
    <img src={src} style={{ width: 320, height: 320, objectFit: 'cover' }} />
    <p style={{ fontSize: 32 }}>{label}</p>
  </div>
);

<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 64 }}>
  <Card src={alpha} label="Alpha" />
  <Card src={beta}  label="Beta"  />
  <Card src={gamma} label="Gamma" />
</div>

// ❌ WRONG — array.map body is ONE source location, inspector mutates all instances
items.map((item) => (<div><img src={item.src} /><p>{item.label}</p></div>));

Pure-text <ul><li> lists are fine — each <li> is its own JSX node.

Creating a New Deck — Workflow

Step 1 — Pick a theme

List themes/. If any .md files exist (not README.md), offer theme selection + "no theme" option.

Step 2 — Ask 4 required questions

  1. Aesthetic direction — 3 tailored visual directions (vibe + concrete visual cue), mark best fit as "(Recommended)"
  2. Page count — 3-5 (short) / 6-10 (standard) / 11-20 (deep dive) / custom
  3. Text density — minimal / light / standard / dense
  4. Motion — static / subtle / rich

Step 3 — Pick slide id (kebab-case)

Step 4 — Plan page structure (roles: Cover, Agenda, Section divider, Content, Big number, Quote, Comparison, Closing)

Step 5 — Commit to visual direction (design: DesignSystem)

Step 6 — Write slides/<id>/index.tsx (consult slide-authoring rules above)

Step 7 — Self-review (checklist below)

Step 8 — Hand off to user

Applying Inspector Comments (@slide-comment)

Marker format:

{/* @slide-comment id="c-<8hex>" ts="<ISO>" text="<base64url(JSON)>" */}
  • Always the first child inside the JSX element it refers to.
  • text is base64url-encoded JSON: {"note": "...", "hint"?: "..."}.
  • Detection regex: /\{\/\*\s*@slide-comment\s+id="(c-[a-f0-9]+)"\s+ts="([^"]+)"\s+text="([A-Za-z0-9_\-]+={0,2})"\s*\*\/\}/g

Procedure:

  1. Identify target slide(s)
  2. Read file, find all markers, decode text
  3. Understand each comment in context (enclosing element)
  4. Apply edits in reverse line order (bottom-up to preserve line numbers)
  5. Remove each marker line after applying edit
  6. Verify zero remaining markers, run pnpm tsc --noEmit
  7. Report: N applied, 0 remaining + description

Self-Review Checklist

  • slides/<id>/index.tsx exports a non-empty Page[]
  • Every page's root fills 100% × 100%
  • Content lives inside padding (no text kisses the edge)
  • Every page: sum(font_size × line_height × lines) + gaps + 2×padding ≤ 1080px
  • No bullet wraps to a second line
  • One coherent visual direction across all pages
  • Top-level export const design: DesignSystem = { ... } with var(--osd-X) references
  • One idea per page
  • Repeated elements are explicit <Component /> instances, not array.map
  • All imported assets exist on disk
  • ImagePlaceholders only for user-supplied images, not decoration
  • Nothing outside slides/<id>/ was edited

Anti-Patterns

  • ❌ Walls of text (>40 words/page → split)
  • ❌ Body copy without padding (use 100-160px)
  • ❌ Overflowing 1080px vertically (split the page)
  • ❌ overflow: auto/scroll/hidden to hide too much content
  • ❌ Shrinking type below scale bounds or padding < 100px (split instead)
  • ❌ Bullets that wrap to a second line
  • ❌ Body type < 28px (unreadable on projector)
  • ❌ Inconsistent palette across pages
  • ❌ Installing packages
  • ❌ CSS in shared files (inline styles only)
  • ❌ Creating README.md or prose files in slide folder
  • ❌ Editing package.json, open-slide.config.ts, or other slides
  • ❌ ImagePlaceholder as decoration/stock-photo slot
  • ❌ Using ImagePlaceholder for icons/decorative shapes (typography/SVG problem)
  • ❌ array.map for repeated visual elements (inspector can't edit individually)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.