DEV Community

Cover image for How I Built an SEO Skill for AI IDEs Because My Cursor Kept Getting It Wrong
Aryan Panwar
Aryan Panwar

Posted on

How I Built an SEO Skill for AI IDEs Because My Cursor Kept Getting It Wrong

My AI IDE told me to optimize for FID last month.

FID (First Input Delay) was deprecated by Google in March 2024. It hasn't been a ranking factor for almost two years.

That one moment made me spend the next few weeks building something I didn't plan to build.


A bit of context

I'm a final year ECE student. I build AI products on the side — right now I'm working on FitWardrobe (a privacy-first AI stylist app) and Mithivoices (an open-source TTS/STT platform). I use Cursor and Windsurf as my main IDEs every day.

I'm not an SEO expert. But when you're building products and trying to get them found, you learn SEO fast out of necessity.


The actual problem

Every time you start a new chat in an AI IDE, it starts from zero.

No memory of previous sessions. No knowledge of what changed in the last Google core update. No awareness that GEO (Generative Engine Optimization) is now a real thing that affects whether your content shows up in ChatGPT or Perplexity responses.

Here's a real example. I asked Windsurf to generate BlogPosting schema for my landing page and got this:

{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "My Article Title",
  "author": {
    "@type": "Person",
    "name": "Author Name"
  },
  "datePublished": "2026-01-15"
}
Enter fullscreen mode Exit fullscreen mode

Looks fine. Passes schema validation. But it's missing dateModified, which Google requires. The image fields are wrong — Google needs images in 1:1, 4:3, and 16:9 ratios for full rich result eligibility. There's no @id for entity disambiguation.

The schema is technically valid but practically useless for ranking. I only found this out by reading the actual Google Search Central docs, not a blog post summarizing them.

The docs. The source. The thing nobody reads.


What I tried first (that didn't work)

My first fix was simple: paste the relevant documentation into the chat before every SEO question.

That lasted about three sessions.

Google's SEO documentation is 200+ pages. Nobody is copying that into a chat window every time. It's not sustainable.

My second attempt was a short cheat sheet saved as a .txt file. Better — but the AI treated it like reference material to occasionally glance at, not as rules it should actually follow. The output quality was inconsistent.

Then I found out about cursor rules and windsurf rules. IDE-specific files where you put instructions the AI always follows, not just sometimes.

That was the actual insight.


What I built

I spent a few weeks turning official Google Search Central and Bing Webmaster documentation into a structured skill file the AI uses as active rules.

The install is one command:

npx seo-geo-optimizer
Enter fullscreen mode Exit fullscreen mode

It auto-detects your IDE and drops the file in the right place:

  • Cursor.cursor/rules/seo-geo-optimizer.mdc
  • Windsurf.windsurf/rules/seo-geo-optimizer.md
  • GitHub Copilot.github/copilot-instructions.md
  • Replit.replit/ai/seo-geo-optimizer.md
  • Bolt.bolt/prompt

Here's the actual IDE detection logic from bin/install.js:

function detectIDE() {
  const markers = {
    cursor:   ['.cursor', path.join(os.homedir(), '.cursor')],
    windsurf: ['.windsurf', path.join(os.homedir(), '.windsurf')],
    copilot:  ['.github'],
    replit:   ['.replit'],
    bolt:     ['.bolt'],
  };

  for (const [ide, paths] of Object.entries(markers)) {
    if (paths.some(p => fs.existsSync(p))) return ide;
  }
  return 'generic';
}
Enter fullscreen mode Exit fullscreen mode

Once installed, activate it with one trigger phrase in your AI chat:

"Read and activate the SEO & GEO Optimizer skill, then start the process."

The AI runs a 40-question intake audit, identifies your site type, checks competitor gaps, and builds a structured execution plan — all using current, sourced SEO knowledge.


What the skill actually covers

The file is around 1,400 lines sourced entirely from official documentation:

  • Correct Core Web Vitals metrics for 2025 (LCP, INP, CLS — not the deprecated FID)
  • 14 schema types with complete JSON-LD templates
  • BlogPosting and Article schema with all required fields including image ratios and dateModified
  • E-E-A-T implementation — author page requirements, Person schema
  • Featured snippet patterns — paragraph, list, and table formats
  • Content clusters and pillar pages with internal linking rules
  • GEO for AI search — how to structure content so ChatGPT and Perplexity actually cite you
  • Google vs Bing differences — because they crawl differently and most guides ignore this

Every single rule has a source URL in the references index. If I couldn't find an official source for a claim, I didn't include it.


What surprised me while building this

The sourcing was harder than the writing.

I assumed I could summarize good SEO blogs. But every time I tried, I'd find a claim that wasn't in the official docs — sometimes outdated, sometimes just wrong.

The constraint of "official sources only" made the file smaller but significantly more useful. It forced me to cut a lot of popular advice that turns out to be myth or outdated.

The second surprise: being explicit about Google vs Bing differences matters more than I expected. Most SEO tools treat them as identical. They're not. They crawl JavaScript differently, weight E-E-A-T differently, and Bing has IndexNow while Google still relies on sitemaps.


Try it if you use an AI IDE

It's open source, MIT license, free.

# Auto-detect your IDE
npx seo-geo-optimizer

# Or specify directly
npx seo-geo-optimizer --cursor
npx seo-geo-optimizer --windsurf
npx seo-geo-optimizer --copilot
Enter fullscreen mode Exit fullscreen mode

Star the repo if it's useful — github.com/Aryanpanwar10005/seo-geo-optimizer

Launching on Product Hunt on March 10 if you want to follow along.


What SEO mistakes have you caught your AI IDE making? I'd genuinely like to know — it'll probably end up in the next version of the skill file.

Top comments (1)

Collapse
 
aryanpanwar1 profile image
Aryan Panwar

Just wanted to add some context I didn't fit into the article —
The biggest thing I kept running into while building this was that most SEO tools are built for marketers, not developers. You're either paying $100+/month for a SaaS dashboard or copying generic advice from a blog post.
This skill file is my attempt to fix that — everything is transparent, every recommendation links to the official Google or Bing source, and the AI never makes a change without your explicit approval.
Currently working on adding MCP support so the AI can actually crawl your URL and pull real CWV scores instead of relying on you to paste the data in manually. That'll close the biggest gap between this and paid tools.
Would love to hear what IDE you're using it with — drop it below 👇