social-cards
Skill0 starsChanged 5 days agoMITView on GitHub
Make Instagram-style cards (4:5, 1080×1350) and short card reels (9:16 MP4) for LinkedIn or Instagram from a project's blog posts, services or case studies. Fixed HTML layouts (big-stat, checklist, chip-grid, quote, steps, summary, hook, photo, cta) on three themes, in the project's own brand fonts and colours, rendered with headless Chrome and ffmpeg. Use when the user says "social cards", "LinkedIn cards", "Instagram cards", "carousel", "card reel", or wants a post image for an article or service.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- DennisWei9898/social-cards-enginetheir own version, first seen Jul 7, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- DennisWei9898/social-cards-engine★ 33same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- content-writerSkill
- full-stack-mvp-builderSkill
- lucidreactor-uiSkill
- screenshotsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Find the brand: Read the project's global.css or design tokens and its fonts folder.
- Distinctive: line 49
Pick the content: Read the article or page. One card = one idea the reader can use.
- Distinctive: line 51
Keep the project's own wording and tone (check its CLAUDE.md for writing rules).
- Very specific: line 87
Carousel (multi-card post): Put the cards of one story in their own cards.json (3–5 cards: hook with a cover image → 1–3 content cards → …
- Very specific: line 96
Use the project's own pictures (article hero images, product screenshots).
- Distinctive: line 153
Write voice lines as speech: short sentences, numbers as words, no symbols.
- Very specific: line 176
Keep clips in the project (source/clips/), not in the skill.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.
Files
Social cards
Turn an article, a service or a case study into one or more branded cards. The look follows the
storyboard project (~/work/gannett/storyboard): one idea per card, big type, a label pill at the top,
the brand mark top right, a source line and a call to action at the bottom.
The AI writes the words. The look is fixed in templates/card.css. Never hand-build HTML per card.
Files
scripts/render-cards.mjs cards.json + brand.json → PNG per card, PDF carousel, slideshow MP4
scripts/render-reel.mjs cards.json + brand.json → animated 9:16 reel with music (the storyboard way)
scripts/lib/scene.mjs shared: brand loading, scene markup, Chrome lookup
templates/card.css the card system (layouts, themes, type scale)
templates/reel.css reel motion: staggered entrances, word reveals, count-ups, Ken Burns
music/ music beds by mood, downloaded on first use (Mixkit free licence)
examples/lucidreactor*/ working brand.json + cards.json (single cards, and a 3-card carousel)Needs: Node 22+, Google Chrome or Chromium on PATH (or CHROME=/path), ffmpeg. No npm packages.
Workflow
Find the brand. Read the project's
global.cssor design tokens and its fonts folder. Writebrand.jsonnext to the cards (paths are relative to that file):{ "name": "LucidReactor Labs", "site": "lucidreactor.com", "logo": "../logo.svg", "fonts": { "display": { "family": "Fraunces", "file": "../../fonts/fraunces-latin.woff2", "weight": "400 600" }, "body": { "family": "Inter", "file": "../../fonts/inter-latin.woff2", "weight": "400 600" }, "mono": { "family": "JetBrains Mono", "file": "../../fonts/jetbrains-mono-latin.woff2", "weight": "400 500" } }, "colors": { "ink": "#15171C", "raised": "#1F2229", "accent": "#B5481A", "accentFg": "#F5F3EE", "accentOnInk": "#D9683A", "paper": "#F5F3EE", "muted": "#9A9DA4", "line": "#D6D2C8" } }accentOnInkis the accent used as a highlight on the dark theme. If the brand accent is dark (like rust), pick a lighter tint so it reads on ink (aim for 4.5:1).accentFgis the text colour on the accent theme. Fonts without afilefall back to system fonts. Keeplogosquare.- Pick the content. Read the article or page. One card = one idea the reader can use. Prefer a number, a list, a quote or a set of named options over a sentence. Every fact must be in the source. Keep the project's own wording and tone (check its CLAUDE.md for writing rules).
Write
cards.json. An array of cards. Shared fields:id(file name),layout,theme(dark|paper|accent),label(pill text, e.g. the article category),headline,body(one or two sentences, optional),eyebrow(optional; use "1 / 3" on carousel cards),source(short: the site or section, it is one line),cta("Read the article →"),image(path relative to cards.json),imageMode(band= the whole picture at the top with the text below, the default;cover= full bleed behind the text, the default forhookandphoto),imageFocus("50% 30%", object-position for the band),bandHeight(default52.5cqw, which fits a 1200×630 hero).Layout Extra fields Use for big-statstat: {value, label},rows: [{label, value, was?}]one number that carries the story checklistchecks: [{text, known?}]a list of rules or steps (✓), open questions ( known: false→ ?)chip-gridchips: {items: [[title, sub]…], highlight}4 named options or verdicts quotequote: {text, speaker, context}one strong sentence from the piece stepssteps: [{n?, title, text}]a numbered process (3–4 steps) summary/takeawaybullets: []headline + 2–3 bullets hook– big opening line (first card of a carousel) photoimageheadline over a full-bleed photo ctabuttonlast card of a carousel quizoptions: [4 strings],aska four-answer quiz (A-D) with a photo band; put the answer in the caption, not on the card specspecs: [{icon, label, value}](4-5),eyebrow= the verdict labela machine or product in a framed photo with icon spec rows; icons: pressure, heat, grinder, portafilter, milk, tank, size, gauge, power, check Render.
node ~/.claude/skills/social-cards/scripts/render-cards.mjs path/to/cards.json --out path/to/out # options: --brand brand.json --size card|reel|square --only id,id --keep-html # --pdf carousel.pdf (one page per card: a LinkedIn document post) # --video out.mp4 --seconds 3.5 --fade 0.6 (slideshow of the cards, 1080×1920)Then look at every PNG (Read tool). Check: nothing clipped, contrast fine, no orphan words in the headline, footer on one line. The body auto-shrinks when it is too tall; if a card shrank a lot, cut words instead.
- Carousel (multi-card post). Put the cards of one story in their own
cards.json(3–5 cards:hookwith a cover image → 1–3 content cards →cta). Render with--pdf. On LinkedIn, upload the PDF as a document post: that is the swipeable carousel. Uploading 3 PNGs gives a grid, not a swipe. On Instagram, upload the PNGs in order. - Hand over. List the PNG paths and the suggested post order. Do not post or deploy anything.
Rules of the look (from the storyboard project)
- Use the project's own pictures (article hero images, product screenshots). At least half of the cards
in a set should carry one. A wide hero goes in a
band; ahookusescover. - Alternate themes between cards so a swipe feels like a new scene: dark → paper → accent → dark.
- A card has one headline and one visual block. No second idea.
- Headline: 4–9 words. Body: at most two short sentences. List items: one line each.
- Numbers go in
big-statorrows, never in a paragraph. - A carousel (multi-card post) starts with a
hook(or abig-stat) and ends with acta. - A single-image post needs a self-contained card: headline + one visual + source + cta.
- Sensitive topics stay calm: no exclamation marks, no bold claims.
Video: the animated reel
node ~/.claude/skills/social-cards/scripts/render-reel.mjs path/to/cards.json --out path/to/reel.mp4 \
--music warm --poster path/to/poster.jpg
# --music warm|uplifting|energetic|serious|reflective|none|<file.mp3> --fps 30 --hold 1.5
# --only id,id --keep-html (leaves reel.html next to the MP4: open it in a browser to preview the motion)The same cards.json gives the reel, so the video matches the cards. How it works, as in the storyboard project: one HTML page holds every scene stacked; every CSS animation is seeked to the frame's instant (no timers, so a frame is identical whenever it is rendered); Chrome, driven over the DevTools protocol, screenshots each frame; ffmpeg encodes them; then a music bed is mixed under (loudness-normalised, fade in and out). About 60 s of render per 15 s of video. Output: 1080×1920 H.264 + AAC.
secondson a card sets its scene length. Defaults by layout are inlib/scene.mjs(hook 3.5 s, lists 5–6 s). The last scene holds--holdseconds longer.- Motion by layout:
hookandquotereveal word by word;big-statcounts up; lists tick in one row at a time; pictures drift (Ken Burns); thectabutton pulses. - For a reel, write the
ctatext for a viewer, not a swiper ("Read the article →", not "Swipe →"). - Pick the mood from the piece:
reflectiveorwarmfor essays,seriousfor audits and data,upliftingorenergeticfor launches.nonefor a voiceover you add later. - Motion by layout also covers
clip: no Ken Burns on a clip, just a fade in. --videoon render-cards.mjs still makes a plain crossfade slideshow of the PNGs when motion is not wanted.
Voiceover and captions
Give a card a voice sentence and the reel speaks it over that scene. Pass --captions on to also show
the words in the lower third as they are said (the current word lights up); captions are off by default. The scene stretches to fit the line
(0.4 s lead, 0.7 s tail), and the music dips while the voice plays.
node ~/.claude/skills/social-cards/scripts/render-reel.mjs cards.json --out reel.mp4 --music warm
# --tts edge|kokoro|none --voice en-GB-RyanNeural|am_michael --rate +3%|1.05 --captions on|off (off by default)- Engines, through
scripts/tts.py, as used in the Halal Code Check shorts (edge-tts) and the gomdecom explainer (Kokoro): edge = Microsoft Edge voices, free, online, exact word timings, many voices (edge-tts --list-voices); kokoro = Kokoro-82M, offline, fewer voices, word timings estimated. The Python for each engine, the default voice and rate are inconfig.json. If Edge returns a 403, upgrade the package:<python> -m pip install -U edge-tts. ttson a card overrides the spoken text (phonetic spelling, "lucid reactor dot com");voicestays the clean text for the captions.reelCtaon a card replaces itsctain the reel ("Keep watching →", or "" to hide it).- Audio files are cached in
.voice/beside the output, keyed by engine, voice, rate and text, so a re-render with the same lines is instant. Delete the folder to re-speak everything. - Write voice lines as speech: short sentences, numbers as words, no symbols. One line is 1–3 sentences; a 3-card reel with voice runs 30–45 s.
- Mix: voice loudness-normalised to −16 LUFS, music at −24 LUFS × 0.35 and dipped 80 % under speech with 0.4 s ramps, both faded out over the last 1.5 s.
Video clips
A card with a clip shows a cut of a video: full bleed behind the headline on layout clip (or
hook), or as the top band on any other layout (clipMode: "cover" | "band" overrides).
{ "id": "demo", "layout": "clip", "theme": "dark", "label": "Halal Code Check",
"clip": { "file": "../clips/scanner.mp4", "start": 9.3, "duration": 9.5, "sound": true },
"headline": "The label is read on the phone.", "source": "halalcodecheck.com" }- The frames are extracted once with ffmpeg at the reel frame rate (cached in
.clips/beside the output) and swapped in per rendered frame, as the storyboard renderer does, so a frame is exact. - The scene lasts at least the clip's duration; a longer
voiceholds the last frame. sound: truelays the clip's own audio under the scene, levelled and faded; it dips while a voice line plays, and the music dips under both.sound: falsemakes it silent b-roll under the voice.- Sources: screen recordings, phone videos, earlier product videos. A 9:16 source suits
cover; a band suits landscape screen captures. Top-of-frame text in the source will sit under the pill. - Keep clips in the project (
source/clips/), not in the skill. They are the user's footage.
Known details
- Headless Chrome keeps some of the window height for itself (87 px in Chrome 143). The script measures it with a probe page, opens a taller window and crops with ffmpeg. Output is always exactly W×H.
- The fit script runs after
document.fonts.ready;--virtual-time-budget=3000lets it finish. - The renderer uses
--no-sandboxso it also works in WSL and containers. - render-reel.mjs sets the viewport with
Emulation.setDeviceMetricsOverride, so it needs no crop. - The reel page skips its own playback loop when opened with
#render; without the hash it plays in a browser, which is the preview.
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
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.

