Skills· Official
SEO skill for coding agents
Make a site crawlable and well shown in search: unique titles and descriptions, one canonical URL per page, a sitemap, robots and structured data, checked live.
When to use it. When launching a site or adding public pages, or when pages aren't indexed, show the wrong title or snippet, or compete with duplicate URLs.
Get the foundations right on every public page, then verify against the live site — what you meant to ship and what is actually served often differ.
Steps
- List the public pages. Every URL that should be indexed (marketing, docs, product, pricing) and every one that shouldn't (screens behind sign-in, settings, API routes, internal search results, staging). This list drives every other step.
- Give each page its own title and description. Unique, specific, written for a person scanning results. Title under about 60 characters with the topic first; description about 70–160 characters saying what the page offers. No boilerplate repeated across pages.
- Declare one canonical URL per page.
<link rel="canonical" href="https://example.com/page">— absolute, on the preferred host and protocol, without tracking parameters. If the same content answers at two addresses, redirect one (301) or have both name the same canonical. - Publish
/sitemap.xmllisting every indexable URL and nothing else, generated from the same source as your routes so it can't go stale. Point to it from robots.txt. - Write
/robots.txtthat allows what should be crawled and disallows only private areas. Never shipDisallow: /. To keep a page out of the index, use<meta name="robots" content="noindex">— robots.txt only stops crawling, not indexing. - Add structured data (JSON-LD) where search shows it:
Organization,WebSite,BreadcrumbList,ProductandOffer,Article— andFAQPageonly for questions answered visibly on the page, word for word. - Add share tags —
og:title,og:description,og:image(1200×630),og:url,twitter:card— so a shared link looks intentional. - Render metadata on the server. A title or description set only by client-side JavaScript may never be seen by a crawler.
- Keep pages fast and stable. Serve public pages statically or from an edge cache; give images dimensions so the layout doesn't shift; lazy-load images below the fold. One
<h1>per page, matching its topic.
Verify against the live site
curl -s https://example.com/page | grep -Eio '<title>[^<]*|<meta name="description"[^>]*|<link rel="canonical"[^>]*|<meta name="robots"[^>]*'# prints nothing on a public pagecurl -sI https://example.com/page | grep -i x-robots-tagcurl -s https://example.com/robots.txtcurl -s https://example.com/sitemap.xml | grep -c '<loc>'Confirm: titles are unique across pages; each canonical is absolute and points at itself (or the preferred duplicate); every sitemap URL answers 200 and is canonical; no public page is noindexed; structured data passes Google's Rich Results Test.
Done when
- Every public page has a unique, specific title and description
- Every page has one absolute canonical URL
- The sitemap lists exactly the indexable pages, and robots.txt points to it
- Private areas are excluded, and nothing public is blocked or noindexed
- Structured data matches what's visible on the page
- All of it verified on the deployed site, not just in the code
Report back
What changed on each page, the verification output, and the steps outside the code for the person: submit the sitemap in Google Search Console and Bing Webmaster Tools, then watch the indexing report over the following weeks.
Traps
- A staging
noindexorDisallow: /that reaches production. - A canonical that points at a redirect or a 404.
- FAQ structured data for questions that aren't on the page.
- Checking the build output instead of what the live site serves — caches and CDNs differ.
More skills