fixing-metadata
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesefixing-metadata
修复元数据
Ship correct, complete metadata.
交付准确、完整的元数据。
how to use
使用方法
-
Apply these constraints to any metadata work in this conversation.
/fixing-metadata -
Review the file against all rules below and report:
/fixing-metadata <file>- violations (quote the exact line or snippet)
- why it matters (one short sentence)
- a concrete fix (code-level suggestion)
Do not introduce new frameworks or SEO libraries unless explicitly requested. Prefer minimal diffs.
-
将这些约束应用于本次对话中的所有元数据相关工作。
/fixing-metadata -
根据以下所有规则审查文件并报告:
/fixing-metadata <file>- 违规情况(引用确切的行或代码片段)
- 违规影响(一句话简要说明)
- 具体修复方案(代码层面的建议)
除非明确要求,否则不要引入新的框架或SEO库。优先选择最小化代码变更。
when to apply
适用场景
Reference these guidelines when:
- adding or changing page titles, descriptions, canonical, robots
- implementing Open Graph or Twitter card metadata
- setting favicons, app icons, manifest, theme-color
- building shared SEO components or layout metadata defaults
- adding structured data (JSON-LD)
- changing locale, alternate languages, or canonical routing
- shipping new pages, marketing pages, or shareable links
在以下场景中参考这些指南:
- 添加或修改页面标题、描述、规范链接(canonical)、robots标签
- 实现Open Graph或Twitter卡片元数据
- 设置网站图标(favicon)、应用图标、清单文件(manifest)、主题颜色(theme-color)
- 构建共享的SEO组件或布局元数据默认配置
- 添加结构化数据(JSON-LD)
- 修改区域设置、替代语言或规范路由
- 发布新页面、营销页面或可分享链接
rule categories by priority
按优先级划分的规则类别
| priority | category | impact |
|---|---|---|
| 1 | correctness and duplication | critical |
| 2 | title and description | high |
| 3 | canonical and indexing | high |
| 4 | social cards | high |
| 5 | icons and manifest | medium |
| 6 | structured data | medium |
| 7 | locale and alternates | low-medium |
| 8 | tool boundaries | critical |
| 优先级 | 类别 | 影响程度 |
|---|---|---|
| 1 | 准确性与重复性 | 关键 |
| 2 | 标题与描述 | 高 |
| 3 | 规范链接与索引 | 高 |
| 4 | 社交卡片 | 高 |
| 5 | 图标与清单文件 | 中 |
| 6 | 结构化数据 | 中 |
| 7 | 区域设置与替代语言 | 中低 |
| 8 | 工具边界 | 关键 |
quick reference
快速参考
1. correctness and duplication (critical)
1. 准确性与重复性(关键)
- define metadata in one place per page, avoid competing systems
- do not emit duplicate title, description, canonical, or robots tags
- metadata must be deterministic, no random or unstable values
- escape and sanitize any user-generated or dynamic strings
- every page must have safe defaults for title and description
- 每个页面的元数据仅在一处定义,避免冲突的系统
- 不要输出重复的标题、描述、规范链接或robots标签
- 元数据必须是确定的,不能包含随机或不稳定的值
- 对任何用户生成或动态字符串进行转义和清理
- 每个页面必须有标题和描述的安全默认值
2. title and description (high)
2. 标题与描述(高)
- every page must have a title
- use a consistent title format across the site
- keep titles short and readable, avoid stuffing
- shareable or searchable pages should have a meta description
- descriptions must be plain text, no markdown or quote spam
- 每个页面必须有标题
- 全站使用一致的标题格式
- 标题应简短易读,避免关键词堆砌
- 可分享或可搜索的页面应设置元描述
- 描述必须是纯文本,不能包含markdown或垃圾引用内容
3. canonical and indexing (high)
3. 规范链接与索引(高)
- canonical must point to the preferred URL for the page
- use noindex only for private, duplicate, or non-public pages
- robots meta must match actual access intent
- previews or staging pages should be noindex by default when possible
- paginated pages must have correct canonical behavior
- 规范链接必须指向页面的首选URL
- 仅对私有、重复或非公开页面使用noindex
- robots元标签必须与实际的访问意图一致
- 预览或 staging 页面应尽可能默认设置为noindex
- 分页页面必须有正确的规范链接行为
4. social cards (high)
4. 社交卡片(高)
- shareable pages must set Open Graph title, description, and image
- Open Graph and Twitter images must use absolute URLs
- prefer correct image dimensions and stable aspect ratios
- og:url must match the canonical URL
- use a sensible og:type, usually website or article
- set twitter:card appropriately, summary_large_image by default
- 可分享页面必须设置Open Graph标题、描述和图片
- Open Graph和Twitter图片必须使用绝对URL
- 优先选择正确的图片尺寸和稳定的宽高比
- og:url必须与规范链接URL一致
- 使用合理的og:type,通常为website或article
- 适当设置twitter:card,默认使用summary_large_image
5. icons and manifest (medium)
5. 图标与清单文件(中)
- include at least one favicon that works across browsers
- include apple-touch-icon when relevant
- manifest must be valid and referenced when used
- set theme-color intentionally to avoid mismatched UI chrome
- icon paths should be stable and cacheable
- 至少包含一个可在所有浏览器中正常工作的网站图标(favicon)
- 相关情况下包含apple-touch-icon
- 使用清单文件时必须保证其有效且已正确引用
- 有意设置theme-color,避免不匹配的UI浏览器栏
- 图标路径应稳定且可缓存
6. structured data (medium)
6. 结构化数据(中)
- do not add JSON-LD unless it clearly maps to real page content
- JSON-LD must be valid and reflect what is actually rendered
- do not invent ratings, reviews, prices, or organization details
- prefer one structured data block per page unless required
- 除非结构化数据能清晰映射到实际页面内容,否则不要添加JSON-LD
- JSON-LD必须有效且反映实际渲染的内容
- 不要虚构评分、评论、价格或组织详情
- 除非必要,否则每个页面优先使用一个结构化数据块
7. locale and alternates (low-medium)
7. 区域设置与替代语言(中低)
- set the html lang attribute correctly
- set og:locale when localization exists
- add hreflang alternates only when pages truly exist
- localized pages must canonicalize correctly per locale
- 正确设置html lang属性
- 存在本地化时设置og:locale
- 仅当对应的页面真实存在时才添加hreflang替代链接
- 本地化页面必须按区域设置正确配置规范链接
8. tool boundaries (critical)
8. 工具边界(关键)
- prefer minimal changes, do not refactor unrelated code
- do not migrate frameworks or SEO libraries unless requested
- follow the project’s existing metadata pattern (Next.js metadata API, react-helmet, manual head, etc.)
- 优先选择最小化变更,不要重构无关代码
- 除非被要求,否则不要迁移框架或SEO库
- 遵循项目现有的元数据模式(如Next.js metadata API、react-helmet、手动设置head等)
review guidance
审查指南
- fix critical issues first (duplicates, canonical, indexing)
- ensure title, description, canonical, and og:url agree
- verify social cards on a real URL, not localhost
- prefer stable, boring metadata over clever or dynamic
- keep diffs minimal and scoped to metadata only
- 优先修复关键问题(重复内容、规范链接、索引设置)
- 确保标题、描述、规范链接和og:url保持一致
- 在真实URL而非localhost上验证社交卡片
- 优先选择稳定、常规的元数据,而非花哨或动态的
- 保持代码变更最小化,仅聚焦于元数据相关内容