mcpField
S
seo-ready

seo-ready

github.com/tushaarmehtaa营销与增长1254 次安装2 周前更新
代码仓库

关于 seo-ready

seo-ready 是面向网站开发者的 SEO 与 AEO 审计和修复技能。它会识别项目框架、扫描页面信号,并在确认后修改文件、复查结果。

主要功能

  1. 01识别框架与页面路由
  2. 02检查 15 类 SEO/AEO 信号
  3. 03评分并生成审计报告
  4. 04按框架修复网站文件
  5. 05复查修改后的页面

适用场景

  1. 01检查网站的搜索与 AI 搜索就绪度
  2. 02定位缺失的元数据和结构化数据
  3. 03为页面补充站点地图与 robots 规则

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/tushaarmehtaa/tushar-skills --skill seo-ready

安装后在 Claude Code 中输入/seo-ready确认已加载。

详细介绍

全面的 SEO 和 AEO 审核:读取代码库、为每项信号评分,并应用修复。不只是生成报告,而是会修改文件。

阶段 1:检测技术栈

开始任何操作前,先识别框架和路由模式。

按以下顺序检查:

  1. next.config.* → Next.js(检查 package.json 中的版本 — v13+ 使用 App Router 和 generateMetadata,较旧版本使用 _document 和 next/head)
  2. astro.config.* → Astro(在布局中使用 frontmatter 和 <head>)
  3. nuxt.config.* → Nuxt(使用 useHead 或 useSeoMeta)
  4. svelte.config.* → SvelteKit(使用 <svelte:head>)
  5. 根目录中的 index.html → 静态 HTML / Vite SPA
  6. gatsby-config.* → Gatsby(使用 gatsby-plugin-react-helmet)

查找所有页面/路由:

  • Next.js App Router:app/**/page.tsx 或 page.jsx
  • Next.js Pages Router:pages/**/*.tsx
  • Astro:src/pages/**/*.astro
  • 静态站点:所有 .html 文件

告知用户:“发现 [framework] 项目,共有 [N] 个页面。正在运行完整的 SEO/AEO 审核。”

阶段 2:审核每项信号

检查所有页面中的以下项目。每项评分为 PASS / WARN / FAIL。

2.1 标题标签
  • 每个页面都必须有唯一的 <title> 或等效元数据
  • 长度:30-60 个字符(PASS),20-70 个字符(WARN),超出范围(FAIL)
  • 必须包含该页面的主要关键词/主题
  • 在 Next.js 中:检查 metadata.title 或 generateMetadata() 的返回值
  • 检查根布局中的标题模板(例如 %s | Brand Name)
2.2 Meta 描述
  • 每个页面都必须有 meta 描述
  • 长度:70-160 个字符(PASS),50-180 个字符(WARN),超出范围或缺失(FAIL)
  • 应包含直接答案或页面的核心承诺
  • 在 Next.js 中:检查 metadata.description
2.3 标题层级
  • 每个页面恰好有一个 <h1>(PASS),没有或有多个(FAIL)
  • 主要章节应使用 H2
  • 检查是否跳过层级(h1 → h3,中间没有 h2)
  • 对于 AEO:检查是否有 H2 以问题形式表述(how/what/why/when/who/which/can/does/should)
    • 2 个或更多疑问标题 = PASS,1 个 = WARN,0 个 = FAIL
    • 疑问标题与用户和大模型的提示词直接对应
2.4 Open Graph 标签
  • 必须包含 og:title、og:description、og:type、og:url、og:image
  • og:image 至关重要 — 没有它,社交分享卡片会显示为空白
  • 在 Next.js 中:检查 metadata.openGraph 对象
  • 同时检查 Twitter 卡片标签:twitter:card、twitter:title、twitter:description
  • 为获得最佳可见度,twitter:card 应为 summary_large_image
2.5 规范 URL
  • 每个页面都应有规范 URL
  • 在 Next.js 中:检查 metadata.alternates.canonical
  • 在 HTML 中:检查 <link rel="canonical">
  • 必须是绝对 URL,不能是相对 URL
