optimise-seo
Optimises SEO and technical foundations for Next.js App Router apps including sitemaps, meta tags, structured data, canonical URLs, redirects, indexing policy, hreflang/internationalisation, Core Web Vitals, security headers, privacy/consent, and error-page resilience. Use when asked to improve SEO, add sitemap.xml, fix meta tags, add structured data, set canonical URLs, set up redirects, fix soft 404s, add hreflang, add security headers (CSP/HSTS), add cookie consent or a privacy policy, fix error pages, improve Core Web Vitals, audit SEO, or build SEO pages at scale. Performs no visual redesigns.
What this skill does
# Optimise SEO
No visual redesigns or layout changes. Allowed: metadata, structured data, semantic HTML, internal links, alt text, sitemap/robots, redirects, indexing policy, hreflang/i18n, security and privacy headers, error-page status codes, performance tuning.
## Workflow
Copy and track this checklist:
```text
SEO progress:
- [ ] Step 1: Inventory routes and index intent
- [ ] Step 2: Fix crawl/index foundations
- [ ] Step 3: Implement metadata + structured data
- [ ] Step 4: Improve semantics, links, and CWV
- [ ] Step 5: Validate with seo-checklist.md and document changes
```
1. Inventory routes and index intent
2. Fix crawl/index foundations
3. Implement metadata + structured data
4. Improve semantics, links, and CWV
5. Validate with [seo-checklist.md](seo-checklist.md) and document changes
## Must-have
- Sitemap (`app/sitemap.ts`) and robots (`app/robots.ts`):
```ts
// app/sitemap.ts
import type { MetadataRoute } from "next";
export default function sitemap(): MetadataRoute.Sitemap {
return [{ url: "https://example.com", lastModified: new Date() }];
}
```
- Canonicals consistent on every page
- Unique titles + descriptions via `metadata` or `generateMetadata`
- OpenGraph + Twitter Card tags
- JSON-LD: Organization, WebSite, BreadcrumbList (+ Article/Product/FAQ as needed):
```tsx
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify({
"@context": "https://schema.org", "@type": "Organization",
name: "Example", url: "https://example.com"
}) }} />
```
- One h1 and logical heading hierarchy
- Alt text, internal links, CWV targets, mobile/desktop parity
## Programmatic SEO (pages at scale)
- Validate demand for a repeatable pattern before generating pages
- Require unique value per page and defensible data
- Clean subfolder URLs, hubs/spokes, and breadcrumbs
- Index only strong pages; monitor indexation and cannibalization
## SEO audit (triage order)
1. Crawl/index: robots, sitemap, noindex, canonicals, redirects, soft 404s
2. Technical: HTTPS, CWV, mobile parity
3. On-page/content: titles/H1, internal links, remove or noindex thin pages
## Redirects & indexing policy
- Permanent moves use 301/308; temporary use 302/307. Never chain redirects — point straight to the final URL.
- A "not found" page must return a real 404, not 200 with a friendly message (a soft 404 — search engines refuse to index these).
- Give every page an explicit indexing policy: public pages default to `index, follow`; mark staging, admin, thin, or private routes `noindex` (HTML `metadata.robots`) or `X-Robots-Tag` (non-HTML / whole environments).
## Internationalisation (multi-locale sites)
- One URL pattern for all locales; reciprocal `hreflang` with self-ref + `x-default`; translate metadata, not just body; no IP/`Accept-Language` auto-redirects.
- Details and `generateMetadata` pattern: [internationalisation.md](internationalisation.md).
## Technical hardening (security, privacy, resilience)
- Security headers (HSTS, CSP, `nosniff`, `frame-ancestors`, `Referrer-Policy`, `Permissions-Policy`), SRI, cookie flags, `security.txt`.
- Privacy: policy, opt-in cookie consent, Global Privacy Control, cookieless analytics, data minimisation.
- Resilience: correct 404/500 status codes, 503 + `Retry-After`, web app manifest, external monitoring.
- Full guidance: [technical-hardening.md](technical-hardening.md).
## Gotchas
- Don't over-generate thin or doorway pages — indexation drops and quality signals suffer.
- Don't omit canonicals or let them conflict across variants (trailing slash, www, uppercase) — search engines split ranking signal.
- Don't block crawlers unintentionally via `robots.txt`, `noindex`, or auth walls on routes meant to be indexed.
- Don't rely on JS-only rendering without SSR/SSG for indexable content.
- Don't change URLs without 301 redirects — link equity and crawl budget are lost.
- Don't add JSON-LD that doesn't match visible page content — Google treats this as spam and may demote the page.
- Don't return 200 for "not found" or error pages — soft 404s are a quality problem and won't index.
- Don't ship `hreflang` that isn't reciprocal across every alternate — search engines ignore non-mutual sets.
- Don't take a maintenance window down with a 200 or 404 — return 503 + `Retry-After` so the site isn't deindexed.
- Don't add `Strict-Transport-Security` with `preload`/`includeSubDomains` before every subdomain is HTTPS — it's effectively irreversible.
## Resources
- [nextjs-implementation.md](nextjs-implementation.md) — implementation patterns for steps 2-4
- [internationalisation.md](internationalisation.md) — hreflang, URL strategy, localised metadata
- [technical-hardening.md](technical-hardening.md) — security headers, privacy/consent, resilience
- [seo-checklist.md](seo-checklist.md) — pass/fail validation during step 5
## Validation
- Check HTTP response headers for correct status codes and redirects
- Confirm `robots.txt` has correct crawl directives
- Confirm `sitemap.xml` lists all indexed routes with valid URLs
- Verify pages include canonical, OpenGraph, and Twitter Card tags in source HTML
- Run a Lighthouse audit and confirm performance scores meet targets
- Validate JSON-LD with Rich Results Test per URL
- Report remaining blockers with exact URLs and owner/action
Related in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".