seo-checklist
SEO first principles for PolicyEngine web applications - meta tags, crawlability, performance, and dual-mode (standalone + iframe) considerations
What this skill does
# SEO First Principles for PolicyEngine Web Apps
Use this skill when auditing or building web applications that need to be discoverable via search engines. PolicyEngine apps are typically React SPAs deployed to GitHub Pages, often served both standalone and embedded as iframes in policyengine.org research pages.
---
## How Search Engines Work
Google does three things:
1. **Crawl** — Googlebot fetches your URL and downloads the raw HTML response
2. **Index** — It reads that HTML, understands what the page is about, stores it
3. **Rank** — When someone searches, it picks the best matching pages from its index
Your job is to make all three steps easy. If any step fails, your page won't appear in search results.
---
## Principle 1: Google Reads HTML, Not Your Screen
**The most critical issue for React SPAs.** When Googlebot visits a client-side rendered app, it sees:
```html
<div id="root"></div>
```
All content generated by JavaScript may or may not be indexed. Google can execute JS but:
- Pages enter a "render queue" (delays of hours to days)
- JS errors = no content indexed
- Google deprioritizes JS-rendered content vs static HTML
**Test:** Run `curl -s YOUR_URL | grep -c '<h1>'` — if the result is 0, Google likely can't see your content.
**Solutions (ranked by effectiveness):**
| Approach | Description | Effort |
|----------|------------|--------|
| SSR (Next.js, Remix) | Server renders full HTML on each request | High (framework change) |
| SSG (Static Site Generation) | Pre-build HTML at deploy time | Medium |
| Pre-rendering | Render SPA to static HTML for crawlers | Low-Medium |
| Meta tags only | At minimum, add static meta tags to index.html | Low |
For PolicyEngine calculator apps, **pre-rendering or SSG** is the sweet spot. The form/landing page is static content; only results are dynamic.
---
## Principle 2: One URL = One Page = One Topic
Google ranks **pages**, not websites. Each URL you want to rank for needs:
- Its own distinct URL path
- Unique title and description
- Content relevant to that specific topic
### Hash Routing is Invisible to SEO
```
https://example.com/#country=us®ion=CA&head=45000
```
Google treats everything after `#` as the same page. All hash variations = one URL = one indexed page.
### Path-Based URLs Are Crawlable
```
https://example.com/us/california?head=45000
```
Query parameters (`?key=value`) ARE seen by Google (though they may be treated as variants). Path segments (`/us/california`) are treated as distinct pages.
---
## Principle 3: The Standalone vs Iframe Dual-Mode Problem
PolicyEngine apps often run in two modes:
1. **Standalone** — Deployed on GitHub Pages (e.g., `policyengine.github.io/us-marriage-incentive/`)
2. **Embedded** — Iframed inside policyengine.org research pages (e.g., `policyengine.org/us/research/marriage`)
### SEO Implications
| Concern | Standalone | Embedded (iframe) |
|---------|-----------|-------------------|
| Indexed by Google? | Yes (if crawlable) | No — Google indexes the parent page, not iframe content |
| Needs meta tags? | Yes — this is the version Google sees | No — parent page provides meta tags |
| Needs canonical URL? | Yes — should point to itself OR the parent page | N/A |
| Needs robots.txt? | Yes | N/A (inherits from parent domain) |
| Needs sitemap? | Yes | N/A (parent sitemap covers parent pages) |
### Canonical URL Strategy
If the **primary audience** should find the app via policyengine.org:
```html
<link rel="canonical" href="https://policyengine.org/us/research/marriage">
```
This tells Google: "The real version of this content lives on policyengine.org. Index that one."
If the **standalone version** is the primary:
```html
<link rel="canonical" href="https://policyengine.github.io/us-marriage-incentive/">
```
**Rule:** Every page needs exactly one canonical URL. Without it, Google may index both versions and split your ranking power between them (called "duplicate content dilution").
### Detecting Iframe Mode in Code
Most PolicyEngine apps already detect this:
```javascript
const isEmbedded = window.self !== window.top;
```
SEO-relevant behavior should NOT depend on this check — meta tags, titles, and structured data must be present in the static HTML regardless of runtime mode.
---
## Principle 4: Required Meta Tags
Every PolicyEngine web app needs these in `index.html`:
### Critical (must have)
```html
<!-- Basic SEO -->
<title>US Marriage Tax Calculator — Marriage Penalty & Bonus | PolicyEngine</title>
<meta name="description" content="Calculate how marriage affects your taxes and government benefits. See your marriage penalty or bonus across income levels for any US state.">
<link rel="canonical" href="https://policyengine.github.io/us-marriage-incentive/">
<!-- Open Graph (Facebook, LinkedIn, Slack, iMessage previews) -->
<meta property="og:type" content="website">
<meta property="og:title" content="US Marriage Tax Calculator">
<meta property="og:description" content="Calculate how marriage affects your taxes and government benefits.">
<meta property="og:image" content="https://policyengine.github.io/us-marriage-incentive/og-image.png">
<meta property="og:url" content="https://policyengine.github.io/us-marriage-incentive/">
<meta property="og:site_name" content="PolicyEngine">
<!-- Twitter / X -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="US Marriage Tax Calculator">
<meta name="twitter:description" content="Calculate how marriage affects your taxes and government benefits.">
<meta name="twitter:image" content="https://policyengine.github.io/us-marriage-incentive/og-image.png">
```
### Important (should have)
```html
<!-- Structured Data (JSON-LD) -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "US Marriage Tax Calculator",
"description": "Calculate how marriage affects your taxes and government benefits.",
"url": "https://policyengine.github.io/us-marriage-incentive/",
"applicationCategory": "FinanceApplication",
"operatingSystem": "Web",
"offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" },
"author": {
"@type": "Organization",
"name": "PolicyEngine",
"url": "https://policyengine.org"
}
}
</script>
<!-- Theme color for mobile browsers — use --pe-color-primary-500 value -->
<meta name="theme-color" content="#319795">
```
### Title Tag Rules
- Under 60 characters (Google truncates after that)
- Primary keyword first: "US Marriage Tax Calculator" not "PolicyEngine — Calculator"
- Include the brand at the end: "... | PolicyEngine"
- Be specific: "Marriage Tax Calculator" not "Calculator"
- Every page needs a unique title
### Meta Description Rules
- 150-160 characters
- Include a call to action ("Calculate", "Find out", "Compare")
- Include primary keywords naturally
- Describe what the user gets, not what the app is
### OG Image Rules
- Dimensions: 1200 x 630 pixels
- Format: PNG or JPG
- Must be an absolute URL (not a relative path)
- Should visually represent the app (screenshot, branded graphic)
- Place in `public/` directory so it's available at build output root
---
## Principle 5: Crawlability Files
### robots.txt
Place in `public/robots.txt` (Vite copies `public/` contents to build root):
```
User-agent: *
Allow: /
Sitemap: https://YOUR_DOMAIN/sitemap.xml
```
### sitemap.xml
Place in `public/sitemap.xml`:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://YOUR_DOMAIN/</loc>
<lastmod>2025-01-01</lastmod>
<changefreq>monthly</changefreq>
</url>
</urlset>
```
For apps with multiple distinct pages, add each URL as a separate `<url>` entry.
### .nojekyll (GitHub Pages only)
**Always add an empty `.nojekyll` file to `public/`** when deploying to GitHub Pages. Without it, GitHub runs Jekyll processing which can mangle XML files like `sitemap.xRelated 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".