Open graph skill

When the user wants to add or optimize Open Graph metadata for social sharing.

by kostja94·MIT license·★ 1,006 Stars on the repo·GitHub ↗

Use now

Files of Open graph

kostja94/main1 file shown
SKILL.md
Show the full text109 lines

SEO On-Page: Open Graph

Guides implementation of Open Graph meta tags for social media previews (Facebook, LinkedIn, Slack, Discord, etc.). Pages with proper OG tags get 2–3× more clicks than bare URL links.

When invoking: On first use, if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On subsequent use or when the user asks to skip, go directly to the main output.

Scope (Social Sharing)

  • Open Graph: Facebook-originated protocol; controls preview card when links are shared on social platforms

The 4 Essential Tags

Every shareable page requires these minimum tags:

<meta property="og:title" content="Your Page Title">
<meta property="og:description" content="Your description">
<meta property="og:image" content="https://yourdomain.com/image.png">
<meta property="og:url" content="https://yourdomain.com/page">
Tag Guideline
og:title Keep under 60 chars; compelling; match page content
og:description 150–200 chars; conversion-focused
og:image Absolute URL (https://); 1200×630px recommended
og:url Canonical URL; deduplicates shares
Tag Purpose
og:type Content type: website, article, video, product
og:site_name Website name; displayed separately from title
og:image:width / og:image:height Image dimensions (1200×630px)
og:image:alt Alt text for accessibility
og:locale Language/territory (e.g., en_US); for multilingual sites

Image Best Practices

Item Guideline
Size 1200×630px (1.91:1 ratio) for Facebook, LinkedIn, WhatsApp
Format JPG, PNG, WebP; under 5MB
URL Absolute URL with https://; no relative paths
Unique One unique image per page when possible

Common Mistakes

  • Using relative image URLs instead of absolute https://
  • Images too small or wrong aspect ratio
  • Empty or placeholder values
  • Missing og:url (canonical)

Implementation

Next.js (App Router)
export const metadata = {
  openGraph: {
    title: '...',
    description: '...',
    url: 'https://example.com/page',
    siteName: 'Example',
    images: [{ url: 'https://example.com/og.jpg', width: 1200, height: 630, alt: '...' }],
    locale: 'en_US',
    type: 'website',
  },
};
HTML (generic)
<meta property="og:title" content="Your Title">
<meta property="og:description" content="Your description">
<meta property="og:image" content="https://example.com/og.jpg">
<meta property="og:url" content="https://example.com/page">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Your Site">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Alt text">

Testing

  • social-share-generator: Share buttons use OG tags for rich previews when users share; OG must be set for share buttons to show proper cards
  • article-page-generator: Use og:type article for article/post pages; article-specific tags (published_time, author)
  • page-metadata: Hreflang, other meta tags
  • title-tag: Title tag often mirrors og:title
  • meta-description: Meta description often mirrors og:description
  • twitter-cards: Twitter uses OG as fallback; add Twitter-specific tags for best results
  • canonical-tag: og:url should match canonical URL
  • og-image-generator: Programmatic OG image generation — 6 visual styles (Terminal/CLI, Magazine Editorial, Swiss Minimal, Pixel Retro, Brutalist, Newspaper), Satori+resvg, Puppeteer, AI image generation tools, and Agent-Native content-aware workflow. This skill covers how to SET the image tag; og-image-generator covers how to CREATE the image.
1---
2name: open-graph
3description: When the user wants to add or optimize Open Graph metadata for social sharing. Also use when the user mentions "Open Graph," "og:tags," "og:title," "og:image," "og:description," "Facebook preview," "LinkedIn preview," or "social share preview." For X (Twitter) link previews, use twitter-cards. For SERP title/description, use title-tag and meta-description.
4metadata:
5 version: 1.1.0
6---
7 
8# SEO On-Page: Open Graph
9 
10Guides implementation of Open Graph meta tags for social media previews (Facebook, LinkedIn, Slack, Discord, etc.). Pages with proper OG tags get 2–3× more clicks than bare URL links.
11 
12**When invoking**: On **first use**, if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On **subsequent use** or when the user asks to skip, go directly to the main output.
13 
14## Scope (Social Sharing)
15 
16- **Open Graph**: Facebook-originated protocol; controls preview card when links are shared on social platforms
17 
18## The 4 Essential Tags
19 
20Every shareable page requires these minimum tags:
21 
22```html
23<meta property="og:title" content="Your Page Title">
24<meta property="og:description" content="Your description">
25<meta property="og:image" content="https://yourdomain.com/image.png">
26<meta property="og:url" content="https://yourdomain.com/page">
27```
28 
29| Tag | Guideline |
30|-----|-----------|
31| **og:title** | Keep under 60 chars; compelling; match page content |
32| **og:description** | 150–200 chars; conversion-focused |
33| **og:image** | Absolute URL (https://); 1200×630px recommended |
34| **og:url** | Canonical URL; deduplicates shares |
35 
36## Recommended Additional Tags
37 
38| Tag | Purpose |
39|-----|---------|
40| **og:type** | Content type: `website`, `article`, `video`, `product` |
41| **og:site_name** | Website name; displayed separately from title |
42| **og:image:width** / **og:image:height** | Image dimensions (1200×630px) |
43| **og:image:alt** | Alt text for accessibility |
44| **og:locale** | Language/territory (e.g., `en_US`); for multilingual sites |
45 
46## Image Best Practices
47 
48| Item | Guideline |
49|------|-----------|
50| **Size** | 1200×630px (1.91:1 ratio) for Facebook, LinkedIn, WhatsApp |
51| **Format** | JPG, PNG, WebP; under 5MB |
52| **URL** | Absolute URL with https://; no relative paths |
53| **Unique** | One unique image per page when possible |
54 
55## Common Mistakes
56 
57- Using relative image URLs instead of absolute https://
58- Images too small or wrong aspect ratio
59- Empty or placeholder values
60- Missing og:url (canonical)
61 
62## Implementation
63 
64### Next.js (App Router)
65 
66```tsx
67export const metadata = {
68 openGraph: {
69 title: '...',
70 description: '...',
71 url: 'https://example.com/page',
72 siteName: 'Example',
73 images: [{ url: 'https://example.com/og.jpg', width: 1200, height: 630, alt: '...' }],
74 locale: 'en_US',
75 type: 'website',
76 },
77};
78```
79 
80### HTML (generic)
81 
82```html
83<meta property="og:title" content="Your Title">
84<meta property="og:description" content="Your description">
85<meta property="og:image" content="https://example.com/og.jpg">
86<meta property="og:url" content="https://example.com/page">
87<meta property="og:type" content="website">
88<meta property="og:site_name" content="Your Site">
89<meta property="og:image:width" content="1200">
90<meta property="og:image:height" content="630">
91<meta property="og:image:alt" content="Alt text">
92```
93 
94## Testing
95 
96- **Facebook**: [Sharing Debugger](https://developers.facebook.com/tools/debug/)
97- **LinkedIn**: [Post Inspector](https://www.linkedin.com/post-inspector/)
98 
99## Related Skills
100 
101- **social-share-generator**: Share buttons use OG tags for rich previews when users share; OG must be set for share buttons to show proper cards
102- **article-page-generator**: Use og:type `article` for article/post pages; article-specific tags (published_time, author)
103- **page-metadata**: Hreflang, other meta tags
104- **title-tag**: Title tag often mirrors og:title
105- **meta-description**: Meta description often mirrors og:description
106- **twitter-cards**: Twitter uses OG as fallback; add Twitter-specific tags for best results
107- **canonical-tag**: og:url should match canonical URL
108- **og-image-generator**: Programmatic OG image generation — 6 visual styles (Terminal/CLI, Magazine Editorial, Swiss Minimal, Pixel Retro, Brutalist, Newspaper), Satori+resvg, Puppeteer, AI image generation tools, and Agent-Native content-aware workflow. This skill covers how to SET the image tag; og-image-generator covers how to CREATE the image.
109 

Discussion

Alternatives

Agentic Browsing ReadinessAudit and fix agent readiness: the Lighthouse Agentic Browsing fraction, accessibility tree for agents, robots.txt and Content-Signal for AI agents, WAF treatment of agent traffic, llms.txt, Markdown delivery, ai-catalog.json, /.well-known discovery files, and WebMCP tools. Exclude AI citability and brand signals (seo-geo) and commerce protocol depth (seo-ecommerce).Marketing · MITBacklink Profile AnalysisBacklink profile analysis: referring domains, anchor text distribution, toxic link detection, competitor gap analysis. Works with free APIs (Moz, Bing Webmaster, Common Crawl) and DataForSEO extension. Use when user says backlinks, link profile, referring domains, anchor text, toxic links, link gap, link building, disavow, or backlink audit.Marketing · MIT/setup-cmsConnect a CMS to notfair SEO tools. Guides users through configuring WordPress, Strapi, Contentful, or Ghost — tests the connection, and writes credentials to .env.local. Once set up, seo-analysis automatically cross- references CMS content against Google Search Console data. Use whenever the user says "connect my CMS", "set up WordPress", "configure Strapi", "add Contentful", "connect Ghost", or "CMS setup". Also trigger if the user asks why no CMS data appears in a seo-analysis report. · MITBacklink checkBacklink profile for any domain — referring domains, authority, anchors, new/lost links, and a side-by-side vs a competitor. Use when asked "check my backlinks", "backlink profile of X", "who links to them", or "link gap vs competitor".Marketing · MIT