og-tags
它能做什么
这个技能检查页面 head 部分中的社交分享标签,并补上缺失的标签。它面向希望分享链接看起来清晰、吸引人的网站所有者。
适用场景
- ✓你请智能体检查页面是否有正确社交分享标签的时候。
- ✓社交平台上分享的链接显示的是猜测的标题或错误的图片的时候。
- ✓你发布新页面,并希望它带有完整标签、可以直接分享的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/og-tags/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我检查页面的社交分享标签,并补上缺失的标签吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会在页面 head 中查找 og:title、og:description、og:image、og:url 和 og:type。它会用非空的值补上缺失的标签,并为图片和网址使用绝对的 HTTPS 地址。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Open Graph Tags
Open Graph tags control how your pages appear when shared on Facebook, LinkedIn, Slack, and other platforms—missing or incorrect tags result in unappealing link previews that reduce click-through rates.
Quick Reference
- Include og:title, og:description, og:image, and og:url on every page
- Use absolute URLs for og:image and og:url
- og:image should be at least 1200×630 px for optimal display
- og:type defaults to 'website' if omitted, but setting it explicitly is best practice
Check
Check the <head> for Open Graph meta tags: og:title, og:description, og:image, og:url, and og:type. Verify all values are non-empty and og:image/og:url use absolute HTTPS URLs.
Fix
Add the four required Open Graph meta tags to the <head>: og:title (≤95 chars), og:description (≤200 chars), og:image (absolute HTTPS URL, 1200×630), og:url (canonical absolute URL). Add og:type='website' for standard pages.
Explain
Open Graph tags control how this page is displayed when shared on social platforms like Facebook, LinkedIn, and Slack. Without them, platforms fall back to guessing the title, description, and image, often with poor results.
Code Review
Check the rendered <head> for all five core OG properties: og:title, og:description, og:image, og:url, og:type. Verify og:image and og:url values start with 'https://'. Flag any empty content attributes. Compare og:url against the canonical tag — they must match exactly.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
常见问题
哪些标签是必需的?
这个技能把 og:title、og:description、og:image 和 og:url 列为每个页面的核心标签,并建议同时添加 og:type。
为什么网址必须是绝对地址?
社交平台需要完整地址,才能可靠地抓取图片和页面。
没有这些标签会怎样?
平台会自行猜测标题、描述和图片,结果往往不理想。
详情
作者的原始描述
Use when auditing a web page's social sharing metadata. Applies to any page users might share on social networks or messaging apps.
热度
- GitHub 星标
- 75k
- 排名
- #2960
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。