2.6 结构化数据(JSON-LD)
  • 检查是否存在 <script type="application/ld+json"> 块
  • 检查以下高价值 Schema 类型:
    • FAQPage — 在 AI 答案中覆盖长尾问题(高影响)
    • HowTo — 有助于获得“操作指南”精选摘要
    • Article / BlogPosting — 适用于内容页面
    • WebApplication — 适用于 SaaS 产品
    • Product + Review — 适用于电商
    • Organization — 用于品牌标识
    • BreadcrumbList — 提供导航上下文
  • 在 Next.js 中:Schema 可能位于页面组件的 <script> 标签中或元数据中
  • 存在相关 Schema 类型则为 PASS,否则为 FAIL
2.7 Sitemap
  • 检查是否存在 sitemap.xml、sitemap.ts(Next.js)或 sitemap-index.xml
  • 必须包含所有公开页面,并提供正确的 lastmod、changefreq、priority
  • 必须包含动态页面(例如所有 /blog/[slug] 页面)
  • 存在且覆盖所有页面则为 PASS,存在但不完整则为 WARN,缺失则为 FAIL
2.8 Robots.txt
  • 检查是否存在 robots.txt 或 robots.ts(Next.js)
  • 必须允许抓取公开页面
  • 必须禁止抓取私有路由(/api/、/admin/、/auth/、/dashboard/)
  • 必须引用 Sitemap URL
  • 完全缺失则为 FAIL
2.9 AI 爬虫规则(AEO 专用)
  • 在 robots.txt 中,检查是否明确设置了 AI 爬虫规则:
    • GPTBot(OpenAI / ChatGPT)
    • ChatGPT-User(ChatGPT 浏览)
    • Claude-Web(Anthropic)
    • PerplexityBot(Perplexity)
    • Applebot-Extended(Apple Intelligence)
    • Google-Extended(Gemini)
  • 对于公开内容页面,应明确允许这些爬虫访问
  • 未提及则警告(默认行为可能不同),明确屏蔽则失败
2.10 llms.txt
  • 检查公开目录中是否存在 llms.txt
  • 此文件可帮助 AI 工具了解产品/网站结构
  • 应包含:产品名称、描述、主要功能、定价、重要 URL
  • 存在且有内容则通过,缺失则失败
2.11 开篇摘要/答案区块(AEO 专用)
  • 对于内容页面,检查首段是否为简洁摘要(35-90 个词)
  • 答案引擎会将其提取到答案框中
  • 检查是否采用“答案优先”的写作模式——关键信息应靠前,而不是埋在后文
  • 找到则通过,过长或过短则警告,没有清晰摘要则失败
2.12 内部链接
  • 统计每个页面的内部链接数量
  • 6 个以上内部链接=通过,2-5 个=警告,0-1 个=失败
  • 内部链接有助于搜索引擎和 LLM 检索器梳理主题深度
2.13 FAQ 区块
  • 检查是否有 FAQ 标题或类似 FAQ 的问答内容
  • 这些内容可以覆盖 AI 搜索中的长尾提示词
  • 如果存在 FAQ 内容,应使用结构化数据(FAQPage schema)
  • 有 FAQ 区块且有 schema 则通过,有 FAQ 但没有 schema 则警告,两者皆无则失败
2.14 图片替代文本
  • 检查所有 <img> 标签和 Next.js <Image> 组件是否有替代文本
  • 每张图片都应有描述性替代文本
  • 全部都有替代文本则通过,部分缺失则警告,大部分缺失则失败
2.15 性能指标
  • 在 Next.js 项目中,检查是否使用 next/image(而非原始 <img>)
  • 检查字体优化(next/font、font-display: swap)
  • 检查客户端 JavaScript 是否过多(在本可由服务端渲染的页面上使用 "use client")

第 3 阶段:评分并生成报告

计算总分:

  • 每项检查权重相同
  • 通过 = 1 分,警告 = 0.5 分,失败 = 0 分
  • 得分 =(总分 / 检查总数)* 100

