🏄 SEO Testing in Windsurf IDE
Enable AI-powered SEO validation in Windsurf's Cascade agent.
Windsurf’s Cascade AI agent can follow custom instructions and make API calls. Add SEODiff evaluation to your Windsurf workflow to catch SEO issues as you code.
System Prompt / Configuration
Copy this prompt and paste it into your IDE’s AI configuration:
# SEO Evaluation Rule for Windsurf # Add to Windsurf Rules / .windsurfrules When creating or editing web pages, validate SEO using the SEODiff API: Endpoint: POST https://seodiff.io/api/v1/agent/evaluate Auth: Authorization: Bearer $SEODIFF_API_KEY Default assertions to check: - has_h1 (every page needs a clear H1) - has_schema (JSON-LD structured data) - no_placeholders (no template variable leaks) - min_word_count: 300 (no thin content) - max_js_ghost_ratio: 0.1 (content must be server-rendered) After evaluation, report: - Pass rate and ACRI score - Any failing assertions with remediation steps - Fix issues before completing the task
Setup
# Add to your Windsurf environment variables or .windsurfrules: SEODIFF_API_KEY=your_api_key_here
Example Interaction
User: "Build a product comparison page for our SaaS tiers." Windsurf Cascade: 1. Creates comparison table with pricing, features 2. Calls SEODiff evaluate: has_h1 ✓, has_schema ✗, no_placeholders ✓ 3. Adds Product + Offer schema for each tier 4. Re-evaluates: All pass, ACRI: 74 5. "Built comparison page with Product schema. ACRI score: 74."
Assertion Rules to Use
The best assertion rules for AI agent workflows:
has_h1
Ensure every page has exactly one H1 heading tag.
has_schema
Ensure every page has valid JSON-LD schema markup for rich results.
no_placeholders
Find template variables like {{city}} or [TBD] that leaked into production HTML.
max_token_bloat
Detect when boilerplate overwhelms useful content for LLM crawlers.
max_js_ghost_ratio
Flag pages where content is rendered client-side and invisible to crawlers.
min_word_count
Prevent thin content by requiring a minimum number of words per page.