
Satori
Generate dynamic Open Graph and Twitter card images in Next.js by converting HTML and CSS to SVG with Satori or @vercel/og.
Overview
Satori is an agent skill most often used in Build (also Launch) that guides HTML-and-CSS-to-SVG OG image generation with Satori, @vercel/og, and Next.js metadata conventions.
Install
npx skills add https://github.com/vercel-labs/vercel-plugin --skill satoriWhat is this skill?
- Guidance for Satori and @vercel/og / next/og with documented GitHub and Next.js metadata docs
- Path patterns for app/**/og, opengraph-image.*, twitter-image.*, and pages/api/og.*
- Install detection for npm, pnpm, bun, and yarn adding satori or @vercel/og
- Aliases: og image, social image, html to svg, open graph generation intents
- Wasm import path satori/wasm called out for constrained runtimes
- Documented path pattern groups for app and pages api og routes
- Official docs links for github.com/vercel/satori and Next.js opengraph-image reference
Adoption & trust: 28 installs on skills.sh; 187 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Next.js app shares ugly default link previews because you have not implemented dynamic Open Graph images with a supported JSX-to-SVG pipeline.
Who is it for?
Solo builders on Next.js who want programmatic OG/Twitter images tied to App Router metadata files or /api/og handlers.
Skip if: Static-only sites with no Node edge/runtime, or teams that need pixel-perfect arbitrary CSS without Satori’s supported subset.
When should I use this skill?
User works on og image, open graph, social image, html to svg, or files matching app/**/opengraph-image or pages/api/og patterns.
What do I get? / Deliverables
You ship og/opengraph-image routes that render consistent branded previews using Satori-compatible markup and installed @vercel/og or satori packages.
- Dynamic OG/Twitter image route or metadata file
- Installed satori or @vercel/og dependency aligned with import patterns
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Build → Frontend because implementing og routes, opengraph-image files, and Satori layouts is product UI work in the app tree. Frontend covers App Router file conventions (opengraph-image, twitter-image) and API routes under pages/api/og that this skill’s path patterns target.
Where it fits
Add app/blog/[slug]/opengraph-image.tsx that renders title and author with Satori for each post.
Validate OG dimensions and metadata URLs before publishing a landing page to organic search and social crawlers.
Ship a consistent preview card for Product Hunt or newsletter links using pages/api/og.
Template OG variants for programmatic SEO pages so share previews match campaign copy.
How it compares
Framework-specific OG generator guidance, not a headless browser screenshot service.
Common Questions / FAQ
Who is satori for?
Developers using Next.js or monorepo apps under apps/*/app who need dynamic social preview images without a separate design export pipeline.
When should I use satori?
While building frontend og routes in Build, and again at Launch when tuning SEO and social distribution previews for new pages or templates.
Is satori safe to install?
It references public Vercel and Next.js docs and standard npm packages; review the Security Audits panel on this page before adding dependencies to production.
SKILL.md
READMESKILL.md - Satori
# Satori — HTML/CSS to SVG for OG Images You are an expert in Satori and `@vercel/og` for generating dynamic Open Graph images. ## Overview **Satori** converts JSX-like HTML and CSS into SVG. **`@vercel/og`** wraps Satori with an `ImageResponse` class that renders the SVG to PNG, designed to run in Vercel Edge Functions and other edge runtimes. ## Installation ```bash # For Next.js projects (recommended — includes Satori + PNG rendering) npm install @vercel/og # Standalone Satori (SVG output only) npm install satori ``` ## Next.js App Router — OG Image Route (Recommended) Next.js has built-in OG image support via the `ImageResponse` re-exported from `next/og`: ```tsx // app/og/route.tsx OR app/opengraph-image.tsx import { ImageResponse } from 'next/og' export const runtime = 'edge' export async function GET(request: Request) { return new ImageResponse( ( <div style={{ display: 'flex', fontSize: 60, color: 'white', background: 'linear-gradient(to bottom, #1a1a2e, #16213e)', width: '100%', height: '100%', alignItems: 'center', justifyContent: 'center', }} > Hello, OG Image! </div> ), { width: 1200, height: 630 } ) } ``` ## Convention-Based OG Images (Next.js 13.3+) Place an `opengraph-image.tsx` or `twitter-image.tsx` file in any route segment: ```tsx // app/blog/[slug]/opengraph-image.tsx import { ImageResponse } from 'next/og' export const alt = 'Blog post image' export const size = { width: 1200, height: 630 } export const contentType = 'image/png' export const runtime = 'edge' export default async function Image({ params }: { params: { slug: string } }) { const post = await get