Agent skill

Social Preview

by thatrebeccarae in thatrebeccarae/claude-marketing

Generate Open Graph social preview images (1280x640) for GitHub repositories.

MITAuto-check passedMarketing & SEO

Install Social Preview

skills CLI
$ npx skills add thatrebeccarae/claude-marketing --skill social-preview -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install thatrebeccarae/claude-marketing social-preview --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/thatrebeccarae/claude-marketing.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/social-preview .claude/skills/social-preview && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
social-preview
GitHub stars
161
Token cost
~2.1k tokens
SKILL.md length
865 words
Files
4
Skills in repo
55
Repo updated
First seen
Licence
MIT

At a glance

Generate Open Graph social preview images (1280x640) for GitHub repositories.

  • Works in 10 steps: Parse Command → Scan Repo for Context → Select Template → …
  • Tasks that involve Social media graphics
  • SKILL.md covers Install, When to Use, Usage and Procedure: Generate, plus 5 more sections
  • Calls gh, claude and node; reaches github.com and cards-dev.twitter.com

What it does

Social Preview is an agent skill from thatrebeccarae/claude-marketing. Generate Open Graph social preview images (1280x640) for GitHub repositories. Creates branded OG images that display when repos are shared on Twitter, LinkedIn, and Slack. Supports custom templates, dark/light themes, and automated generation.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `EXAMPLES.md` and `REFERENCE.md`).

It sits in Marketing & SEO, covering Social media graphics. It works with GitHub, LinkedIn, Slack and X (Twitter). The repository describes itself as: A full marketing department for Claude Code. Skill packs for Klaviyo, Shopify, GA4, Looker Studio, paid media, and more. Audit, optimize, and report using natural language. The licence is MIT.

When your agent uses it

  • Tasks that involve Social media graphics

Example prompts

  • “/social-preview”

Requirements

  • Node.js

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Parse Command
  2. Scan Repo for Context
  3. Select Template
  4. Generate HTML Template
  5. Render to PNG
  6. Set as Social Preview
  7. Verify
  8. Check Repo
  9. Fetch Current Social Preview State
  10. Report

What it can do on your machine

Read from SKILL.md and the folder at commit a8a63ec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • claude
    • node
    • git
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • cards-dev.twitter.com
    • developers.facebook.com
    • linkedin.com
    • opengraph.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Social Preview loads about 2.1k tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 865 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from thatrebeccarae/claude-marketing at commit a8a63ec, republished under its MIT licence (© thatrebeccarae). 865 words, ~2,092 tokens.

Download SKILL.mdSave it as .claude/skills/social-preview/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
social-preview
description
Generate Open Graph social preview images (1280x640) for GitHub repositories. Creates branded OG images that display when repos are shared on Twitter, LinkedIn, and Slack. Supports custom templates, dark/light themes, and automated generation.
license
MIT
origin
custom
author
Rebecca Rae Barton
author_url
https://github.com/thatrebeccarae
metadata.version
1.0.0
metadata.category
devops
metadata.domain
github
metadata.updated
2026-03-19
metadata.tested
2026-03-19
metadata.tested_with
Claude Code v2.1

Social Preview

Generate Open Graph social preview images (1280x640px) for GitHub repositories. The social preview is the single highest-leverage visual asset when repos are shared on Twitter, LinkedIn, Slack, and Discord.

Install

bash
claude skill install social-preview

When to Use

  • New public repo needs a social preview before sharing
  • Rebranding a project (new colors, name change, logo update)
  • Major release or launch -- refresh the preview to reflect the milestone
  • Before marketing pushes (LinkedIn posts, Twitter threads, blog features)
  • Audit existing repos to catch missing or outdated social previews

Usage

/social-preview generate [repo-path]   # Create OG image from repo context
/social-preview audit [repo-path]      # Check if social preview is set, dimensions correct

Default repo-path is the current working directory if omitted.


Procedure: Generate

Execute each step in order. Do not skip steps.

Step 0: Parse Command

Expect: /social-preview {mode} [repo-path]

Extract mode (generate or audit). If missing or invalid:

Error: Invalid or missing mode.
Usage:
  /social-preview generate [repo-path]
  /social-preview audit [repo-path]

STOP.

Validate repo-path is a directory containing .git. Default to cwd if omitted.

Step 1: Scan Repo for Context

Gather:

  • Project name -- from package.json name, Cargo.toml [package] name, pyproject.toml name, or directory name
  • Description/tagline -- from package.json description, repo description, or ask user
  • Primary language -- from file extensions, package manager files, or gh repo view --json primaryLanguage
  • Logo/icon -- check for logo.png, logo.svg, icon.png, icon.svg, .github/logo.png, assets/logo.*, branding/logo.*
  • Git remote -- git remote get-url origin to extract owner/repo
  • Existing social preview -- gh api repos/{owner}/{repo} to check current state
Step 2: Select Template

Present template options to the user:

  1. Dark (recommended) -- Dark background (#0d1117 or #141414), light text. Highest contrast, best performance on most feeds.
  2. Light -- Light background (#fafbfc), dark text. Matches certain brand aesthetics.
  3. Minimal -- Just project name + tagline, no decoration. Clean and typographic.

Ask: "Which template? [dark/light/minimal] (default: dark)"

If the repo has established brand colors (detected from CSS variables, tailwind config, or user-specified), offer to use those as accent colors.

Step 3: Generate HTML Template

Create a standalone HTML file (1280x640px viewport) containing:

  • Project name -- large, prominent, max 40 characters displayed. Use system-safe fonts only (no external font dependencies).
  • One-line description/tagline -- below the name, lighter weight, max 80 characters.
  • Primary language/tech icon (optional) -- simple text-based indicator or Unicode symbol. No external image dependencies.
  • Author/org attribution (optional) -- small, bottom corner. GitHub username or org name.
  • Background -- solid color, CSS gradient, or subtle CSS pattern (dots, grid). No external images.

Write the HTML file to {repo-path}/social-preview.html (or /tmp/social-preview-{repo-name}.html if user prefers).

Step 4: Render to PNG

Guide the user through one of three rendering paths:

Option A -- Browser screenshot (simplest, no deps):

  1. Open the HTML file in any browser
  2. Set viewport to exactly 1280x640
  3. Take a full-page screenshot
  4. Save as PNG

Option B -- Puppeteer/Playwright (automated, requires Node):

bash
node -e "
const puppeteer = require('puppeteer');
(async () => {
  const browser = await puppeteer.launch({ headless: true });
  const page = await browser.newPage();
  await page.setViewport({ width: 1280, height: 640, deviceScaleFactor: 2 });
  await page.goto('file:///PATH/TO/social-preview.html', { waitUntil: 'networkidle0' });
  await page.screenshot({ path: 'social-preview.png', clip: { x: 0, y: 0, width: 1280, height: 640 } });
  await browser.close();
})();
"

Option C -- Cloud renderer:

  • Use npx @vercel/og or a hosted OG image service if the user prefers URL-based generation.
Step 5: Set as Social Preview

Guide the user through one of two methods:

Method A -- GitHub UI:

  1. Go to https://github.com/{owner}/{repo}/settings
  2. Scroll to "Social preview"
  3. Click "Edit" -> "Upload an image..."
  4. Upload the generated PNG
  5. Click "Save"

Method B -- GitHub API:

bash
gh api repos/{owner}/{repo} \
  --method PATCH \
  --field "social_preview=$(base64 -i social-preview.png)"

Note: The GitHub REST API does not directly support uploading social preview images via base64. The UI method is the most reliable. For automation, use the repository settings page.

Show full SKILL.md (350 more words)Show less
Step 6: Verify

Provide validation URLs:

  • Twitter Card Validator: https://cards-dev.twitter.com/validator
  • Facebook Sharing Debugger: https://developers.facebook.com/tools/debug/
  • LinkedIn Post Inspector: https://www.linkedin.com/post-inspector/inspect/
  • Open Graph Debugger: https://opengraph.dev/

Tell user to paste the repo URL and verify the preview renders correctly.


Procedure: Audit

Step 1: Check Repo

Validate repo-path is a git repo with a remote.

Step 2: Fetch Current Social Preview State
bash
gh api repos/{owner}/{repo} --jq '.description, .homepage'

Check if a custom social preview image is set (GitHub auto-generates one if not).

Step 3: Report
=== Social Preview Audit: {repo-name} ===

Custom preview set: {YES / NO (using auto-generated)}
Description:       {repo description or "MISSING -- add one"}
Homepage URL:       {homepage or "not set"}

Recommendations:
  - {actionable items: missing preview, missing description, etc.}

Run /social-preview generate to create one.

Design Principles

  • Readable at thumbnail size. Social feeds show previews at ~400px wide. Text must be legible at that scale.
  • High contrast. Dark backgrounds with light text outperform on most platforms. Minimum 4.5:1 contrast ratio.
  • No small text. If it won't be readable at 400px wide, remove it. Project name should be 48-72px at 1280px canvas.
  • 2:1 aspect ratio. 1280x640 is the standard. Platforms crop outside this ratio.
  • No external dependencies. HTML must render with zero network requests. System fonts only. Inline all CSS.
  • Keep text minimal. Project name + one-line tagline. Nothing else is guaranteed to be readable.
  • Test at actual share size. Always preview at 400x200 before finalizing.

Key Principles

  1. Dark backgrounds perform better across Twitter, LinkedIn, and Slack feeds.
  2. Keep text to two lines maximum: name + tagline.
  3. Test at actual share size (400px wide), not at full resolution.
  4. PNG format, under 1MB. Avoid JPEG for text-heavy images (compression artifacts).
  5. Update the preview when the project description or branding changes.
  6. A missing social preview is worse than a simple one -- GitHub's auto-generated preview is generic and forgettable.

Files

  • HTML template: {repo-path}/social-preview.html or /tmp/social-preview-{repo-name}.html
  • PNG output: {repo-path}/social-preview.png

Anti-Patterns

  • No external font CDN links -- system fonts only for guaranteed rendering
  • No images or logos that require network requests -- inline SVG or omit
  • No text below 24px at 1280px canvas (will be illegible at thumbnail size)
  • No busy backgrounds or photographic backgrounds -- solid or gradient only
  • No more than 3 colors total (background, primary text, accent)
  • No rounded corners or complex shapes that get lost at small sizes
  • Do not include full URLs in the image -- waste of space, unreadable at thumbnail

© thatrebeccarae, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in skills/social-preview of thatrebeccarae/claude-marketing.

  • SKILL.md
  • EXAMPLES.md
  • LICENSE
  • REFERENCE.md

Open the folder on GitHubat commit a8a63ec

Compare with similar skills

Social Preview next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Social Preview compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Social Preview this skillthatrebeccarae/claude-marketing161—~2.1kAutomated safety check: PassMIT
Pastecoreyhaines31/makerskills851—~2.3kAutomated safety check: NotesMIT
Social Card GenBrianRWagner/ai-marketing-claude-code-skills441—~1.9kAutomated safety check: PassNone
Web Asset Generatoralonw0/web-asset-generator5141 repos~6.6kAutomated safety check: PassMIT
Banner CreatorReScienceLab/opc-skills1.8k—~1.3kAutomated safety check: PassApache-2.0
Generate Brand Assetscrafter-station/skills112—~1.3kAutomated safety check: PassMIT

Similar skills

  • Paste

    coreyhaines31/makerskills

    When you want to clean and reformat content (usually from your terminal) for pasting into Slack, Notion, Twitter/X, LinkedIn, email, GitHub, or plain text.

    851 GitHub stars~2.3k tokensUpdated 2 days ago
    Auto-check: notes
  • Social Card Gen

    BrianRWagner/ai-marketing-claude-code-skills

    Generate platform-specific social post variants (Twitter/X, LinkedIn, Reddit) from one source input.

    441 GitHub stars~1.9k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed
  • Web Asset Generator

    alonw0/web-asset-generator

    Generate web assets including favicons, app icons (PWA), and social media meta images (Open Graph) for Facebook, Twitter, WhatsApp, and LinkedIn.

    514 GitHub starsUsed in 1 repo~6.6k tokens
    Media & CreativeAuto-check passed
  • Banner Creator

    ReScienceLab/opc-skills

    Create banners using AI image generation. An agent skill from ReScienceLab/opc-skills.

    1.8k GitHub stars~1.3k tokensUpdated today
    Media & CreativeAuto-check passed
  • Generate Brand Assets

    crafter-station/skills

    Generate OG images and favicon based on project branding. An agent skill from crafter-station/skills.

    112 GitHub stars~1.3k tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed
  • Social Media Management

    manojbajaj95/claude-gtm-plugin

    Comprehensive social media management for all platforms (LinkedIn, Twitter/X, Instagram, TikTok, Facebook, Pinterest, YouTube).

    105 GitHub starsUsed in 1 repo~3.9k tokens
    Writing & ContentAuto-check passed

More from thatrebeccarae/claude-marketing

All 55 skills in this repo
  • Google Analytics

    thatrebeccarae/claude-marketing

    Analyze Google Analytics data, review website performance metrics, identify traffic patterns, and suggest data-driven improvements.

    161 GitHub starsUsed in 3 repos~1.3k tokens
    Auto-check: notes
  • Content Creator

    thatrebeccarae/claude-marketing

    Comprehensive content marketing toolkit with brand voice analysis, SEO optimization scripts, content frameworks, social media strategy, and content calendar planning.

    161 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Klaviyo Analyst

    thatrebeccarae/claude-marketing

    Klaviyo marketing operations and analyst expertise. An agent skill from thatrebeccarae/claude-marketing.

    161 GitHub stars~5k tokensUpdated 4 mo ago
    Auto-check: notes
  • Klaviyo Developer

    thatrebeccarae/claude-marketing

    Klaviyo API and developer integration expertise. An agent skill from thatrebeccarae/claude-marketing.

    161 GitHub stars~4.9k tokensUpdated 4 mo ago
    Auto-check: notes
  • Looker Studio

    thatrebeccarae/claude-marketing

    Looker Studio (formerly Google Data Studio) expertise. An agent skill from thatrebeccarae/claude-marketing.

    161 GitHub stars~3.6k tokensUpdated 4 mo ago
    Auto-check: notes
  • Shopify

    thatrebeccarae/claude-marketing

    Shopify e-commerce platform marketing expertise. An agent skill from thatrebeccarae/claude-marketing.

    161 GitHub stars~2.4k tokensUpdated 4 mo ago
    Auto-check: notes

Questions about Social Preview

What does Social Preview do?

Generate Open Graph social preview images (1280x640) for GitHub repositories. Social Preview is an agent skill from thatrebeccarae/claude-marketing. Generate Open Graph social preview images (1280x640) for GitHub repositories.

When should I use Social Preview?

Social Preview fits situations like: tasks that involve Social media graphics.

How do I install Social Preview in Claude Code?

Run `npx skills add thatrebeccarae/claude-marketing --skill social-preview -a claude-code`. Or copy the skill folder (skills/social-preview in thatrebeccarae/claude-marketing) into .claude/skills/social-preview in your project. Claude Code loads it when a task matches its description.

How do I install Social Preview in Codex?

Run `npx skills add thatrebeccarae/claude-marketing --skill social-preview -a codex`. Or copy the skill folder (skills/social-preview in thatrebeccarae/claude-marketing) into .agents/skills/social-preview in your project. Codex loads it when a task matches its description.

Can I use Social Preview in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add thatrebeccarae/claude-marketing --skill social-preview -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/social-preview, .gemini/skills/social-preview, .github/skills/social-preview and .opencode/skills/social-preview in your project.

What does Social Preview need to run?

Going by SKILL.md and its folder, Social Preview needs the command-line tools its instructions call (gh, claude, node, git and npx). Our summary lists: Node.js.

Does Social Preview access the network?

SKILL.md names 5 domains. In commands or code: github.com, cards-dev.twitter.com, developers.facebook.com, linkedin.com and opengraph.dev; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Social Preview safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Social Preview use?

Social Preview is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Social Preview use?

About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Social Preview?

Skills that share tags, products or a category with Social Preview: Paste (coreyhaines31/makerskills, 851 stars), Social Card Gen (BrianRWagner/ai-marketing-claude-code-skills, 441 stars), Web Asset Generator (alonw0/web-asset-generator, 514 stars) and Banner Creator (ReScienceLab/opc-skills, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Social Preview?

thatrebeccarae (a GitHub user) maintains it in thatrebeccarae/claude-marketing, which has 161 GitHub stars. The repository holds 55 skills in this directory. The repository was last updated on May 14, 2026.

Source: thatrebeccarae/claude-marketing on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.