document-head-seo
Skill11 starsChanged 11 days agoMITView on GitHub
Construct, review or repair an HTML document head for search discovery, social sharing, browser behavior and efficient critical-resource loading.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- accessibility-automationSkill
- accessibility-reviewSkill
- accessible-componentsSkill
- accessible-motionSkill
- animation-performanceSkill
- anti-slop-uiSkill
- api-securitySkill
- authentication-sessionsSkill
- authorization-access-controlSkill
- component-engineeringSkill
- core-web-vitalsSkill
- design-directionSkill
- design-system-architectureSkill
- font-performanceSkill
- forms-and-validationSkill
- frontend-architectureSkill
- gsap-fundamentalsSkill
- icon-engineeringSkill
- image-asset-optimizationSkill
- independent-reviewSkill
- interactive-storytellingSkill
- javascript-performanceSkill
- keyboard-focusSkill
- modern-cssSkill
- motion-design-systemsSkill
- network-cachingSkill
- performance-auditingSkill
- performance-testingSkill
- premium-landing-pagesSkill
- quickstart-onboardingSkill
- rendering-performanceSkill
- responsive-engineeringSkill
- screen-reader-testingSkill
- scrolltrigger-experiencesSkill
- secrets-configurationSkill
- secure-application-designSkill
- secure-input-outputSkill
- security-reviewSkill
- security-testingSkill
- semantic-accessibilitySkill
- visual-design-reviewSkill
- visual-reference-analysisSkill
- wcag-auditingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. About 0 are common, 21 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when creating a page, implementing a route-level metadata system, reviewing search/social previews, or correcting …
- Distinctive: line 16
Never fabricate a canonical URL, social image, author, publication date, business identity, structured-data value or search verification …
- Distinctive: line 20
Use the HEAD guide as the comprehensive practical catalog of head elements, metadata families, icons and recommended ordering.
- Distinctive: line 22
Start with the required document metadata, placed early:
- Distinctive: line 29
Add only metadata that is accurate and applicable:
- Distinctive: line 37
Keep titles and descriptions unique across indexable routes.
- Distinctive: line 49
Add Open Graph metadata for share previews.
- Distinctive: line 59
Add Twitter/X card metadata:
- Distinctive: line 66
Keep Open Graph and Twitter values consistent with the visible page content.
- Very specific: line 70
Use the actual project assets and deployment paths.
- Distinctive: line 72
Every referenced file exists and returns successfully from the deployed base path.
- Distinctive: line 76
No broken legacy favicon path remains.
- Distinctive: line 78
Do not generate new icon URLs or manifest references without creating and verifying the corresponding assets.
- Distinctive: line 82
Use resource hints selectively, based on a measured critical path:
- Very specific: line 84
Use preconnect for a small number of critical cross-origin origins that the page will contact early.
- Very specific: line 85
Use dns-prefetch only as a lower-cost hint where a connection is not yet justified.
- Very specific: line 86
Use preload only for resources needed very early and otherwise discovered late, such as a confirmed LCP image, critical font or essential …
- Distinctive: line 87
Do not preload every image, font, script or stylesheet.
- Very specific: line 88
Use fetchpriority="high" only for the actual high-priority resource when supported and justified.
- Very specific: line 89
Use defer for classic scripts that need to execute after parsing and preserve dependency order.
- Distinctive: line 90
Keep stylesheets and required resource hints discoverable early.
- Distinctive: line 100
Check Open Graph and Twitter metadata for accurate, matching page content and absolute public image URLs.
- Distinctive: line 101
Verify favicons, touch icons and manifest assets return successfully.
- Distinctive: line 102
Check for duplicate, conflicting or stale metadata injected by layouts, plugins or client-side code.
- Distinctive: line 110
Treat the WHATWG HTML standard and current search/platform documentation as normative for behavior.
- Distinctive: line 112
Do not add structured data unless its values are accurate, visible/appropriate for the page and validated against the applicable schema …
- Distinctive: line 114
Do not copy substantial third-party reference content into this skill.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
Document Head, SEO and Metadata
Use this skill when creating a page, implementing a route-level metadata system, reviewing search/social previews, or correcting document-head markup. Produce metadata that accurately represents the page and does not invent claims, URLs, images or verification tokens.
1. Inspect the page and deployment model
- Identify the page's primary purpose, audience, language, content title and concise description.
- Determine its final public URL, indexability, canonical URL, social-preview image and supported locales.
- Inspect the existing framework, routing, SSR/SSG or client-rendering model, metadata library and deployment base path.
- Reuse the project's established metadata system. Ensure each route emits its own metadata in the initial HTML when the rendering architecture supports it; do not rely on post-load JavaScript for essential crawler metadata when server/static rendering is available.
- Never fabricate a canonical URL, social image, author, publication date, business identity, structured-data value or search verification token. Ask for missing facts or omit optional fields.
2. Build a valid, ordered <head>
Use the HEAD guide as the comprehensive practical catalog of head elements, metadata families, icons and recommended ordering. Confirm normative element validity and semantics against the WHATWG HTML Living Standard. HEAD is a community reference, not a substitute for the HTML standard.
Start with the required document metadata, placed early:
<meta charset="utf-8">near the beginning of the document head.<meta name="viewport" content="width=device-width, initial-scale=1">for responsive viewport behavior.- A unique, descriptive
<title>for the page. - A concise, accurate
<meta name="description">that summarizes the page without keyword stuffing.
Add only metadata that is accurate and applicable:
<meta name="robots">only when crawler behavior needs to be controlled; do not accidentally block production indexing.<meta name="theme-color">and<meta name="color-scheme">when they reflect the actual interface.<meta name="referrer">only when the chosen policy is intentional and consistent with application requirements.- Site-verification tags only when the owner supplies the real token.
- A Content Security Policy should normally be delivered as an HTTP response header. Do not add a meta CSP as a substitute for a complete server policy; understand its limitations and test compatibility first.
Keep titles and descriptions unique across indexable routes. Avoid obsolete or unsupported SEO tags and do not promise ranking outcomes.
3. Add canonical and social-sharing metadata
For an indexable page, include an absolute canonical URL that resolves to the preferred public version of that page:
<link rel="canonical" href="https://example.com/products/example">Normalize trailing slashes, query parameters, hostnames and locale variants according to the site's routing policy. Do not canonicalize unrelated pages to the homepage. For non-indexable or private pages, follow the site's explicit indexing policy instead of adding a misleading canonical.
Add Open Graph metadata for share previews. At minimum, provide page-specific values for:
og:type(usuallywebsiteorarticle, as appropriate).og:title.og:description.og:url(the canonical public URL).og:image(an absolute, publicly fetchable image URL with suitable dimensions and format).og:site_namewhere a site name is defined.og:localewhen locale information is known.
Add Twitter/X card metadata:
twitter:card(commonlysummary_large_imagewhen a suitable large image exists; otherwise use a suitable card type).twitter:titleandtwitter:description.twitter:imagewhen a valid share image is available.twitter:siteortwitter:creatoronly when verified account handles are supplied.
Keep Open Graph and Twitter values consistent with the visible page content. Do not use a placeholder image, inaccessible private asset or misleading preview. Platform rendering and card availability can change; verify previews with the relevant platform tools where possible.
4. Configure favicons and application icons
Use the actual project assets and deployment paths. Include appropriate <link rel="icon"> declarations for the supported favicon formats/sizes and a touch icon when the product provides one. Link a web app manifest only when the project includes a valid manifest. Check:
- Every referenced file exists and returns successfully from the deployed base path.
- Icon MIME types and declared sizes match the actual assets.
- Light/dark variants are used only when real variants exist.
- The manifest's names, theme colors and icon paths agree with the product.
- No broken legacy favicon path remains.
Do not generate new icon URLs or manifest references without creating and verifying the corresponding assets.
5. Optimize critical resource discovery
Use resource hints selectively, based on a measured critical path:
- Use
preconnectfor a small number of critical cross-origin origins that the page will contact early. Addcrossoriginwhen required by the resource's fetch mode, especially for font origins. - Use
dns-prefetchonly as a lower-cost hint where a connection is not yet justified. - Use
preloadonly for resources needed very early and otherwise discovered late, such as a confirmed LCP image, critical font or essential stylesheet. Set the correctas,type,crossoriginand responsiveimagesrcset/imagesizesattributes when applicable. - Do not preload every image, font, script or stylesheet. Incorrect or excessive preloads compete with more important work and can worsen performance.
- Use
fetchpriority="high"only for the actual high-priority resource when supported and justified; avoid duplicating priority signals without evidence. - Use
deferfor classic scripts that need to execute after parsing and preserve dependency order. Useasynconly when execution order does not matter. Prefer module semantics appropriate to the application. - Keep stylesheets and required resource hints discoverable early; do not introduce fragile JavaScript-based stylesheet loading without a clear need and a no-JavaScript fallback.
Validate hints using a network waterfall and browser performance trace. A hint is useful only when it improves discovery or loading under representative conditions.
6. Validate the result
Before completion:
- Inspect the rendered initial HTML for the target route, not only the source component.
- Confirm one meaningful title, description and canonical URL per indexable page.
- Check Open Graph and Twitter metadata for accurate, matching page content and absolute public image URLs.
- Verify favicons, touch icons and manifest assets return successfully.
- Check for duplicate, conflicting or stale metadata injected by layouts, plugins or client-side code.
- Confirm crawler directives do not unintentionally noindex or block the production page.
- Review preconnect/preload choices against the actual network waterfall and LCP resource.
- Validate HTML structure and test social previews with platform validators where available.
- Record routes inspected, evidence, unresolved assets and checks not performed.
Constraints
- Treat the WHATWG HTML standard and current search/platform documentation as normative for behavior; use HEAD as a practical catalog.
- Metadata improves document semantics and sharing context but does not guarantee search ranking or social-card rendering.
- Do not add structured data unless its values are accurate, visible/appropriate for the page and validated against the applicable schema requirements.
- Respect the existing framework, SSR/SSG architecture, content-management system and deployment base path.
- Do not copy substantial third-party reference content into this skill. Keep these instructions independently authored and link to sources.
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
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.

