cli/assets/skills/design/references/social-photos-design.md
Design social media images via HTML/CSS rendering + screenshot export. Orchestrates ui-ux-pro-max, brand, design-system, and chrome-devtools skills.
| Platform | Type | Size (px) | Aspect |
|---|---|---|---|
| Post | 1080 x 1080 | 1:1 | |
| Story/Reel | 1080 x 1920 | 9:16 | |
| Carousel | 1080 x 1350 | 4:5 | |
| Post | 1200 x 630 | ~1.9:1 | |
| Story | 1080 x 1920 | 9:16 | |
| Twitter/X | Post | 1200 x 675 | 16:9 |
| Twitter/X | Card | 800 x 418 | ~1.91:1 |
| Post | 1200 x 627 | ~1.91:1 | |
| Article | 1200 x 644 | ~1.86:1 | |
| Pin | 1000 x 1500 | 2:3 | |
| YouTube | Thumbnail | 1280 x 720 | 16:9 |
| TikTok | Cover | 1080 x 1920 | 9:16 |
| Threads | Post | 1080 x 1080 | 1:1 |
Invoke project-management skill to create persistent TODO tasks via Claude's native task orchestration. Break down into:
Spawn parallel subagents for independent tasks (e.g., multiple HTML files for different sizes).
Parse user input for:
docs/brand-guidelines.md if existsCreate 3-5 concept ideas that:
Present ideas to user via AskUserQuestion for approval before designing.
Activate these skills in sequence:
/ckm:brand — Extract brand colors, fonts, voice from user's project/ckm:design-system — Get design tokens (spacing, typography scale, color palette)/ck:ui-ux-pro-max OR /ck:frontend-design — for layout, hierarchy, visual balance. Pick one at random each run for design variety.For each approved idea + each target size, create an HTML file:
output/social-photos/
├── idea-1-instagram-post-1080x1080.html
├── idea-1-instagram-story-1080x1920.html
├── idea-2-instagram-post-1080x1080.html
├── idea-2-instagram-story-1080x1920.html
└── ...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width={WIDTH}, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css2?family={FONT}&display=swap" rel="stylesheet">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
width: {WIDTH}px;
height: {HEIGHT}px;
overflow: hidden;
font-family: '{FONT}', sans-serif;
}
.canvas {
width: {WIDTH}px;
height: {HEIGHT}px;
position: relative;
/* Background: gradient, solid, or image */
}
/* Design tokens from brand/design-system */
</style>
</head>
<body>
<div class="canvas">
<!-- Content layers -->
</div>
</body>
</html>
Use Chrome headless, chrome-devtools skill, or Playwright/Puppeteer to capture exact-size screenshots.
IMPORTANT: Always add a delay (3-5s) after page load for fonts/images to fully render before capture.
CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
DELAY=5 # seconds for fonts/images to load
"$CHROME" \
--headless \
--disable-gpu \
--no-sandbox \
--hide-scrollbars \
--window-size="${WIDTH},${HEIGHT}" \
--virtual-time-budget=$((DELAY * 1000)) \
--screenshot="output.png" \
"file:///path/to/file.html"
Key flags:
--virtual-time-budget=5000 — waits 5s virtual time for assets (Google Fonts, images) to load--hide-scrollbars — prevents scrollbar artifacts in screenshots--window-size=WxH — sets exact pixel dimensionsInvoke /chrome-devtools with instructions to:
output/social-photos/exports/const { chromium } = require('playwright');
async function captureScreenshots(htmlFiles) {
const browser = await chromium.launch();
for (const file of htmlFiles) {
const [width, height] = file.match(/(\d+)x(\d+)/).slice(1).map(Number);
const page = await browser.newPage();
await page.setViewportSize({ width, height });
await page.goto(`file://${file}`, { waitUntil: 'networkidle' });
// Wait for fonts/images to fully render
await page.waitForTimeout(3000);
const outputPath = file.replace('.html', '.png').replace('social-photos/', 'social-photos/exports/');
await page.screenshot({ path: outputPath, type: 'png' });
await page.close();
}
await browser.close();
}
const puppeteer = require('puppeteer');
async function captureScreenshots(htmlFiles) {
const browser = await puppeteer.launch();
for (const file of htmlFiles) {
const [width, height] = file.match(/(\d+)x(\d+)/).slice(1).map(Number);
const page = await browser.newPage();
await page.setViewport({ width, height, deviceScaleFactor: 2 }); // 2x for retina
await page.goto(`file://${file}`, { waitUntil: 'networkidle0' });
// Wait for fonts/images to fully render
await new Promise(r => setTimeout(r, 3000));
const outputPath = file.replace('.html', '.png').replace('social-photos/', 'social-photos/exports/');
await page.screenshot({ path: outputPath, type: 'png' });
await page.close();
}
await browser.close();
}
IMPORTANT: Use deviceScaleFactor: 2 for retina-quality output (Puppeteer only).
Use Chrome MCP or chrome-devtools skill to visually inspect each exported PNG:
Common issues to check:
Save report to plans/reports/ with naming pattern from session hooks.
Report structure:
# Social Photos Design Report
## Overview
- Prompt/requirements: {original input}
- Platforms: {target platforms}
- Variations: {count}
- Style: {chosen style}
## Ideas Generated
1. **{Idea name}** — {brief description, rationale}
2. ...
## Design Decisions
- Color palette: {colors used, why}
- Typography: {fonts, sizes, why}
- Layout: {composition approach, why}
- Brand alignment: {how brand guidelines influenced design}
## Output Files
| File | Size | Platform | Preview |
|------|------|----------|---------|
| exports/{filename}.png | {WxH} | {platform} | {description} |
## Why This Works
- {Platform-specific reasoning}
- {Brand alignment reasoning}
- {Visual hierarchy reasoning}
- {Engagement potential reasoning}
## Recommendations
- {A/B test suggestions}
- {Platform-specific tips}
- {Iteration opportunities}
Invoke assets-organizing skill to organize all output files and reports:
plans/reports/ with correct naming| Style | Best For | Key Elements |
|---|---|---|
| Minimalist | SaaS, tech, luxury | Whitespace, single accent color, clean type |
| Bold Typography | Announcements, quotes | Large type, high contrast, minimal imagery |
| Gradient Mesh | Modern brands, apps | Fluid color transitions, floating elements |
| Photo-Based | Lifestyle, e-commerce | Hero image, subtle overlay, text on image |
| Geometric | Tech, fintech | Shapes, patterns, structured layouts |
| Glassmorphism | SaaS, modern apps | Frosted glass, blur effects, transparency |
| Flat Illustration | Education, health | Custom illustrations, friendly, approachable |
| Duotone | Creative, editorial | Two-color treatment on photos |
| Collage | Fashion, culture | Mixed media, overlapping elements |
| 3D/Isometric | Tech, product | Depth, shadows, modern perspective |
| Element | Min Size (at 1080px) | Weight |
|---|---|---|
| Headline | 48px | Bold/Black |
| Subheadline | 32px | Semibold |
| Body | 24px | Regular |
| Caption | 18px | Regular/Light |
| CTA | 28px | Bold |
This sub-skill handles social media image design only. Does NOT handle:
ai-artist skill for that)