social-preview

social-preview is a cursor rule for Cursor from thatrebeccarae/claude-marketing. It costs 48 tokens per session (4,216 once invoked), scanned A, original, MIT.

A tool for creating and checking Open Graph images, which are the preview images shown when a GitHub repository link is shared online. It creates 1280-by-640 images for services such as Twitter, LinkedIn, Slack, and Discord.

In plain words
What is it for?
Use it to generate a preview image for a repository or audit an existing preview. It supports custom templates and dark or light themes.
Why use it?
It helps repositories avoid missing, outdated, or incorrectly sized link previews. A suitable preview gives shared project links a consistent visual identity.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to generate a preview image for a repository or audit an existing preview. It supports custom templates and dark or light themes.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/thatrebeccarae/claude-marketing/social-preview
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/thatrebeccarae/claude-marketing

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for social-preview

README.md
[![agentmods](https://agentmods.dev/badge/rules/thatrebeccarae/claude-marketing/social-preview/github.svg)](https://agentmods.dev/rules/thatrebeccarae/claude-marketing/social-preview)
Your own site
<a href="https://agentmods.dev/rules/thatrebeccarae/claude-marketing/social-preview"><img src="https://agentmods.dev/badge/rules/thatrebeccarae/claude-marketing/social-preview/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for social-preview

Your own site · 80×15
<a href="https://agentmods.dev/rules/thatrebeccarae/claude-marketing/social-preview"><img src="https://agentmods.dev/badge/rules/thatrebeccarae/claude-marketing/social-preview.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,216 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.04216
Opus 5 $0.00024 $0.02108
Sonnet 5 $0.00010 $0.00843
Haiku 4.5 $0.00005 $0.00422

Measured 9d ago against content hash e9bcc4b1728e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

social-preview scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

integrations/cursor/social-preview.mdc · 489 lines

How it starts

The opening of the file, as written. The whole thing — 489 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

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.

Read the full file on GitHub · 489 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 489 lines · 48 tokens per session scan A e9bcc4b1728e

Subscribe to this mod's changes

social-preview is a cursor rule published in the GitHub repository thatrebeccarae/claude-marketing (133 stars, last pushed 3mo ago), licensed MIT. It adds 48 tokens to every session and 4,216 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.