skills/optimise-seo/SKILL.md
Optimises SEO and technical foundations for Next.js App Router apps, covering sitemaps, robots, meta tags, structured data, canonical URLs, redirects, indexing policy, hreflang and internationalisation, Core Web Vitals, programmatic SEO, security headers, privacy/consent, and error-page resilience. Use when asked to "improve SEO", "add a sitemap", "fix meta tags", "add structured data", "set canonical URLs", "set up redirects", "fix soft 404s", "add hreflang", "add security headers", "add cookie consent", "improve Core Web Vitals", "audit SEO", or "build SEO pages at scale". Performs no visual redesigns; for visual direction use ui-design, for page-level UI quality use ui-audit, for writing the article itself use blog-post. Does not cover llms.txt or AI-agent readability; research current specs for that work.
npx skillsauth add mblode/agent-skills optimise-seoInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ui-design), or page-level UI quality review (use ui-audit). Making a site readable by AI agents (llms.txt, MCP discovery, WebMCP) is out of scope; research current specs rather than relying on static SEO guidance.Allowed surface: metadata, structured data, semantic HTML, internal links, alt text, app/sitemap.ts, app/robots.ts, next.config.ts redirects and headers, error pages, performance tuning. Never touch component styling or layout.
Copy and track this checklist:
SEO progress:
- [ ] Step 1: Inventory routes and decide index intent per route
- [ ] Step 2: Fix crawl/index foundations (sitemap, robots, canonicals, redirects, status codes)
- [ ] Step 3: Implement metadata + structured data
- [ ] Step 4: Improve semantics, internal links, and Core Web Vitals
- [ ] Step 5: Validate with references/seo-checklist.md and report evidence
Before writing code for steps 2-4, read references/nextjs-implementation.md: App Router patterns (Metadata API, generateMetadata, sitemap index, JSON-LD component, OG image generation, headers()/redirects() config).
app/sitemap.ts lists all public URLs; app/robots.ts links to itmetadata or generateMetadata@graph with a stable @id and reference it by @id instead of duplicating it inline (@id conventions and the per-type code: references/nextjs-implementation.md)noindex the long tail and monitor indexation and cannibalisation in Search Consolenoindex a thin page and omit it from the sitemap until it carries unique content, then add an internal link and index itnoindex, canonicals, redirect chains, soft 404snoindex thin pagesnoindex and drop from the sitemapindex, follow; staging, admin, thin, or private routes get metadata.robots noindex (HTML) or X-Robots-Tag (non-HTML, whole environments).One URL pattern for all locales; reciprocal hreflang with self-reference plus x-default; translate metadata, not just body; never auto-redirect by IP or Accept-Language. Full rules and the generateMetadata pattern: references/internationalisation.md.
Security headers (HSTS, CSP, nosniff, frame-ancestors, Referrer-Policy, Permissions-Policy), SRI, cookie flags, security.txt, privacy policy and opt-in consent, correct 404/500/503 behaviour, web app manifest. Read references/technical-hardening.md for header, cookie, consent, or error-page tasks.
robots.txt, noindex, or auth walls on routes meant to rank; check before shipping, not after traffic drops."use client" plus a fetch in useEffect): the crawler indexes the empty shell, so the page ranks for nothing. Server Components already render on the server, so this is a regression you introduce, not a default to fix.hreflang that isn't reciprocal across every alternate; search engines ignore non-mutual sets.Retry-After so the site isn't deindexed.Strict-Transport-Security with preload/includeSubDomains before every subdomain is HTTPS; it's effectively irreversible.Person as publisher on articles: rich results expect an Organization publisher with a logo. Keep Person as author.references/nextjs-implementation.md).lastModified: it goes stale and signals dead content. Derive it from the most recent content date.ui-design: visual direction, palettes, typography, landing-page CROui-audit: page-level UI quality and rendered i18n behavior (locale formatting, plurals, RTL); optimise-seo owns hreflang and localized metadatamulti-tenant-architecture: per-tenant routing and custom domains. It owns the constraint that robots.txt, sitemap.xml, and llms.txt vary by tenant and never come from /public; this skill owns their content once routing works.Copy references/seo-checklist.md, mark every item pass/fail, then attach command evidence:
| Check | Command/source | Expected result |
|---|---|---|
| Production build | npm run build or repo equivalent | exits 0 |
| Response headers | curl -sI <url> | correct status, redirects, canonical host |
| Served HTML metadata | curl -s <url> \| rg "canonical\|og:\|twitter:\|application/ld\+json" | tags present in source |
| Robots | curl -s <origin>/robots.txt | expected allow/disallow and sitemap |
| Sitemap | curl -s <origin>/sitemap.xml | indexed routes, absolute URLs, fresh lastmod when used |
| Lighthouse | npx lighthouse <url> --only-categories=seo,performance --output=json --output-path=.lighthouse-seo.json | SEO and Performance >= 90, or blockers listed |
| JSON-LD | Google Rich Results Test URL/result | valid or documented unsupported schema |
| Search Console after deploy | Pages/Coverage and enhancement reports | no new warnings; indexed/excluded changes explained |
Report remaining blockers with exact URLs and owner/action.
development
Fans out four concurrent review agents over the current diff, then APPLIES fixes directly to the working tree and verifies the build. Mutates code; it does not produce a report. Covers reuse (duplicate logic, hand-rolled stdlib, reinvented platform features), quality (hacky patterns, React/TypeScript hygiene, over-memoisation, exhaustive-deps, `any`, dead code, `CLAUDE.md`/`AGENTS.md` violations), efficiency (unnecessary work, missed concurrency, hot-path bloat), and test discipline (bug fixes without a repro test, useless tests to delete, missing tests only when they prevent a named failure). Use when the user says "tidy this up", "simplify", "clean up this diff", "polish my changes", "check for duplication", or "any reuse opportunities?", i.e. when the intent is to have the changes made automatically. For a read-only report that lists findings without touching files, use `pr-reviewer` instead. This skill edits code; for the PR's title, description, or commit history, use `pr-creator`.
development
Decides what an interface should do before UI is built or audited: interaction choice, action scope and consequence, reachable states, resilience, and accessibility as task completion. Works from a brief, spec, mockup, intent, or existing UI. Use when asked "is this the right interaction", "design the flow", "what control should this use", "what should this action affect", "which states should this have", "make this resilient", or "what breaks here". For building or styling use ui-design; for built-code audits use ui-audit; for copy wording use copywriting.
development
Builds and stress-tests implementation plans in two modes. Create mode scans code and docs, asks one question at a time with a recommended answer, runs a blindspot pass when the user is new to the area, then writes a plan file. Review mode scores completeness, feasibility, scope, testability, risk, and assumptions, verifies checkable claims, and writes resolutions back until every dimension reaches 5/5. Use when asked to "create a plan", "plan this feature", "I want to build X", "grill me", "think this through", "blindspot pass", "unknown unknowns", "this is new to me", "review my plan", "rubber duck this", "stress test this plan", "is this plan ready", "get this plan to 5/5", "what am I missing", "verify this claim", "prove this plan", "fact-check this plan", or when the user explicitly wants a plan artifact before implementation. For code review use pr-reviewer; for architecture briefs use define-architecture.
tools
Audits the smallest relevant developer-facing surface of a library, CLI, SDK, or npm package across API contracts, errors, CLI behavior, public types, onboarding, and config. Uses candidate-first rule loading, bounded local evidence, and compact root-cause findings. Use when asked to "audit my CLI", "make this CLI agent-friendly", "is this API ergonomic", "review the developer experience", "improve these errors", "simplify first run", or "review my SDK". For end-user UI use ui-audit, for agentic-app trust use ax-audit, for docs prose use docs-writing, for README work use readme-creator, and for repo architecture use define-architecture. Inside a product that also ships a UI, this is the skill for the developer-facing half, so pick it when the complaint is about an import, command, error string, exported type, or config rather than a screen.