social-metadata-hardening
यह क्या करती है
यह टूल पक्का करता है कि सोशल मीडिया और मैसेजिंग ऐप्स पर शेयर किए गए लिंक एक अच्छे और पूरे preview के साथ दिखें, न कि बस एक सादे लिंक के रूप में। यह missing images, गलत text या पुराने preview जैसी समस्याओं को ठीक करता है।
कब इस्तेमाल करें
- ✓जब शेयर किए गए लिंक में image नहीं दिखती या गलत image दिखती है।
- ✓जब आप चाहते हैं कि link preview बिल्कुल वैसा दिखे जैसा आपने सोचा था।
- ✓किसी website को लॉन्च करने से पहले, ताकि सभी लिंक हर जगह अच्छे दिखें।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/social-metadata-hardening/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी website के लिंक Facebook और WhatsApp पर अच्छे preview के साथ दिखाओ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
टूल आपकी website के code में ज़रूरी जानकारी (जैसे title, description और image) जोड़ता है। यह यह भी पक्का करता है कि इस्तेमाल की गई images सही size की हों और ऐसे format में हों जिसे सोशल मीडिया प्लेटफ़ॉर्म समझ सकें।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Social Metadata Hardening Skill
Fix social sharing so every important URL unfurls as a rich card across all platforms.
When to Use
- Use when shared links show missing, stale, cropped, or incorrect previews on social and chat platforms.
- Use when auditing Open Graph, Twitter/X card, image URL, alt text, or
metadataBasecoverage in a web app. - Use before launch when every public page needs predictable rich previews across LinkedIn, X, Facebook, WhatsApp, Slack, Discord, and Telegram.
Why Previews Break
| Problem | Root Cause |
|---|---|
| No preview at all | Missing og:title, og:description, or og:image |
| Broken image | Relative URL (must be absolute) |
| Wrong image size | Image not 1200×630px (OG standard) |
| Plain text card | Twitter card type missing or set to summary |
| Stale preview | Platform caching old metadata |
| Metadata missing on crawl | Tags added by client-side JS (crawlers don't run JS) |
The Gold Standard Metadata Block
Every shareable page needs ALL of these in static HTML:
// Next.js App Router — lib/socialMetadata.js
export function buildSocialMetadata({
title,
description,
path, // '/blog/my-post'
image, // '/images/og/my-post.jpg' or full URL
imageAlt,
imageWidth = 1200,
imageHeight = 630,
}) {
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || 'https://www.yourdomain.com';
// Always produce an absolute URL
const imageUrl = image?.startsWith('http') ? image : `${baseUrl}${image}`;
const pageUrl = `${baseUrl}${path}`;
// Detect MIME type from extension
const ext = imageUrl.split('.').pop().toLowerCase();
const mimeMap = { jpg: 'image/jpeg', jpeg: 'image/jpeg', png: 'image/png', webp: 'image/webp' };
const imageType = mimeMap[ext] || 'image/jpeg';
return {
title,
description,
alternates: { canonical: pageUrl },
openGraph: {
title,
description,
url: pageUrl,
type: 'website', // use 'article' for blog posts
images: [{
url: imageUrl,
secureUrl: imageUrl, // explicit HTTPS version
width: imageWidth,
height: imageHeight,
alt: imageAlt || title,
type: imageType,
}],
},
twitter: {
card: 'summary_large_image', // NOT 'summary' — that shows a tiny image
title,
description,
images: [imageUrl],
},
};
}
Applying the Helper
Static page
// app/about/page.js
import { buildSocialMetadata } from '@/lib/socialMetadata';
export const metadata = buildSocialMetadata({
title: 'About Us | My Site',
description: 'Learn about our team and mission.',
path: '/about',
image: '/images/og/about.jpg',
imageAlt: 'The My Site team',
});
Dynamic page (blog post, tool page)
// app/blog/[slug]/page.js
import { buildSocialMetadata } from '@/lib/socialMetadata';
export async function generateMetadata({ params }) {
const post = await getPost(params.slug);
return buildSocialMetadata({
title: `${post.title} | My Blog`,
description: post.excerpt,
path: `/blog/${params.slug}`,
image: post.ogImage || '/images/og/default.jpg',
imageAlt: post.title,
});
}
Homepage (app/layout.js or app/page.js)
export const metadata = {
metadataBase: new URL('https://www.yourdomain.com'), // REQUIRED for absolute URLs
...buildSocialMetadata({
title: 'My Site — Tagline Here',
description: 'Site-wide description.',
path: '/',
image: '/images/og/home.jpg',
}),
};
⚠️ Set
metadataBasewhen using relative metadata URLs. If your helper already outputs absolute canonical/OG URLs, previews can still work without it.
OG Image Checklist
Good OG images:
- 1200 × 630px (2:1 ratio — works on all platforms)
- Under 8MB (Facebook limit)
- Served over HTTPS
- File name has no spaces (use hyphens)
- Format: JPEG or PNG (WebP works on most but not all crawlers)
- Accessible via GET with no authentication
# Verify your OG image is reachable and correct size
curl -sI https://www.yourdomain.com/images/og/home.jpg | grep -i "content-type\|content-length\|status"
Platform-Specific Notes
Facebook / Meta
- Caches aggressively — use the Sharing Debugger to force recrawl
- Minimum image: 200×200px (but use 1200×630 for quality)
- Needs:
og:title,og:description,og:image,og:url
…
अक्सर पूछे जाने वाले सवाल
मेरा link preview खराब क्यों दिखता है?
यह कई कारणों से हो सकता है: ज़रूरी जानकारी (title, description, image) गायब है, image का link relative है (उसे पूरा URL होना चाहिए), image का size सही नहीं है, या सोशल प्लेटफ़ॉर्म पुरानी जानकारी दिखा रहा है (cache)।
preview image का आदर्श size कितना है?
सुझाया गया size 1200 पिक्सल चौड़ा और 630 पिक्सल ऊँचा है। इससे image सभी प्लेटफ़ॉर्म पर अच्छी दिखती है।
अगर मैं लिंक पहले ही शेयर कर चुका हूँ, तो preview कैसे अपडेट करूँ?
website पर समस्या ठीक करने के बाद, आप प्लेटफ़ॉर्म के अपने टूल (जैसे Facebook का Debugger या Twitter/X का Card Validator) इस्तेमाल करके उनसे लिंक की नई जानकारी दोबारा लाने को कह सकते हैं।
जानकारी
लेखक का मूल विवरण
Fix social sharing previews so URLs render as rich cards on Facebook, LinkedIn, X/Twitter, WhatsApp, Telegram, and more. Covers OG tags, Twitter cards, absolute image URLs, and debugging.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #5821
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
xurl
394kयह आपके एजेंट को प्रमाणित xurl टूल से X पर पोस्ट करने, जवाब देने, खोजने और पढ़ने, सीधे संदेश भेजने और मीडिया अपलोड करने में मदद करती है।
connections-optimizer
280kयह आपके social network connections बेहतर बनाता है। यह बताता है किसे follow या unfollow करना है और अपने network को बढ़ाने के लिए personalized messages लिखने में मदद करता है।
content-engine
280kयह अलग-अलग platforms के लिए content बनाता है। X, LinkedIn और YouTube जैसे networks पर अच्छे काम करने वाले posts, scripts और content calendars तैयार करने में मदद करता है।