/agentic-awesome-skills:social-metadata-hardeningfrom agentic-awesome-skills
Fixes 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.
Ships in agentic-awesome-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Fix social sharing so every important URL unfurls as a rich card across all platforms.
metadataBase coverage in a web app.| 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) |
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
if (!image) throw new Error("An approved preview image is required");
const imageUrl = new URL(image, baseUrl).href;
const pageUrl = new URL(path, baseUrl).href;
if (new URL(imageUrl).protocol !== "https:" || new URL(pageUrl).protocol !== "https:") {
throw new Error("Public metadata URLs must use HTTPS");
}
// Detect MIME type from extension
const ext = new URL(imageUrl).pathname.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],
},
};
}
// 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',
});
// app/blog/[slug]/page.js
import { buildSocialMetadata } from '@/lib/socialMetadata';
export async function generateMetadata({ params }) {
const { slug } = await params; // Compatible with async params in newer Next.js.
const post = await getPost(slug);
return buildSocialMetadata({
title: `${post.title} | My Blog`,
description: post.excerpt,
path: `/blog/${slug}`,
image: post.ogImage || '/images/og/default.jpg',
imageAlt: post.title,
});
}
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.
Good OG images:
# 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"
og:title, og:description, og:image, og:urltwitter:card = summary_large_image for full-width imagestwitter:image must be an absolute URLog: tags; ignores twitter: tagsog:type = article for richer embedscurl -s https://www.yourdomain.com/blog/my-post | grep -i "og:\|twitter:"
If tags don't appear → they're being added by JavaScript (not crawlable). Fix: move to export const metadata or generateMetadata.
| Platform | Tool |
|---|---|
| https://developers.facebook.com/tools/debug/ | |
| https://www.linkedin.com/post-inspector/ | |
| Twitter/X | https://cards-dev.twitter.com/validator |
| General | https://metatags.io |
After deploying fixes, paste the URL into each platform's debugger and click "Fetch new scrape information" (or equivalent).
metadataBase set in root layoutbuildSocialMetadata helperhttps://)secureUrl set equal to url in OG image blocktwitter:card is summary_large_image (not summary)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sickn33/agentic-awesome-skills --plugin agentic-awesome-skills3,104 skills in this plugin
/007Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project./00-andruia-consultantUsar al iniciar o mejorar un proyecto de IA: diagnostica código y restricciones, propone skills existentes y redacta tareas y un plan de implementación en español./10-andruia-skill-smithUsar para crear o mejorar una skill de Andru.ia: define entradas y resultados, redacta SKILL.md con ejemplos y límites, valida la estructura y prepara una PR.3 plugins in 2 repositories ship this exact skill · first indexed Oct 23, 2026
Other plugins' skills for the same job