Skip to content

Instantly share code, notes, and snippets.

@adiprnm
Created July 18, 2026 16:11
Show Gist options
  • Select an option

  • Save adiprnm/b223c0a3b4e1d9fd6e2946d66ff6661a to your computer and use it in GitHub Desktop.

Select an option

Save adiprnm/b223c0a3b4e1d9fd6e2946d66ff6661a to your computer and use it in GitHub Desktop.
Carousel Creator Skill
---
name: carousel-creator
description: "Membuat carousel slides aesthetic untuk social media (Instagram, LinkedIn, Twitter/X, Facebook, TikTok) menggunakan HTML/CSS, lalu convert ke PNG via Chrome headless. Selalu gunakan frontend-design skill untuk arah desain dan custom prompt template anti-emdash. Use when the user mentions 'carousel,' 'carousel slides,' 'buat carousel,' 'slide deck,' 'multi-slide post,' 'swipe post,' or wants visual slide content for social media. Untuk caption-nya, gunakan caption-writer-sms."
metadata:
version: 1.0.0
---
# Carousel Creator
## When to Use
- User asks to **create carousel slides** for social media
- User mentions "carousel," "slide deck," "swipe post," "multi-slide post"
- User wants visual slides for Instagram, LinkedIn, Twitter/X, Facebook, or TikTok
- User says "buat carousel," "buat slide," or shares content to be turned into carousel format
- User wants to convert a blog post, thread, or idea into visual slide format
This skill handles **design and image generation only**. For carousel captions and hashtags, use **caption-writer-sms**.
## Design Guidance
**Always read and apply the `frontend-design` skill** when creating carousels. Before you start designing:
1. Read the frontend-design skill instructions
2. Follow its principles for distinctive, intentional visual design
3. Apply its typography guidance for font pairing and type scale
4. Use its approach to color palettes and layout decisions
5. Avoid templated defaults — make deliberate design choices
This is not optional. Every carousel should reflect the design principles from frontend-design.
## Custom Prompt Template: Anti-Emdash
**Always apply this rule** when writing any text for carousel slides (headlines, body copy, CTAs, labels, or any visible text):
> **No em-dashes (—). Ever.**
>
> Replace every em-dash with one of these alternatives, depending on context:
> - **Comma (,)** for natural pauses
> - **Colon (:)** for reveals or explanations
> - **Period (.)** for hard stops and emphasis
> - **Line break** for visual separation
> - **Parentheses ()** for asides
> - **Hyphen (-)** only for compound words, never as a dash substitute
>
> Also ban: en-dash (–) used as a dash, double-hyphen (--).
> Single hyphens in compound words are fine (e.g., "anti-emdash", "scroll-stopping").
This applies to all languages. Check every piece of text before rendering.
## Role
You are a visual designer who creates clean, aesthetic carousel slides. You think in terms of visual hierarchy, whitespace, typography, and color. Every slide must be scannable in under 3 seconds. You use HTML/CSS as your design tool and Chrome headless as your renderer.
## Context Check
Before designing, check `.agents/social-media-context-sms.md` for brand colors, voice, and visual preferences. If it exists, use the voice adjectives, brand colors, and tone to guide design decisions.
If the file does not exist, ask for: brand colors (or let user pick a palette), tone (professional/playful/minimal/bold), and any visual references.
---
## Workflow
### Step 1: Gather Requirements
Ask only for what's missing:
- **Platform** — Instagram, LinkedIn, Twitter/X, Facebook, TikTok
- **Topic/content** — what the carousel is about
- **Number of slides** — or estimate from content (typically 5-10)
- **Brand colors** — hex codes or let user pick
- **Style** — minimal, bold, playful, corporate, editorial, dark mode, etc.
If user provides a blog post, article, or thread to convert: extract key points, structure them into a slide narrative, then design.
### Step 2: Plan Slide Structure
Every carousel needs a narrative arc:
1. **Hook slide** (slide 1) — bold headline, stops the scroll
2. **Context slide** (slide 2, optional) — why this matters
3. **Content slides** (slides 3-N) — one idea per slide, visual + minimal text
4. **Summary/CTA slide** (last slide) — key takeaway + follow/save prompt
Rules:
- **One idea per slide.** If a slide has 2+ concepts, split it.
- **Max 40 words per slide** (excluding headlines). Density kills engagement.
- **Headline ≤ 8 words.** Subtext ≤ 20 words.
- **Visual hierarchy:** headline → supporting text → accent element
### Step 3: Design with HTML/CSS
Create a project folder structure:
```
carousel-[project-name]/
├── src/ # HTML source files
└── output/ # Final output (PNG and/or PDF)
```
Create HTML files in `src/`. Each slide is a `<div>` with fixed dimensions matching the target platform.
#### Platform Dimensions
| Platform | Width | Height | Ratio | Notes |
|----------|-------|--------|-------|-------|
| Instagram (portrait) | 1080 | 1350 | 4:5 | Best for feed reach |
| Instagram (square) | 1080 | 1080 | 1:1 | Classic |
| LinkedIn | 1080 | 1350 | 4:5 | Same as IG portrait |
| LinkedIn (square) | 1080 | 1080 | 1:1 | Also works |
| Twitter/X | 1200 | 675 | 16:9 | Landscape |
| Twitter/X (square) | 1080 | 1080 | 1:1 | Also works |
| Facebook | 1080 | 1080 | 1:1 | Square preferred |
| TikTok | 1080 | 1920 | 9:16 | Full portrait |
#### HTML Template Structure
```html
<!DOCTYPE html>
<html>
<head>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
.slide {
width: 1080px;
height: 1350px;
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 80px;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div class="slide" id="slide-1">
<!-- Slide 1: Hook -->
</div>
<div class="slide" id="slide-2">
<!-- Slide 2: Content -->
</div>
<!-- more slides... -->
</body>
</html>
```
For multiple slides, wrap each slide in its own `<div>` and use CSS to control layout. Export each slide individually by targeting specific elements.
#### Design Principles
- **Whitespace is the design.** Minimum 80px padding on all sides. More is better.
- **Typography does the work.** Use size contrast: headlines 72-120px, body 32-40px, captions 24px.
- **Max 2 fonts.** One display (bold/heavy weight for headlines), one body (regular/light for text).
- **Color palette: 3 colors max.** Background, text, one accent. Use accent sparingly (highlights, underlines, numbers).
- **Consistent layout across slides.** Same padding, same text alignment, same accent position. Only content changes.
- **Numbers and lists are visual.** Style numbers large (120px+), use them as design elements, not just text.
- **No stock photos or clip art.** Use color, typography, and simple geometric shapes as visual interest.
#### Available Local Fonts
Prefer these fonts (already installed, no network dependency):
- **Inter** — modern sans, great for headlines and body (`Inter 18pt` family)
- **Open Sans** — clean, friendly, versatile
- **Liberation Sans / Serif** — neutral, professional
- **Ubuntu / Ubuntu Sans** — slightly distinctive, modern
- **DejaVu Sans / Serif** — reliable fallback
- **Hoefler Text** — elegant serif, editorial feel
For maximum aesthetic quality, **use Google Fonts via CDN** (`@import`) — this gives access to the full font library. Common high-quality choices: Inter, Space Grotesk, Instrument Serif, Syne, DM Sans, General Sans, Cabinet Grotesk.
#### CSS Techniques for Aesthetic Slides
```css
/* Gradient backgrounds */
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
/* Subtle texture with noise (via SVG filter) */
background-image: url("data:image/svg+xml,...");
/* Accent underline for headlines */
text-decoration: underline;
text-decoration-color: #accent;
text-decoration-thickness: 8px;
text-underline-offset: 12px;
/* Numbered slides — large background numbers */
.slide-number::before {
content: "01";
position: absolute;
font-size: 400px;
font-weight: 900;
opacity: 0.05;
top: -40px;
right: 40px;
}
/* Pill/tag styling */
.tag {
display: inline-block;
padding: 8px 20px;
border-radius: 100px;
font-size: 20px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 2px;
}
/* Card-style content blocks */
.card {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 16px;
padding: 40px;
}
/* Gradient text */
background: linear-gradient(90deg, #color1, #color2);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
```
### Step 4: Export to PNG/PDF
Use Chrome headless to render slides from `src/` to `output/`.
**Export individual PNG slides** (for social media upload):
```bash
for i in 1 2 3 4 5; do
google-chrome --headless --disable-gpu --no-sandbox \
--screenshot="output/slide-${i}.png" \
--window-size=1080,1350 \
--force-device-scale-factor=1 \
file://$(pwd)/src/slide-${i}.html
done
```
**Export as PDF** (for sharing/printing as combined document):
```bash
google-chrome --headless --disable-gpu --no-sandbox \
--print-to-pdf="output/carousel.pdf" \
--no-pdf-header-footer \
file://$(pwd)/src/all-slides.html
```
For PDF export, create `src/all-slides.html` with all slides stacked vertically using CSS:
```css
.slide { page-break-after: always; }
```
**Retina-quality output:** use `--force-device-scale-factor=2` for 2x resolution. Default to 1x unless asked.
### Step 5: Deliver
Output from `output/` folder:
1. PNG files (one per slide, numbered sequentially) for social media upload
2. PDF file (combined document) if requested
3. Brief description of the design choices (palette, fonts, style direction)
4. Offer iteration: "Mau adjust warna, font, layout, atau copy-nya?"
Source HTML files remain in `src/` for easy editing and re-export.
---
## Design Style Examples
When the user hasn't specified a style, choose based on the topic. Default to **clean minimal**.
### Clean Minimal (default)
- White or off-white background (#FAFAFA or #F8F7F4)
- Dark text (#1A1A1A or #111)
- Single accent color
- Inter or DM Sans, generous spacing
- No decorative elements — type IS the design
### Bold/Dark
- Dark background (#0D0D0D or deep navy)
- White text, bright accent (#FF4D4D or #00E676)
- Large type, tight tracking
- Gradient accents on key words
- Geometric shapes as subtle background elements
### Editorial
- Cream/warm background (#F5F0E8)
- Serif headlines (Instrument Serif, Playfair, or Hoefler Text)
- Sans-serif body
- Thin rules/lines as dividers
- Magazine-style layout with asymmetric grids
### Playful/Colorful
- Bright or pastel background
- Rounded corners on elements
- Multiple accent colors (but still ≤ 3)
- Larger, friendlier type
- Stickers/badges as visual elements
### Corporate/Professional
- Navy or slate background
- White text, gold or teal accent
- Clean grid layout
- Consistent iconography (via CSS shapes or emoji)
- Data-forward: stats, percentages, charts via CSS
---
## Slide Content Patterns
### List/Tip Carousel
```
Slide 1: "[Number] [Things] That [Outcome]" (hook)
Slide 2-8: Each tip — large number + 1-2 sentence explanation
Slide 9: Summary — all tips in one view
Slide 10: CTA — "Save this for later" + follow prompt
```
### How-To Carousel
```
Slide 1: "How to [Achieve Outcome]" (hook)
Slide 2: Context — why this matters / the problem
Slide 3-7: Steps — one per slide, with visual
Slide 8: Common mistakes to avoid
Slide 9: Summary/recap
Slide 10: CTA
```
### Story/Case Study Carousel
```
Slide 1: Provocative statement or result (hook)
Slide 2: "Here's what happened..."
Slide 3-6: Story progression, one beat per slide
Slide 7: The result / data
Slide 8: Key lesson
Slide 9: CTA
```
### Comparison Carousel
```
Slide 1: "[X] vs [Y]" or "Stop doing [X], start doing [Y]" (hook)
Slide 2-7: One comparison per slide (left/right or before/after)
Slide 8: Summary table
Slide 9: CTA
```
---
## Accessibility & Quality Checklist
Before exporting, verify:
- [ ] **Text is readable** — sufficient contrast (WCAG AA minimum: 4.5:1 for body text)
- [ ] **Font size ≥ 28px** for body text on 1080px-wide slides
- [ ] **Headlines ≥ 64px** — must be readable at thumbnail size
- [ ] **Consistent margins** — same padding on every slide
- [ ] **No orphan lines** — no single word on its own line
- [ ] **Slide numbers** (subtle) — helps viewers track progress
- [ ] **CTA on last slide** — always include a clear next action
- [ ] **Brand consistency** — same fonts, colors, spacing across all slides
---
## Boundaries
- Does not write carousel captions or hashtags — use **caption-writer-sms**
- Does not plan content strategy or topic clusters — use **content-strategy-sms**
- Does not write hooks independently — use **hook-writer-sms** for standalone hook work
- Does not schedule or publish — content is delivered as PNG files ready for manual upload
## Related Skills
- **caption-writer-sms** — write the caption that accompanies the carousel
- **social-media-context-sms** — brand colors, voice, and visual preferences
- **hook-writer-sms** — craft the opening hook for slide 1
- **content-strategy-sms** — plan what carousel topics to create
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment