fixing-metadata – skill Bảo mật cho agent AI
Kiểm tra và sửa metadata HTML gồm tiêu đề trang, meta description, URL canonical, thẻ Open Graph, Twitter card, favicon, dữ liệu có cấu trúc JSON-LD và chỉ thị robots.
Cài skill fixing-metadata bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/fixing-metadata-7cb1c.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /fixing-metadata – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/fixing-metadata-7cb1c.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $fixing-metadata – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/fixing-metadata-7cb1c.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /fixing-metadata – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/fixing-metadata-7cb1c.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /fixing-metadata – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
When to Use
Use this skill when you need audit and fix HTML metadata including page titles, meta descriptions, canonical URLs, Open Graph tags, Twitter cards, favicons, JSON-LD structured data, and robots directives. Use when adding SEO metadata, fixing social share previews, reviewing Open Graph tags, setting up canonical...
Workflow
1. Identify pages with missing or incorrect metadata (titles, descriptions, canonical, OG tags)
2. Audit against the priority rules below — fix critical issues (duplicates, indexing) first
3. Ensure title, description, canonical, and og:url all agree with each other
4. Verify social cards render correctly on a real URL, not localhost
5. Keep diffs minimal and scoped to metadata only — do not refactor unrelated code
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
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 |
quick reference
1. correctness and duplication (critical)
- 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
2. title and description (high)
- 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
3. canonical and indexing (high)
- canonical must point to the preferred URL for the page
- use noindex only for the intended indexing policy; it is not access control for private pages, which require authentication/authorization
- 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
4. social cards (high)
- 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
5. icons and manifest (medium)
- 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
6. structured data (medium)
- 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
7. locale and alternates (low-medium)
- 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
8. tool boundaries (critical)
- 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.)
review guidance
- fix critical issues first (duplicates, canonical, indexing)
- ensure title, description, canonical, and og:url agree
- verify social cards on an authorized real URL; an external debugger may fetch and expose the submitted URL, so do not submit private/staging content without authorization
- prefer stable, boring metadata over clever or dynamic
- keep diffs minimal and scoped to metadata only
Example
User request:
> Audit and fix HTML metadata including page titles, meta descriptions, canonical URLs, Open Graph tags, Twitter cards, favicons, JSON-LD structured data, and robots directives.
Limitations
- Use this skill only when the task clearly matches its upstream source and local project context.
- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
Skill liên quan
- security-guidance – Hook PreToolUse cho Claude Code phát hiện anti-pattern bảo mật. Bắt 12 rủi ro bảo mật…
- security-pen-testing – Dùng khi người dùng yêu cầu kiểm tra bảo mật, pen test, quét lỗ hổng, kiểm tra OWASP Top…
- frontend-mobile-security-xss-scan – Kiểm tra mã frontend để tìm điểm chèn XSS, thao tác DOM không an toàn và thiếu bước…
- frontend-security-coder – Chuyên gia viết mã frontend an toàn, chuyên về phòng chống XSS, sanitize đầu ra và các…
- geo-audit – Kiểm toán GEO+SEO toàn bộ website với việc giao nhiệm vụ song song cho subagent.
- geo-platform-optimizer – Tối ưu tìm kiếm AI theo từng nền tảng — kiểm tra và tối ưu riêng cho Google AI…
- geo-proposal – Tự động tạo đề xuất dịch vụ GEO chuyên nghiệp, sẵn sàng gửi khách hàng, từ dữ liệu audit.
- geo-report – Tạo báo cáo GEO chuyên nghiệp cho khách hàng, gộp toàn bộ kết quả audit thành một tài…