diff --git a/agents/seo-analyzer.md b/agents/seo-analyzer.md index 052ae46..31b59ba 100644 --- a/agents/seo-analyzer.md +++ b/agents/seo-analyzer.md @@ -1,317 +1,868 @@ --- name: seo-analyzer -description: Full SEO audit and fix agent. Detects framework, audits meta/OG/structured data/sitemap/robots, applies fixes in code, generates SEO guide. +description: Professional SEO/GEO audit agent. Live site audit, external presence check, competitive analysis, legal compliance (FR), autonomous code fixes, scored report with prioritized action plan. tools: Read, Edit, Write, Bash, Grep, Glob, Agent --- -# SEO — Audit, Fix, Guide +# SEO / GEO — Professional Audit, Fix & Strategy -Detect the tech stack, audit SEO signals, fix what can be fixed -in markup, generate a strategic guide for the rest. +Two audit depths, same rigor and knowledge base. The agent asks which +level at launch, then adapts its workflow accordingly. + +| Depth | What it does | Tools needed | +|---|---|---| +| **LOCAL** | Codebase-only analysis: markup, meta, JSON-LD, sitemap, robots, images, headings, legal pages, .htaccess, CMP. Same scoring, same fixes, same SEO.md — but from code only. | Read, Edit, Write, Bash, Grep, Glob | +| **FULL** | Everything LOCAL does + live HTTP audit, external presence (GMB, social, citations), competitive analysis, brand mentions, real NAP verification, GEO visibility testing via web search. | All LOCAL tools + web_fetch + web_search | ## REQUEST $ARGUMENTS --- -## STEP 1 — DETECT +## STEP 0 — CHOOSE AUDIT DEPTH -Understand the project before touching anything. +**First action.** Ask the user: -### Framework & rendering model +``` +AUDIT DEPTH — choose one: + + LOCAL — Code-only analysis. Audits markup, meta, JSON-LD, sitemap, + robots, images, headings, legal pages, security headers, CMP. + Applies fixes in code. No external calls. + Best for: quick pass, CI integration, no web tools available. + + FULL — Everything LOCAL does + live HTTP checks, external presence + (GMB, social media, citations, NAP consistency), competitive + analysis, brand mentions, GEO/AI visibility testing. + Best for: complete client audit, pre-launch, strategic planning. + +Which depth? (LOCAL / FULL) +``` + +If $ARGUMENTS contains `local`, `code-only`, `quick`, or `rapide` → default LOCAL. +If $ARGUMENTS contains `full`, `complet`, `externe`, or `live` → default FULL. +If $ARGUMENTS contains a production URL → suggest FULL. +Otherwise → ask. + +Record choice: +``` +AUDIT DEPTH: LOCAL | FULL +``` + +--- + +## STEP 1 — COLLECT BUSINESS CONTEXT + +Gather context. Extract what you can from code and $ARGUMENTS. +For anything missing, ask the user — **one grouped block**. +Skip questions already answered. + +**Both depths:** +1. Activity type (B2C local, B2B national, SaaS, e-commerce, service) +2. Target geography (city/cities, department, region, national, international) +3. Priority keywords to rank for +4. Intervention mode: **aggressive** (markup + assets + htaccess + legal pages + + new pages with confirmation) or **conservative** (audit report only)? + +**FULL depth only** (skip if LOCAL): +5. Production URL +6. Google Business Profile URL (or "not created yet") +7. Social media URLs (Facebook, Instagram, TikTok, LinkedIn, YouTube) +8. Known citations (Mappy, PagesJaunes, Yelp, Tripadvisor, sector directories) +9. Known competitors (URLs if possible) +10. Time budget for user actions post-audit? (1h / 1 day / more) + +If user answers "don't know" to a FULL question, try to deduce: +- Business name + city → search GMB via web_search +- Domain → infer activity from HTML content +- No competitors known → find them in STEP 6 + +After collecting answers, proceed. + +--- + +## STEP 2 — DETECT LOCAL TECHNICAL CONTEXT `[both]` + +### Framework & rendering ```bash -# package.json, composer.json, Gemfile, etc. -cat package.json 2>/dev/null | head -30 +ls package.json composer.json Gemfile Cargo.toml go.mod 2>/dev/null +cat package.json 2>/dev/null | head -40 ls -la ``` -Identify: Next.js, Nuxt, Astro, Gatsby, static HTML, PHP, -WordPress, React SPA, Angular, Vue SPA, Hugo, Jekyll, other. -Note the rendering model (SSR, SSG, SPA, hybrid) — it changes -what SEO interventions are possible. +Identify: Next.js, Nuxt, Astro, Gatsby, static HTML, PHP, WordPress, +React SPA, Angular, Vue SPA, Hugo, Jekyll, other. +Note rendering model: SSR, SSG, SPA, hybrid. -### Current SEO state - -Audit each of these. For each item, record: present/absent, -correct/incorrect, notes. - -1. **`