关于 seo-optimizer
用于审计和优化网站 SEO 的技能,适用于单页检查或全站改造。它以分阶段流程结合技术检查、页面元数据、结构化数据和 Core Web Vitals 监测。
主要功能
- 01抓取与索引能力审计
- 02优化标题、描述和标题层级
- 03实施 Schema.org JSON-LD
- 04管理站点地图与规范 URL
- 05优化 Core Web Vitals 性能
- 06监测搜索表现
适用场景
- 01发现抓取错误和失效链接
- 02改进页面元数据与内链
- 03添加并验证结构化数据
- 04跟踪索引状态与搜索表现
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ pixel-process-ug/ superkit-agents --skill seo-optimizer安装后在 Claude Code 中输入/seo-optimizer确认已加载。
详细介绍
SEO 优化器
概述
通过技术 SEO、页面优化、结构化数据实施和 Core Web Vitals 性能调优,提升网站在搜索引擎中的可见度。此技能涵盖可抓取性、可索引性、元标记策略、Schema.org 标记、站点地图生成、规范 URL 管理、国际化(hreflang)以及针对 Google 排名信号的性能优化。
无论是单页审查还是全站改造,只要网站需要提升自然搜索表现,就应使用此技能。
多阶段流程
阶段 1:技术审查
- 抓取网站(使用 Screaming Frog、Sitebulb 或自定义脚本)
- 检查 robots.txt 和 XML 站点地图是否有效
- 找出抓取错误、重定向链和失效链接
- 验证规范 URL 和重复内容处理方式
- 评估移动设备友好性和响应式设计
- 检查 HTTPS 实施情况和混合内容
- 评估页面加载性能(Core Web Vitals)
停止 — 在记录并确定审查结果的优先级之前,不要进入阶段 2。
阶段 2:页面优化
- 审查标题标签(唯一、50-60 个字符、合理安排关键词位置)
- 检查元描述(唯一、150-160 个字符、包含吸引人的行动号召)
- 分析标题层级(每页一个 H1,H2-H6 结构合理)
- 优化图片替代文本和文件名
- 检查内部链接结构和锚文本
- 检查 URL 结构(简短、描述性强、使用连字符)
- 验证 Open Graph 和 Twitter Card 标签
停止 — 在实施并验证页面优化更改之前,不要进入阶段 3。
阶段 3:实施结构化数据
- 为内容确定适用的 Schema.org 类型
- 实施 JSON-LD 结构化数据
- 使用 Google Rich Results Test 验证
- 测试是否符合富媒体摘要的展示条件
- 在 Search Console 中监控结构化数据错误
停止 — 在结构化数据通过验证之前,不要进入阶段 4。
阶段 4:监控和迭代
- 设置 Google Search Console 监控
- 持续跟踪 Core Web Vitals
- 监控索引状态和覆盖率
- 检查搜索表现(点击次数、展示次数、CTR、排名)
- 设置抓取错误和排名下降提醒
审查优先级决策表
| 发现的问题 | 严重程度 | 修复优先级 | 影响 |
|---|---|---|---|
| 未使用 HTTPS / 存在混合内容 | 严重 | 立即 | 排名受罚、信任信号 |
| 缺少规范 URL | 严重 | 立即 | 重复内容导致权重分散 |
| 重定向链失效(3 次以上跳转) | 高 | 本迭代 | 浪费抓取预算、链接权重流失 |
| 缺少或重复的标题标签 | 高 | 本迭代 | CTR 下降、排名混乱 |
| 未使用结构化数据 | 中 | 下个迭代 | 缺少富媒体摘要 |
| 图片缺少替代文本 | 中 | 下个迭代 | 无障碍访问和图片搜索效果受损 |
| Core Web Vitals 未达最佳水平 | 中 | 下个迭代 | 排名信号、用户体验 |
| 缺少 hreflang 标签(多语言网站) | 低 | 待办事项 | 地理定位问题 |
| URL 路径不具描述性 | 低 | 待办事项 | 对排名和 CTR 有轻微影响 |
元标记参考
必需的元标记
<head>
<title>Primary Keyword - Secondary Keyword | Brand Name</title>
<meta name="description" content="Compelling 150-160 char description with target keyword and clear value proposition.">
<link rel="canonical" href="https://example.com/page">
<meta name="robots" content="index, follow">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:type" content="website">
<meta property="og:title" content="Page Title for Social Sharing">
<meta property="og:description" content="Description optimized for social sharing.">
<meta property="og:image" content="https://example.com/og-image.jpg">
<meta property="og:url" content="https://example.com/page">
<meta property="og:site_name" content="Brand Name">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Page Title">
<meta name="twitter:description" content="Twitter-optimized description.">
<meta name="twitter:image" content="https://example.com/twitter-image.jpg">
<link rel="alternate" hreflang="en" href="https://example.com/en/page">
<link rel="alternate" hreflang="de" href="https://example.com/de/page">
<link rel="alternate" hreflang="x-default" href="https://example.com/page">
</head>
元标记优化矩阵
| 元素 | 最大长度 | 优先关键词 | 常见错误 |
|---|---|---|---|
| 标题标签 | 50-60 个字符 | 将主要关键词放在前面 | 太长、关键词堆砌、重复 |
| 元描述 | 150-160 个字符 | 包含行动号召和关键词 | 缺失、重复、没有行动号召 |
| H1 | 不适用(每页一个) | 主要关键词的变体 | 存在多个 H1、缺少 H1 |
| URL 路径 | 3-5 个词 | 目标关键词 | 太长、含参数、使用下划线 |
| 图片替代文本 | 125 个字符 | 描述性文字;自然时可包含关键词 | 为空、“图片内容为……”,关键词堆砌 |
| OG 标题 | 60-90 个字符 | 吸引人、适合分享 | 与标题标签相同(错失机会) |
结构化数据(JSON-LD)
文章
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to Optimize Core Web Vitals",
"author": {
"@type": "Person",
"name": "Jane Smith",
"url": "https://example.com/authors/jane-smith"
},
"datePublished": "2026-03-01",
"dateModified": "2026-03-15",
"image": "https://example.com/images/article-hero.jpg",
"publisher": {
"@type": "Organization",
"name": "Example Blog",
"logo": {
"@type": "ImageObject",
"url": "https://example.com/logo.png"
}
},
"description": "A comprehensive guide to improving LCP, FID, and CLS scores."
}
</script>
产品
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Widget Pro",
"description": "Professional-grade widget for enterprise use.",
"image": "https://example.com/widget-pro.jpg",
"brand": { "@type": "Brand", "name": "WidgetCo" },
"offers": {
"@type": "Offer",
"price": "49.99",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"url": "https://example.com/widget-pro"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.7",
"reviewCount": "312"
}
}
</script>
FAQ 页面
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "What is Core Web Vitals?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Core Web Vitals are a set of metrics that measure real-world user experience for loading, interactivity, and visual stability."
}
}
]
}
</script>
Schema 类型决策指南
| 内容类型 | Schema 类型 | 富媒体结果 |
|---|---|---|
| 博客文章 | Article | 文章摘要 |
| 产品页面 | Product | 价格、评分、库存情况 |
| FAQ 部分 | FAQPage | 可展开的问答 |
| 操作指南 | HowTo | 分步摘要 |
| 食谱 | Recipe | 图片、时间、评分 |
| 活动 | Event | 日期、地点、价格 |
| 本地商家 | LocalBusiness | 地图包、本地营业时间 |
| 软件 | SoftwareApplication | 评分、价格 |
| 面包屑导航 | BreadcrumbList | 面包屑导航路径 |
| 视频 | VideoObject | 缩略图、时长 |
Core Web Vitals
指标与阈值
| 指标 | 良好 | 需要改进 | 较差 | 衡量内容 |
|---|---|---|---|---|
| LCP(最大内容绘制) | <= 2.5s | <= 4.0s | > 4.0s | 加载性能 |
| INP(交互到下一次绘制) | <= 200ms | <= 500ms | > 500ms | 交互性 |
| CLS(累积布局偏移) | <= 0.1 | <= 0.25 | > 0.25 | 视觉稳定性 |
LCP 优化
<link rel="preload" as="image" href="/hero.webp" fetchpriority="high">
<picture>
<source srcset="/hero.avif" type="image/avif">
<source srcset="/hero.webp" type="image/webp">
<img src="/hero.jpg" alt="Hero description" width="1200" height="600"
fetchpriority="high" decoding="async">
</picture>
CLS 预防
/* Always set dimensions on images and video */
img, video {
width: 100%;
height: auto;
aspect-ratio: 16 / 9;
}
/* Reserve space for dynamic content */
.ad-slot {
min-height: 250px;
}
/* Avoid inserting content above existing content */
.notification-bar {
position: fixed; /* doesn't shift layout */
}
INP 优化
// Break long tasks with yield
async function processLargeDataset(data) {
for (let i = 0; i < data.length; i++) {
processItem(data[i]);
if (i % 100 === 0) {
await new Promise(resolve => setTimeout(resolve, 0)); // yield to main thread
}
}
}
// Use requestIdleCallback for non-critical work
requestIdleCallback(() => {
loadAnalytics();
initNonCriticalFeatures();
});
XML 网站地图
生成模式
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2026-03-15</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/products</loc>
<lastmod>2026-03-14</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
网站地图最佳实践
- 每个网站地图文件最多包含 50,000 个 URL
- 对于较大的网站,使用网站地图索引
- 仅包含规范且可编入索引的 URL
- 仅在内容确实发生变化时更新
lastmod - 通过 Google Search Console 和 robots.txt 提交
robots.txt 模板
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /api/
Disallow: /search?
Disallow: /*?sort=
Disallow: /*?filter=
Sitemap: https://example.com/sitemap.xml
Next.js / React SEO 模式
Next.js Metadata API(App Router)
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: {
template: '%s | Brand Name',
default: 'Brand Name - Tagline',
},
description: 'Site-wide default description.',
openGraph: {
type: 'website',
locale: 'en_US',
url: 'https://example.com',
siteName: 'Brand Name',
},
twitter: {
card: 'summary_large_image',
},
robots: {
index: true,
follow: true,
},
alternates: {
canonical: 'https://example.com',
},
};
每个页面的动态元数据
export async function generateMetadata({ params }): Promise<Metadata> {
const product = await getProduct(params.slug);
return {
title: product.name,
description: product.description.slice(0, 160),
openGraph: {
title: product.name,
description: product.description.slice(0, 200),
images: [{ url: product.image, width: 1200, height: 630 }],
},
};
}
反模式 / 常见错误
| 反模式 | 失败原因 | 应采取的做法 |
|---|---|---|
| 在标题/内容中堆砌关键词 | 触发垃圾信息过滤器,降低点击率 | 自然地使用一次主要关键词,并添加变体 |
| 多个页面使用相同的标题/描述 | 产生重复内容信号,错失机会 | 为每个可编入索引的 URL 设置独特且针对页面的元数据 |
| 在 robots.txt 中屏蔽 CSS/JS | Googlebot 无法呈现页面 | 允许加载所有渲染资源 |
| 结构化数据与页面内容不符 | 遭到 Google 惩罚,富媒体摘要被移除 | Schema 必须与可见内容完全一致 |
| 重定向链超过 2 跳 | 浪费抓取预算,损失链接权重 | 直接重定向到最终目的地 |
| 仅使用 JS 导航,且没有 SSR 链接 | 爬虫无法发现页面 | 在服务器端渲染导航链接 |
| 忽略 Core Web Vitals | 排名信号下降 | 分析并优化 LCP、INP、CLS |
| 缺少规范 URL | 因重复内容受到惩罚 | 为每个可编入索引的页面设置规范 URL |
| 锚文本过度优化 | 不自然的链接模式会触发惩罚 | 使用描述性、多样化的锚文本 |
| 使用 CSS 隐藏内容以进行 SEO | 违反伪装行为规范 | 所有 SEO 内容都必须对用户可见 |
防止自我合理化
- 不要因为“网站看起来没问题”就跳过技术审计——要对网站进行抓取。
- 不要在未验证结构化数据通过 Rich Results Test 的情况下添加结构化数据。
- 不要未经检查每种页面类型就假定元标签正确无误。
- 不要在没有进行前后测量的情况下部署 SEO 更改。
- 不要以牺牲用户体验为代价来优化搜索引擎排名。
集成点
| 技能 | 关联方式 |
|---|---|
content-creator | SEO 为营销内容的关键词定位和标题策略提供指导 |
content-research-writer | 以研究为依据的内容需要经过 SEO 优化的结构和元标签 |
senior-frontend | 优化 Core Web Vitals 需要调整前端性能 |
performance-optimization | 页面速度直接影响 LCP 和 INP 分数 |
deployment | SEO 更改需要正确的缓存失效和重定向配置 |
tech-docs-generator | 文档网站需要配置网站地图、规范 URL 和结构化数据 |
技能类型
灵活 — 根据网站的技术栈、内容类型和竞争格局调整优化策略。强烈建议遵循技术 SEO 基础原则和结构化数据最佳实践;具体实现模式因框架而异。
评论
支持 Markdown