显示报告:

SEO/AEO Readiness: [SCORE]/100 ([VERDICT])
Framework: [detected framework]
Pages scanned: [N]

On-site checks:
[PASS] Title tags             All pages have titles (30-60 chars)
[WARN] Meta descriptions      2/5 pages missing descriptions
[FAIL] Structured data        No JSON-LD schema detected
[PASS] Sitemap                sitemap.ts found, covers all pages
...

AEO checks:
[FAIL] AI crawler rules       No AI bot rules in robots.txt
[FAIL] llms.txt               Not found
[WARN] Question headings      1 question heading found (need 2+)
[FAIL] FAQ schema              No FAQPage schema
...

Top issues to fix (by impact):
1. (HIGH) Add FAQPage JSON-LD schema — captures AI answer citations
2. (HIGH) Create llms.txt — makes your site readable by AI tools
3. (HIGH) Add AI crawler allow rules — GPTBot, Claude-Web, PerplexityBot
4. (MEDIUM) Add meta descriptions to 2 pages
5. (LOW) Add alt text to 3 images

然后询问:“要我修复全部 [N] 个问题,还是挑选其中一些?”

第 4 阶段:修复所有问题

根据检测到的框架应用修复。进行更改前先询问。

修复:缺少/不正确的 Meta 标签

Next.js App Router:

  • 在页面文件中添加或更新 metadata 导出;对于动态页面,使用 generateMetadata()
  • 在根目录的 layout.tsx 中设置标题模板:title: { template: '%s | Brand', default: 'Brand — tagline' }
  • 添加 description、keywords、authors、creator

静态 HTML:

  • 在 <head> 区块中添加 <meta> 标签
修复:缺少 Open Graph / Twitter Cards

Next.js:

openGraph: {
  title: 'Page Title',
  description: 'Page description',
  type: 'website', // or 'article' for content pages
  url: 'https://yoursite.com/page',
  siteName: 'Brand Name',
  locale: 'en_US',
},
twitter: {
  card: 'summary_large_image',
  title: 'Page Title',
  description: 'Page description',
}
修复:缺少 OG 图片

Next.js App Router: 在 app 目录中创建 opengraph-image.tsx(或 .jsx),以自动生成 OG 图片:

import { ImageResponse } from 'next/og'

export const runtime = 'edge'
export const alt = 'Page Title'
export const size = { width: 1200, height: 630 }
export const contentType = 'image/png'

export default async function Image() {
  return new ImageResponse(
    (
      <div style={{
        fontSize: 64,
        background: '#000',
        color: '#fff',
        width: '100%',
        height: '100%',
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
      }}>
        Page Title
      </div>
    ),
    { ...size }
  )
}

对于静态网站,提醒用户创建一张 1200x630 的图片并引用它。

修复:缺少 Sitemap

Next.js App Router — 创建 app/sitemap.ts:

import type { MetadataRoute } from 'next'

export default function sitemap(): MetadataRoute.Sitemap {
  const baseUrl = 'https://yoursite.com'
  return [
    { url: baseUrl, lastModified: new Date(), changeFrequency: 'daily', priority: 1 },
    // Add all public pages here
  ]
}

读取项目中的页面/路由,并自动生成所有条目,设置适当的优先级:

  • 首页:优先级 1,每日
  • 核心功能页面:优先级 0.8,每周
  • 内容/博客页面:优先级 0.7,每周
  • 法律/关于页面:优先级 0.3,每月

对于动态路由,如果有 generateStaticParams 数据,则使用它来包含所有 slug。

修复:缺少/不完整的 Robots.txt

Next.js App Router — 创建 app/robots.ts:

import type { MetadataRoute } from 'next'

