A Claude Code custom command that runs a 10-step SEO, schema, analytics, and AI-discoverability checklist automatically every time you create a new webpage. This is the exact process I run before pushing any page live.
Drop it into your ~/.claude/commands/ folder and it becomes a /new-page slash command available in every project.
Background
Claude Code is Anthropic's AI coding tool that works directly in your terminal. One of its most useful features is custom commands — Markdown files you write once that become slash commands Claude executes on demand.
This file is one of those commands. Save it to ~/.claude/commands/new-page.md and you get a /new-page command that works in any project on your machine.
Every time I create a new page, I run /new-page https://my-url.com/page and Claude works through 10 checks automatically — writing anything that's missing, flagging anything it can't fix, and verifying everything is actually in the rendered HTML before I push.
This checklist is designed around the workflow I use: a Next.js site hosted on Vercel, with code living in a GitHub repository. Vercel auto-deploys on every push to main, and Next.js auto-generates robots.txt and sitemap.xml from your TypeScript files.
Some steps — like Vercel Analytics (/_vercel/insights/script.js) and the app/sitemap.ts path — are specific to this setup. If your stack is different, see the adapting the file section below.
What it checks
Executed in order, every time. Claude checks whether each requirement is already met before making any changes.
Identifies whether you're working in a Next.js project or a standalone HTML file. This determines how every subsequent step is handled — from where the sitemap lives to how schema markup gets injected.
Next.js is detected by the presence of next.config.mjs or next.config.js. Everything else is treated as static HTML.
Ensures every page declares its canonical URL so search engines know the authoritative version of the content.
For Next.js, it sets the alternates.canonical field in the metadata export. For static HTML, it adds a <link rel="canonical"> tag in the <head>.
Verifies the page has a descriptive title and meta description — and writes them if they're missing or left as a framework placeholder.
Claude reads the actual page content and writes values that accurately reflect what the page is about. No generic placeholders.
Checks that the page has exactly one H1 tag with a descriptive title that clearly communicates what the page is about.
A missing or vague H1 (like "Home" or "Page") gets rewritten. Multiple H1s on the same page get flagged and consolidated. The H1 should be specific enough that a reader knows what the page covers without reading anything else.
Picks the right schema type for the page (Person, Article, Dataset, SoftwareApplication, Course, FAQPage, etc.) and adds a properly structured JSON-LD block.
Schema type is chosen based on the page's content and purpose. At minimum includes @context, @type, name, url, and description. Additional fields are added per schema type.
Adds the new page to the sitemap so search engines discover and crawl it immediately after deployment.
For Next.js, it adds an entry to app/sitemap.ts with an appropriate changeFrequency and priority. For static sites, it looks for sitemap.xml and adds a <url> entry.
Adds a reference to the new page in the site's llm.txt file — the plain-text index that helps AI systems understand what your site contains.
If no llm.txt exists in the project, the step is skipped and flagged. When it does exist, the new page is added under the appropriate section with its URL and a one-line description.
Injects a <script type="text/markdown"> block into the page containing a clean markdown summary of the page content.
This gives AI crawlers and LLMs a structured, readable version of the page alongside the HTML. Includes the page title, purpose, key sections, and important links.
Confirms the Vercel Analytics tracking script is present on the page so visitor data is captured from day one.
For Next.js, it checks whether layout.tsx already includes the <Analytics /> component (which covers all pages automatically). For static HTML, it checks for the /_vercel/insights/script.js script tag in the <head>.
Reads the page's CSS or Tailwind classes and flags common mobile issues before they reach production.
Checks that multi-column grids collapse on small screens, that no widths or heights are hardcoded in ways that overflow, and that Chart.js canvases use maintainAspectRatio: false with a sized container.
Starts the dev server, opens the page, and programmatically verifies that every requirement from the previous steps is actually present in the rendered HTML.
Uses curl to check for the canonical tag, schema block, analytics script, and markdown embed. Reports what passed and flags anything missing before you push.
Setup
Customisation
The file is plain Markdown — open it in any editor and change the instructions. Claude follows whatever you write.
In step 08, replace the Vercel Analytics check with your analytics provider's script (Google Analytics, Plausible, Fathom, etc.). Update the curl check in step 10 to match.
The skill handles static HTML natively. Steps 02–05 and 08 all have a Static HTML path. If you're using another framework (Astro, SvelteKit, etc.), update the metadata and sitemap instructions in steps 02–05 to match your framework's conventions.
Step 05 assumes app/sitemap.ts for Next.js. If you manage your sitemap differently (a plugin, a build script, a static XML file), update that step to point Claude at the right file.
Step 06 skips gracefully if llm.txt doesn't exist. To create one from scratch, see llms.txt — a community standard for AI-readable site descriptions.
Add them anywhere in the Steps section before the Summary Report (step 11). Follow the same heading format (### N. Step name) and include the same level of detail. Claude will execute them in order.
Free. One file. Drop it in your commands folder and it works immediately.