Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Comprehensive AI design skill providing design intelligence across platforms with 161 reasoning rules.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/social-photos-design.md
1# Social Photos Design Guide23Design social media images via HTML/CSS rendering + screenshot export. Orchestrates `ui-ux-pro-max`, `brand`, `design-system`, and `chrome-devtools` skills.45## Platform Sizes67| Platform | Type | Size (px) | Aspect |8|----------|------|-----------|--------|9| Instagram | Post | 1080 x 1080 | 1:1 |10| Instagram | Story/Reel | 1080 x 1920 | 9:16 |11| Instagram | Carousel | 1080 x 1350 | 4:5 |12| Facebook | Post | 1200 x 630 | ~1.9:1 |13| Facebook | Story | 1080 x 1920 | 9:16 |14| Twitter/X | Post | 1200 x 675 | 16:9 |15| Twitter/X | Card | 800 x 418 | ~1.91:1 |16| LinkedIn | Post | 1200 x 627 | ~1.91:1 |17| LinkedIn | Article | 1200 x 644 | ~1.86:1 |18| Pinterest | Pin | 1000 x 1500 | 2:3 |19| YouTube | Thumbnail | 1280 x 720 | 16:9 |20| TikTok | Cover | 1080 x 1920 | 9:16 |21| Threads | Post | 1080 x 1080 | 1:1 |2223## Workflow2425### Step 1: Activate Project Management2627Invoke `project-management` skill to create persistent TODO tasks via Claude's native task orchestration. Break down into:28- Requirement analysis task29- Idea generation task(s)30- HTML design task(s) — can parallelize per size/variant31- Screenshot export task(s) — can parallelize per file32- Report generation task3334Spawn parallel subagents for independent tasks (e.g., multiple HTML files for different sizes).3536### Step 2: Analyze Requirements3738Parse user input for:39- **Subject/topic** — what the social photo represents40- **Target platforms** — which sizes needed (default: Instagram Post 1:1 + Story 9:16)41- **Visual style** — minimalist, bold, gradient, photo-based, etc.42- **Brand context** — read from `docs/brand-guidelines.md` if exists43- **Content elements** — headline, subtext, CTA, images, icons44- **Quantity** — how many variations (default: 3)4546### Step 3: Generate Ideas4748Create 3-5 concept ideas that:49- Match the input prompt/requirements50- Consider platform-specific best practices51- Vary in composition, color, typography approach52- Align with brand guidelines if available5354Present ideas to user via `AskUserQuestion` for approval before designing.5556### Step 4: Design HTML Files5758Activate these skills in sequence:59601. **`/ckm:brand`** — Extract brand colors, fonts, voice from user's project612. **`/ckm:design-system`** — Get design tokens (spacing, typography scale, color palette)623. **Randomly invoke ONE of:** `/ck:ui-ux-pro-max` OR `/ck:frontend-design` — for layout, hierarchy, visual balance. Pick one at random each run for design variety.6364For each approved idea + each target size, create an HTML file:6566```67output/social-photos/68├── idea-1-instagram-post-1080x1080.html69├── idea-1-instagram-story-1080x1920.html70├── idea-2-instagram-post-1080x1080.html71├── idea-2-instagram-story-1080x1920.html72└── ...73```7475#### HTML Design Rules7677- **Viewport** — Set exact pixel dimensions matching target size78- **Self-contained** — Inline all CSS, embed fonts via Google Fonts CDN79- **No scrolling** — Everything fits in one viewport80- **High contrast** — Text readable at thumbnail size81- **Brand-aligned** — Use extracted brand colors/fonts82- **Safe zones** — Critical content within central 80% area83- **Typography** — Min 24px for headlines, min 16px for body at 1080px width84- **Visual hierarchy** — One focal point, clear reading flow8586#### HTML Template Structure8788```html89<!DOCTYPE html>90<html>91<head>92<meta charset="UTF-8">93<meta name="viewport" content="width={WIDTH}, initial-scale=1.0">94<link href="https://fonts.googleapis.com/css2?family={FONT}&display=swap" rel="stylesheet">95<style>96* { margin: 0; padding: 0; box-sizing: border-box; }97html, body {98width: {WIDTH}px;99height: {HEIGHT}px;100overflow: hidden;101font-family: '{FONT}', sans-serif;102}103.canvas {104width: {WIDTH}px;105height: {HEIGHT}px;106position: relative;107/* Background: gradient, solid, or image */108}109/* Design tokens from brand/design-system */110</style>111</head>112<body>113<div class="canvas">114<!-- Content layers -->115</div>116</body>117</html>118```119120### Step 5: Screenshot Export121122Use Chrome headless, `chrome-devtools` skill, or Playwright/Puppeteer to capture exact-size screenshots.123124**IMPORTANT:** Always add a delay (3-5s) after page load for fonts/images to fully render before capture.125126#### Option A: Chrome Headless CLI (Recommended — zero dependencies)127128```bash129CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"130DELAY=5 # seconds for fonts/images to load131132"$CHROME" \133--headless \134--disable-gpu \135--no-sandbox \136--hide-scrollbars \137--window-size="${WIDTH},${HEIGHT}" \138--virtual-time-budget=$((DELAY * 1000)) \139--screenshot="output.png" \140"file:///path/to/file.html"141```142143Key flags:144- `--virtual-time-budget=5000` — waits 5s virtual time for assets (Google Fonts, images) to load145- `--hide-scrollbars` — prevents scrollbar artifacts in screenshots146- `--window-size=WxH` — sets exact pixel dimensions147148#### Option B: chrome-devtools skill149150Invoke `/chrome-devtools` with instructions to:1511. Open each HTML file in browser1522. Set viewport to exact target dimensions1533. Wait 3-5s for fonts/images to fully load1544. Screenshot full page to PNG1555. Save to `output/social-photos/exports/`156157#### Option C: Playwright script158159```javascript160const { chromium } = require('playwright');161162async function captureScreenshots(htmlFiles) {163const browser = await chromium.launch();164165for (const file of htmlFiles) {166const [width, height] = file.match(/(\d+)x(\d+)/).slice(1).map(Number);167168const page = await browser.newPage();169await page.setViewportSize({ width, height });170await page.goto(`file://${file}`, { waitUntil: 'networkidle' });171// Wait for fonts/images to fully render172await page.waitForTimeout(3000);173174const outputPath = file.replace('.html', '.png').replace('social-photos/', 'social-photos/exports/');175await page.screenshot({ path: outputPath, type: 'png' });176await page.close();177}178179await browser.close();180}181```182183#### Option D: Puppeteer script184185```javascript186const puppeteer = require('puppeteer');187188async function captureScreenshots(htmlFiles) {189const browser = await puppeteer.launch();190191for (const file of htmlFiles) {192const [width, height] = file.match(/(\d+)x(\d+)/).slice(1).map(Number);193194const page = await browser.newPage();195await page.setViewport({ width, height, deviceScaleFactor: 2 }); // 2x for retina196await page.goto(`file://${file}`, { waitUntil: 'networkidle0' });197// Wait for fonts/images to fully render198await new Promise(r => setTimeout(r, 3000));199200const outputPath = file.replace('.html', '.png').replace('social-photos/', 'social-photos/exports/');201await page.screenshot({ path: outputPath, type: 'png' });202await page.close();203}204205await browser.close();206}207```208209**IMPORTANT:** Use `deviceScaleFactor: 2` for retina-quality output (Puppeteer only).210211### Step 6: Verify & Fix Designs212213Use Chrome MCP or `chrome-devtools` skill to visually inspect each exported PNG:2142151. Open exported screenshots and check for layout/styling issues2162. Verify: fonts rendered correctly, colors match brand, text readable at thumbnail size2173. Check: no overflow, no cut-off content, safe zones respected, visual hierarchy clear2184. If issues found → fix HTML source → re-export screenshot → verify again2195. Repeat until all designs pass visual QA220221**Common issues to check:**222- Fonts not loaded (fallback to system fonts)223- Text overflow or clipping224- Elements outside safe zone (central 80%)225- Low contrast text (below WCAG AA 4.5:1)226- Misaligned elements or broken layouts227228### Step 7: Generate Summary Report229230Save report to `plans/reports/` with naming pattern from session hooks.231232Report structure:233234```markdown235# Social Photos Design Report236237## Overview238- Prompt/requirements: {original input}239- Platforms: {target platforms}240- Variations: {count}241- Style: {chosen style}242243## Ideas Generated2441. **{Idea name}** — {brief description, rationale}2452. ...246247## Design Decisions248- Color palette: {colors used, why}249- Typography: {fonts, sizes, why}250- Layout: {composition approach, why}251- Brand alignment: {how brand guidelines influenced design}252253## Output Files254| File | Size | Platform | Preview |255|------|------|----------|---------|256| exports/{filename}.png | {WxH} | {platform} | {description} |257258## Why This Works259- {Platform-specific reasoning}260- {Brand alignment reasoning}261- {Visual hierarchy reasoning}262- {Engagement potential reasoning}263264## Recommendations265- {A/B test suggestions}266- {Platform-specific tips}267- {Iteration opportunities}268```269270### Step 8: Organize Output271272Invoke `assets-organizing` skill to organize all output files and reports:273- Move/copy exported PNGs to proper asset directories274- Ensure reports are in `plans/reports/` with correct naming275- Clean up intermediate HTML files if requested276- Tag outputs with metadata (platform, size, concept name)277278## Design Best Practices279280### Platform-Specific Tips281282- **Instagram** — Visual-first, minimal text (<20%), strong colors, lifestyle feel283- **Facebook** — Informative, can have more text, eye-catching in feed284- **Twitter/X** — Bold headlines, contrast for dark/light mode, clear message285- **LinkedIn** — Professional, clean, data-driven visuals, thought leadership286- **Pinterest** — Vertical format, text overlay on images, how-to style287- **YouTube** — Face close-ups perform best, bright colors, readable at small size288- **TikTok** — Trendy, energetic, bold typography, youth-oriented289290### Art Direction Styles (Reuse from Banner)291292| Style | Best For | Key Elements |293|-------|----------|--------------|294| Minimalist | SaaS, tech, luxury | Whitespace, single accent color, clean type |295| Bold Typography | Announcements, quotes | Large type, high contrast, minimal imagery |296| Gradient Mesh | Modern brands, apps | Fluid color transitions, floating elements |297| Photo-Based | Lifestyle, e-commerce | Hero image, subtle overlay, text on image |298| Geometric | Tech, fintech | Shapes, patterns, structured layouts |299| Glassmorphism | SaaS, modern apps | Frosted glass, blur effects, transparency |300| Flat Illustration | Education, health | Custom illustrations, friendly, approachable |301| Duotone | Creative, editorial | Two-color treatment on photos |302| Collage | Fashion, culture | Mixed media, overlapping elements |303| 3D/Isometric | Tech, product | Depth, shadows, modern perspective |304305### Color & Contrast306307- Ensure WCAG AA contrast ratio (4.5:1 min) for all text308- Test designs at 50% size to verify readability309- Consider platform dark/light mode compatibility310- Use brand primary color as dominant, secondary as accent311312### Typography Hierarchy313314| Element | Min Size (at 1080px) | Weight |315|---------|---------------------|--------|316| Headline | 48px | Bold/Black |317| Subheadline | 32px | Semibold |318| Body | 24px | Regular |319| Caption | 18px | Regular/Light |320| CTA | 28px | Bold |321322## Security & Scope323324This sub-skill handles social media image design only. Does NOT handle:325- Video content creation326- Animation/motion graphics327- Print production files (CMYK, bleed)328- Direct social media posting/scheduling329- AI image generation (use `ai-artist` skill for that)330