Generate social media preview images (Open Graph) and configure meta tags. Creates a screenshot-optimized page using the project's existing design system, captures it at 1200x630, and sets up all social sharing meta tags.
Generate social media preview images (Open Graph) and configure meta tags. Creates a screenshot-optimized page using the project's existing design system, captures it at 1200x630, and sets up all social sharing meta tags.
This skill creates professional Open Graph images for social media sharing. It analyzes the existing codebase to match the project's design system, generates a dedicated OG image page, screenshots it, and configures all necessary meta tags.
Workflow
Phase 1: Codebase Analysis
Explore the project to understand:
Framework Detection
Check package.json for Next.js, Vite, Astro, Remix, etc.
Identify the routing pattern (file-based, config-based)
Find where to create the /og-image route
Design System Discovery
Look for Tailwind config (tailwind.config.js/ts) for color palette
Check for CSS variables in global styles (:root definitions)
Find existing color tokens, font families, spacing scales
Look for a theme or design tokens file
Branding Assets
Find logo files in /public, /assets, /src/assets
Check for favicon, app icons
Look for existing hero sections or landing pages with branding
Product Information
Extract product name from package.json, landing page, or meta tags
Find tagline/description from existing pages
Look for existing OG/meta configuration to understand current setup
Existing Components
Find reusable UI components that could be leveraged
Check for glass effects, gradients, or distinctive visual patterns
Identify the overall aesthetic (dark mode, light mode, etc.)
Phase 2: OG Image Page Creation
Create a dedicated route at /og-image (or equivalent for the framework):
Audit and update the project's meta tag configuration. For Next.js App Router, update layout.tsx. For other frameworks, update the appropriate location.
Required Meta Tags:
// Open GraphopenGraph: {
title: "Product Name - Short Description",
description: "Compelling description for social sharing",
url: "https://yourdomain.com",
siteName: "Product Name",
locale: "en_US",
type: "website",
images: [{
url: "/og-image.png", // or absolute URLwidth: 1200,
height: 630,
alt: "Descriptive alt text for accessibility",
type: "image/png",
}],
},
// Twitter/Xtwitter: {
card: "summary_large_image",
title: "Product Name - Short Description",
description: "Compelling description for Twitter",
creator: "@handle", // if providedimages: [{
url: "/og-image.png",
width: 1200,
height: 630,
alt: "Descriptive alt text",
}],
},
// Additionalother: {
"theme-color": "#000000", // match brand color"msapplication-TileColor": "#000000",
},
appleWebApp: {
title: "Product Name",
statusBarStyle: "black-translucent",
capable: true,
},
Ensure metadataBase is set for relative URLs to resolve correctly:
metadataBase: newURL("https://yourdomain.com"),
Phase 5: Verification & Output
Verify the image exists at the public path
Check meta tags are correctly rendered in the HTML
Special thanks to Stevy Smith for their generous open-source contributions, which helped shape this skill collection.
Adapted by webconsulting.at for this skill collection