Complete SEO Setup for TanStack Router/Start

VerifiedSafe

Full SEO implementation for TanStack Router/Start: dynamic OG images, structured data, sitemaps, robots.txt, and AI discoverability.

Sby Skills Guide Bot
DevelopmentIntermediate
7/23/2026
Claude CodeCursorWindsurfCopilotCodex
#seo#tanstack-router#structured-data#og-images#meta-tags

Recommended for

Automated summary

Sets up a complete SEO stack for TanStack Router / TanStack Start projects, from OG image generation to dynamic sitemaps and JSON-LD structured data.

Strengths

  • Covers nine distinct SEO layers: meta tags, canonical URLs, Open Graph, Twitter Cards, JSON-LD, sitemap, robots.txt, llms.txt and web manifest
  • Provides a concrete file architecture with reusable centralized helpers (generateMetaTags, generateHead, six JSON-LD generators)
  • Includes on-demand Open Graph image generation through Satori + Resvg behind a dedicated server route
  • Also addresses AI crawler discoverability via llms.txt and llms-full.txt

Limitations

  • Tightly coupled to TanStack Router / TanStack Start; not directly portable to Next.js, Remix or Astro
  • Introduces two server-side dependencies (satori, @resvg/resvg-js) whose Google Fonts loading can be finicky in production
  • Relies on external reference files (references/*.md) that are not included in the SKILL.md itself
When to use it

Use it when starting a TanStack Router project or when adding sitemaps, structured data, dynamic OG images or social meta tags to an existing site.

When not to use it

Avoid it if the project is not built on TanStack Router/Start, or if you only want content-level SEO advice without code implementation.

Security analysis

Safe
Quality score88/100

The skill provides instructional content for implementing SEO in TanStack applications. It includes code snippets and setup steps but no destructive or exfiltrating commands. The only shell command is `bun add` for installing libraries, which is standard and safe. No risky actions like curl|sh, rm, or sending tokens are present.

No concerns found

How this analysis is made

Examples

Full SEO setup for a new TanStack Start app
Set up complete SEO for my new TanStack Start app: brand config, seo.ts helpers, per-route head() functions with canonical URLs, and the root layout head with default Open Graph tags.
Dynamic OG images
Add dynamic Open Graph image generation to my TanStack Router project using Satori and Resvg, exposed at /og.png?title=...&description=..., and wire it into my route meta tags.
Sitemap and AI crawler files
Create a dynamic /sitemap.xml route, a robots.txt pointing to it, and llms.txt plus llms-full.txt files for AI crawlers in my TanStack Start project.

name: tanstack-seo description: "Complete SEO setup for TanStack Router / TanStack Start projects. Covers: dynamic OG image generation with Satori + Resvg, centralized SEO config and meta tag helpers, structured data (JSON-LD) for Organization/WebSite/Article/FAQ/Breadcrumb/Software schemas, dynamic XML sitemap, robots.txt, llms.txt for AI crawlers, per-route head functions with canonical URLs, Twitter Cards, Open Graph tags, web manifest, and favicon configuration. Use when setting up SEO for a new TanStack project, adding OG image generation, creating sitemaps, adding structured data, implementing meta tags, or optimizing a TanStack site for search engines and social sharing."

TanStack SEO

Complete SEO implementation for TanStack Router / TanStack Start projects. Nine layers covering crawlability, social sharing, structured data, and AI discoverability.

Dependencies

# OG image generation (server-side only)
bun add satori @resvg/resvg-js

No other SEO-specific dependencies. Everything uses TanStack Router's built-in head() API and server route handlers.

Architecture

src/
├── lib/
│   ├── seo.ts              # Centralized config, meta helpers, JSON-LD generators
│   ├── og-image.tsx         # Satori + Resvg OG image generator (JSX → SVG → PNG)
│   └── brand/index.ts       # Brand constants (name, description, social, keywords)
├── routes/
│   ├── __root.tsx           # Base HTML: charset, viewport, favicons, default OG, site-wide JSON-LD
│   ├── og[.]png.ts          # Server handler: GET /og.png?title=...&description=...
│   ├── sitemap[.]xml.ts     # Dynamic XML sitemap
│   ├── llms[.]txt.ts        # Concise site summary for AI crawlers
│   ├── llms-full[.]txt.ts   # Full content dump for AI crawlers
│   └── (every route)        # Per-route head() with title, description, canonical, OG, JSON-LD
└── public/
    ├── robots.txt           # Crawl rules + sitemap reference
    ├── site.webmanifest     # PWA manifest
    ├── favicon.svg/.png/.ico
    └── apple-touch-icon.png

Setup Workflow

1. Create Brand Config

Create src/lib/brand/index.ts:

export const brand = {
  name: "Your App",
  shortName: "App",
  description: "Your app description for SEO.",
  author: { name: "Your Name", url: "https://yoursite.com" },
  social: { twitter: "@yourhandle", github: "https://github.com/you/repo" },
  keywords: ["keyword1", "keyword2", "keyword3"],
} as const;

2. Create SEO Utility

See references/seo-utilities.md for the complete src/lib/seo.ts. Provides:

  • siteConfig — centralized site metadata
  • getAbsoluteUrl() / getCanonicalUrl() — URL helpers
  • getOGImageUrl(title, description?) — builds dynamic OG image URLs
  • generateMetaTags(seo) — OG + Twitter + robots + keywords meta array
  • generateHead(seo) — meta + canonical link tags (used in every route)
  • Six JSON-LD generators: Organization, WebSite, Article, Breadcrumb, FAQ, Software

3. Create OG Image Generator

See references/og-image.md for:

  • src/lib/og-image.tsx — Satori + Resvg engine with Google Fonts
  • src/routes/og[.]png.ts — server route handler

4. Create Server Routes + Static Files

See references/server-routes.md for:

  • Dynamic sitemap at /sitemap.xml
  • robots.txt (static in public/)
  • llms.txt and llms-full.txt for AI crawlers
  • site.webmanifest for PWA

5. Wire Up Root Layout + Per-Route Heads

See references/route-patterns.md for:

  • __root.tsx head: charset, viewport, favicons, manifest, default OG/Twitter, site-wide JSON-LD
  • Three per-route patterns: static pages, pages with custom OG, dynamic pages (blog/docs)

Key Conventions

  • Filename escaping: [.] escapes dots. og[.]png.ts → /og.png, sitemap[.]xml.ts → /sitemap.xml.
  • Title suffixing: generateMetaTags() auto-appends | Site Name to titles that don't already include it.
  • Cache headers: OG images 24h, sitemaps 1h, llms.txt 24h.
  • Server handlers: Non-HTML routes (PNG, XML, plaintext) use server.handlers.GET with no React component.
  • <html lang="en">: Set in the root layout.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/complete-seo-setup-for-tanstack-router-start-mrx3xwje/download' --output '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje/SKILL.md.part' && mv '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje/SKILL.md.part' '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Original excerpt: Dependencies
# OG image generation (server-side only)
bun add satori @resvg/resvg-js

No other SEO-specific dependencies. Everything uses TanStack Router's built-in head() API and server route handlers.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje/SKILL.md' && test -s '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/tanstack-seo' && cp -R '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje' '.claude/skills/tanstack-seo'

Cursor
test -f '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje/SKILL.md' && test -s '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/tanstack-seo' && cp -R '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje' '.cursor/skills/tanstack-seo'

Codex
test -f '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje/SKILL.md' && test -s '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/tanstack-seo' && cp -R '.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje' '.agents/skills/tanstack-seo'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje'

openskills read 'complete-seo-setup-for-tanstack-router-start-mrx3xwje'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/complete-seo-setup-for-tanstack-router-start-mrx3xwje/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills