agentleFS
valtterimelkkovaltterimelkko/agent-workflow-skills/skills/socialmedia-optimization/SKILL.md

socialmedia-optimization

Skill2 starsChanged 44 days agoMITView on GitHub

Implement and validate Open Graph, Twitter Card, and social preview metadata for websites. Use when the task is about preview cards, meta tags, social sharing behaviour, or fixing broken previews. Do not use this for generating the image assets themselves unless paired with web-asset-generator.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always test implementation before deploying:

    line 142
  2. Distinctive:

    Important: After updating tags, use these tools to force a fresh scrape.

    line 152

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Social Media Optimization Skill

Guide for implementing social media sharing optimization including Open Graph Protocol, Twitter Cards, image dimensions, and validation tools.

Quick Reference

Essential Meta Tags (Minimum Required)

<!-- Open Graph -->
<meta property="og:title" content="Compelling Headline (60-90 chars)">
<meta property="og:type" content="article">
<meta property="og:image" content="https://yoursite.com/og-image.jpg">
<meta property="og:url" content="https://yoursite.com/page">

<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Compelling Headline">
<meta name="twitter:description" content="Description under 200 chars">
<meta name="twitter:image" content="https://yoursite.com/og-image.jpg">

Image Dimensions by Platform

PlatformSizeAspect RatioFile Max
Universal1200 × 630 px1.91:1< 1 MB
Facebook1200 × 630 px1.91:18 MB
LinkedIn1200 × 627 px1.91:18 MB
Twitter/X1200 × 628 px1.91:15 MB
Pinterest1000 × 1500 px2:320 MB

Absolute minimum: 200 × 200 px (below this, no image displays)

Complete Implementation Template

<!-- Essential Meta -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Title</title>
<meta name="description" content="SEO description">

<!-- Open Graph / Facebook / LinkedIn -->
<meta property="og:type" content="article">
<meta property="og:url" content="https://yoursite.com/page">
<meta property="og:title" content="Compelling Social Headline">
<meta property="og:description" content="Enticing description under 200 chars">
<meta property="og:image" content="https://yoursite.com/og-image-1200x630.jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:site_name" content="Your Brand">
<meta property="og:locale" content="en_US">

<!-- Twitter / X -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="https://yoursite.com/page">
<meta name="twitter:title" content="Compelling Social Headline">
<meta name="twitter:description" content="Enticing description under 200 chars">
<meta name="twitter:image" content="https://yoursite.com/og-image.jpg">
<meta name="twitter:image:alt" content="Descriptive alt text">
<meta name="twitter:site" content="@YourHandle">

<!-- Analytics (optional) -->
<meta property="fb:app_id" content="your_app_id">

Tag Reference

Open Graph Required Tags

TagPurposeExample
og:titleHeadline in preview"10 Ways to Improve SEO"
og:typeContent typearticle, website, video
og:imagePreview image URLAbsolute URL required
og:urlCanonical URLhttps://example.com/page

Open Graph Recommended Tags

TagPurposeBest Practice
og:descriptionSummary textUnder 200 characters
og:site_nameBrand nameConsistent across pages
og:localeLanguage/regionen_US, de_DE
og:image:widthImage widthInclude for immediate display
og:image:heightImage heightInclude for immediate display

Twitter Card Tags

TagPurposeValues
twitter:cardCard typesummary, summary_large_image
twitter:titleCard titleMax 70 chars
twitter:descriptionCard descriptionMax 200 chars
twitter:imageImage URLMin 300×157 px
twitter:image:altAlt textAccessibility
twitter:siteSite handle@BrandHandle

Card Types:

  • summary — Small square image + text
  • summary_large_image — Large featured image (best engagement)
  • app — Mobile app promotion
  • player — Video/audio embed

Image Best Practices

Design Guidelines

  1. Use 1.91:1 aspect ratio — Fits most platforms without cropping
  2. Center important content — Edges may be cropped on mobile
  3. Minimum 1200 px width — High resolution for Retina displays
  4. Keep file size under 1 MB — Faster loading
  5. High contrast — Ensure readability on mobile
  6. Include branding — Logo visible but not dominant

Common Mistakes to Avoid

MistakeProblemSolution
Relative image URLsImage won't displayUse absolute URLs (https://...)
Image too smallTiny/no thumbnailMinimum 600 × 315 px
Wrong aspect ratioAwkward croppingStick to 1.91:1
File too largeSlow/timeoutCompress to < 1 MB
Missing og:typePlatform confusionAlways include type

Character Limits

ElementRecommendedMaximumNotes
Title55-60 chars95 charsFacebook truncates at ~88
Description150-160 chars300 charsKeep under 200 for safety
Twitter title70 chars—Concise works best

Testing & Validation Tools

Always test implementation before deploying:

ToolPlatformURL
Facebook Sharing DebuggerFacebookdevelopers.facebook.com/tools/debug/
LinkedIn Post InspectorLinkedInlinkedin.com/post-inspector/
Twitter Card ValidatorTwitter/Xcards-dev.twitter.com/validator
OpenGraph.xyzUniversalopengraph.xyz
Check Yo MetaUniversalcheckyometa.com

Important: After updating tags, use these tools to force a fresh scrape. Social platforms cache aggressively.

Platform-Specific Notes

Facebook

  • Supports images up to 8 MB
  • Caches images aggressively—use debugger to refresh
  • Include og:image:width and og:image:height for immediate display
  • First share without these dimensions may not show image immediately

LinkedIn

  • Caches even more aggressively than Facebook
  • Same 1.91:1 ratio preferred
  • Minimum width: 200 px

Twitter/X

  • Falls back to OG tags if Twitter Cards absent
  • Implement both for optimal control
  • summary_large_image cards perform best

Pinterest

  • Vertical images win: 2:3 aspect ratio
  • Uses only og:image from OG tags
  • Minimum 600 px width recommended

WhatsApp / Messaging Apps

  • Uses OG tags for previews
  • Smaller preview cards—test cropping

Dynamic Generation

For CMS-driven sites, generate tags dynamically:

<meta property="og:title" content="{{ post.title }}">
<meta property="og:description" content="{{ post.excerpt|truncate(160) }}">
<meta property="og:image" content="{{ post.featured_image.url }}">
<meta property="og:type" content="article">
<meta property="article:published_time" content="{{ post.published_at }}">

Implementation Checklist

  • Add essential OG tags (title, type, image, url)
  • Add Twitter Card tags (card, title, description, image)
  • Create 1200 × 630 px image
  • Use absolute URLs for images
  • Test with Facebook Sharing Debugger
  • Test with LinkedIn Post Inspector
  • Test with Twitter Card Validator
  • Clear cache and re-test after changes
  • Verify mobile preview appearance

Business Impact

Studies show significant benefits from proper social optimization:

  • Posts with images: 150% more engagement
  • Facebook posts with images: 100% more engagement, 114% more impressions
  • Proper OG implementation: 78-250% increase in social traffic
  • Optimized previews: 2-3x higher click-through rates

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.