export default function robots(): MetadataRoute.Robots {
  const baseUrl = 'https://yoursite.com'
  return {
    rules: [
      {
        userAgent: '*',
        allow: '/',
        disallow: ['/api/', '/admin/', '/auth/', '/dashboard/'],
      },
      {
        userAgent: 'GPTBot',
        allow: ['/', '/docs/', '/blog/'],
      },
      {
        userAgent: 'ChatGPT-User',
        allow: ['/', '/docs/', '/blog/'],
      },
      {
        userAgent: 'Claude-Web',
        allow: ['/', '/docs/', '/blog/'],
      },
      {
        userAgent: 'PerplexityBot',
        allow: ['/', '/docs/', '/blog/'],
      },
      {
        userAgent: 'Applebot-Extended',
        allow: ['/', '/docs/', '/blog/'],
      },
    ],
    sitemap: `${baseUrl}/sitemap.xml`,
  }
}

根据项目实际的公开路由调整允许访问的路径。

修复:缺少 llms.txt

创建 public/llms.txt,内容如下:

# [Product Name]

## What is [Product Name]?
[One paragraph description — what it does, who it's for]

## Key Features
- [Feature 1]
- [Feature 2]
- [Feature 3]

## Pricing
[Pricing model — free, freemium, paid, per-credit, etc.]

## Links
- Website: [URL]
- Documentation: [URL]
- GitHub: [URL if open source]

读取项目的 README、落地页文案和 package.json,自动填入内容。

修复:缺少结构化数据

在存在 FAQ 内容的页面中添加 FAQPage schema:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Question text here?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Answer text here."
      }
    }
  ]
}
</script>

为 SaaS 产品添加 WebApplication schema:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebApplication",
  "name": "Product Name",
  "description": "Description",
  "url": "https://yoursite.com",
  "applicationCategory": "Category",
  "operatingSystem": "Web",
  "offers": {
    "@type": "Offer",
    "price": "0",
    "priceCurrency": "USD"
  }
}
</script>

为内容/博客页面添加 Article schema:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "Article Title",
  "description": "Description",
  "author": { "@type": "Organization", "name": "Brand" },
  "publisher": { "@type": "Organization", "name": "Brand" },
  "mainEntityOfPage": { "@type": "WebPage", "@id": "https://yoursite.com/page" }
}
</script>
修复:缺少规范 URL

Next.js:

alternates: {
  canonical: 'https://yoursite.com/this-page',
}
修复:标题层级问题
  • 如果有多个 H1:保留最相关的一个,将其他标题降为 H2
  • 如果没有 H1:将最突出的标题提升为 H1
  • 在适当情况下,建议将 H2 改写为问题形式,以优化 AEO
修复:缺少替代文本
  • 找出所有缺少替代文本的图片
  • 根据图片文件名和周围的上下文生成描述性替代文本
  • 在 Next.js 中,确保所有 <Image> 组件都有 alt 属性

阶段 5:验证

应用修复后,仅对修改过的文件重新运行审计。显示修复前后的分数:

SEO/AEO Readiness: 34/100 -> 89/100

Fixed:
+ Added meta descriptions to 3 pages
+ Created sitemap.ts with 8 pages
+ Created robots.ts with AI crawler rules
+ Created llms.txt
+ Added FAQPage schema to /guides page
+ Added OG image generator
+ Fixed heading hierarchy on 2 pages

Remaining (manual):
- Add real OG image assets (currently using generated fallback)
- Write FAQ content for /pricing page
- Add alt text to 2 product screenshots (need human description)

模式修饰项

用户可以指定一种模式,以添加特定领域的检查:

模式:b2b — 添加以下检查:

  • 文档/帮助中心位于子目录中(而非子域名)
  • 技术内容深度(代码示例、API 参考)
  • 比较/替代方案页面
  • 集成页面

模式:commerce — 添加以下检查:

  • 包含价格、可用性和评价的产品 schema
  • 评价/评分结构化数据
  • 类别页面优化
  • 产品图片优化

模式:local — 添加以下检查:

  • LocalBusiness schema
  • NAP(名称、地址、电话)一致性
  • Google Business Profile 链接
  • 特定地点的内容

模式:saas — 添加以下检查:

  • WebApplication schema
  • 定价页面结构化数据
  • 功能比较表
  • 用于提供新鲜度信号的更新日志/更新页面

评论

支持 Markdown