agentleFS
Yahiasherif002Yahiasherif002/claude-skills/og-image/SKILL.md

og-image

Skill1 starsChanged 5 months agoMITView on GitHub

Generate a branded 1200x630 Open Graph / social share image (PNG) from an SVG template using sharp — no design tool needed. Produces the card that shows when a link is shared on LinkedIn, X/Twitter, Slack, Discord, iMessage. Use when a site has a blank/missing/ugly link preview, needs a proper og:image, or the user wants a generated social card matching their brand. Pairs with the seo-kit skill (which wires the og:image/twitter:image meta tags).

  • Installs packages

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run node scripts/gen-og.mjs → writes public/og-image.png.

    line 29
  2. Distinctive:

    Verify the card at https://www.opengraph.xyz.

    line 47

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

OG Image Generator

Generates a proper 1200×630 PNG social-share card from an SVG template, rasterized with sharp. No Figma/Photoshop needed, fully reproducible, and regenerable whenever the text changes.

Why

Social crawlers need a real raster image at an absolute URL for rich previews. A relative path or a square favicon gives blank/tiny previews. This builds a real branded 1200×630 card.

What it produces

  • scripts/gen-og.mjs — edits the config at the top (name, role, subline, footer), runs node scripts/gen-og.mjs, and writes public/og-image.png (1200×630).
  • A dark "IDE/terminal" themed card by default (window dots, gradient name, mono subtext) — restyle the SVG freely.

How to use it

  1. Copy references/gen-og.mjs into the project's scripts/.
  2. npm i -D sharp.
  3. Edit the CONFIG constants at the top (name, role, subline, footer text, colors).
  4. Run node scripts/gen-og.mjs → writes public/og-image.png. Add an npm script "gen:og": "node scripts/gen-og.mjs" for convenience.
  5. Wire the meta tags (or use the seo-kit skill) with an absolute URL:
    <meta property="og:image" content="https://DOMAIN/og-image.png" />
    <meta property="og:image:width" content="1200" />
    <meta property="og:image:height" content="630" />
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:image" content="https://DOMAIN/og-image.png" />

Notes

  • Fonts: SVG text renders with fonts installed on the build machine. The template uses Consolas, monospace and Segoe UI, Arial, sans-serif (safe on Windows/most CI). For a custom font, install it on the build env or embed it as base64 in the SVG.
  • Absolute URL is mandatory for OG/Twitter images, and LinkedIn caches hard — re-scrape via the Post Inspector after deploying.
  • Verify the card at https://www.opengraph.xyz.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.