Analyze a website's SEO health, check key page elements and technical metrics, and generate an actionable optimization recommendation report.
Trigger Conditions
Launch this skill when the user says the following:
- "Analyze website SEO"
- "SEO check"
- "Website optimization suggestions"
- "SEO audit"
- "Help me look at website ranking issues"
- "Search engine optimization"
Workflow
┌─────────────────────┐
│ 输入网站URL │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ 抓取页面内容 │
│ 解析HTML结构 │
└──────────┬──────────┘
│
▼
┌─────────────────────────────────────┐
│ 多维度SEO检查 │
├───────────┬───────────┬─────────────┤
│ 页面元素 │ 技术指标 │ 内容质量 │
│ 检查 │ 检查 │ 检查 │
└─────┬─────┴─────┬─────┴──────┬──────┘
│ │ │
└───────────┼────────────┘
│
▼
┌─────────────────────┐
│ 计算SEO评分 │
│ 生成优化建议 │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ 输出分析报告 │
└─────────────────────┘
Execution Steps
Step 1: Get the target website
Input method:
用户: 分析一下 https://example.com 的SEO
用户: 帮我检查 example.com 的搜索优化
Step 2: Crawl page content
Use WebFetch to get the page HTML and extract key elements:
Element checklist:
<title>tag<meta name="description"><meta name="keywords"><meta name="robots"><link rel="canonical"><h1>-<h6>heading structure<img>alt attribute<a>link structure- Schema.org structured data
- Open Graph tags
- Twitter Card tags
Step 3: Check page elements
Title tag:
| Check item | Standard | Deduction |
|---|---|---|
| Presence | Required | -20 |
| Length | 30-60 characters | -5 |
| Keywords | Include target terms | -10 |
| Uniqueness | Not duplicated | -10 |
Meta Description:
| Check item | Standard | Deduction |
|---|---|---|
| Presence | Required | -15 |
| Length | 120-160 characters | -5 |
| Attractiveness | Include a CTA | -5 |
| Keywords | Naturally included | -5 |
Heading structure (H1-H6):
| Check item | Standard | Deduction |
|---|---|---|
| H1 presence | Required and unique | -15 |
| Clear hierarchy | H1>H2>H3 | -10 |
| Include keywords | H1/H2 contain keywords | -5 |
Image optimization:
| Check item | Standard | Deduction |
|---|---|---|
| Alt attribute | All images have alt | -10 |
| File name | Descriptive naming | -5 |
| Size optimization | <200KB | -5 |
Step 4: Check technical metrics
Use WebSearch to search for website technical information:
site:example.com (收录量)
"example.com" pagespeed (速度评分)
"example.com" mobile friendly (移动友好)
Technical checklist:
| Check item | Method | Importance |
|---|---|---|
| HTTPS | URL check | High |
| Mobile-friendly | meta viewport | High |
| Page speed | Search evaluation data | High |
| Indexing status | site: search | High |
| robots.txt | /robots.txt | Medium |
| sitemap | /sitemap.xml | Medium |
| Canonical link | canonical tag | Medium |
Step 5: Check content quality
Content analysis:
| Check item | Standard | Description |
|---|---|---|
| Content length | >300 characters | Body word count |
| Keyword density | 1-3% | No excessive stuffing |
| Number of internal links | 3-10 | Internal links |
| Number of external links | 1-5 | Authoritative external links |
| Originality | No plagiarism | Unique content |
| Update time | Recently updated | Content freshness |
Step 6: Competitive Analysis (Optional)
If the user provides keywords, perform competitive analysis:
搜索: {关键词}
分析: 排名前10的页面特点
对比: 目标页面差距
Step 7: Calculate SEO Score
Scoring Model:
| Dimension | Weight | Full Score |
|---|---|---|
| Page Elements | 30% | 30 |
| Technical Metrics | 30% | 30 |
| Content Quality | 25% | 25 |
| User Experience | 15% | 15 |
Score Rating:
| Score | Rating | Description |
|---|---|---|
| 90-100 | A | Excellent, maintain current status |
| 80-89 | B | Good, minor optimization |
| 70-79 | C | Average, needs improvement |
| 60-69 | D | Poor, focus on optimization |
| <60 | F | Bad, comprehensive overhaul |
Step 8: Generate Optimization Report
Report Format:
# SEO 分析报告
## 📊 概览
| 项目 | 数据 |
|------|------|
| 分析网站 | https://example.com |
| 分析时间 | YYYY-MM-DD |
| SEO评分 | **75/100 (C级)** |
| 主要问题 | 3个关键 / 5个次要 |
## 🎯 评分详情
| 维度 | 得分 | 状态 |
|------|------|------|
| 页面元素 | 22/30 | ⚠️ 需改进 |
| 技术指标 | 25/30 | ✅ 良好 |
| 内容质量 | 18/25 | ⚠️ 需改进 |
| 用户体验 | 10/15 | ✅ 良好 |
---
## 🔴 关键问题 (必须修复)
### 1. Title 标签过长
- **当前**: "这是一个非常非常长的标题超过了60个字符的限制..."
- **问题**: 超过60字符,搜索结果会截断
- **建议**: 精简到30-60字符,保留核心关键词
- **参考**: "精简后的标题 | 品牌名"
### 2. 缺少 Meta Description
- **当前**: 未设置
- **问题**: 搜索引擎会自动截取,不可控
- **建议**: 添加120-160字符描述,包含关键词和CTA
- **参考**: "简洁描述网页内容,包含主要关键词。立即了解更多!"
### 3. H1 标签缺失
- **当前**: 页面无H1
- **问题**: 搜索引擎难以理解页面主题
- **建议**: 添加唯一H1,包含核心关键词
---
## 🟡 次要问题 (建议修复)
### 4. 部分图片缺少 Alt 属性
- **问题**: 5张图片中有2张无alt
- **影响**: 图片搜索流量损失
- **建议**: 为所有图片添加描述性alt
### 5. 内链数量不足
- **当前**: 1个内链
- **建议**: 增加到3-5个相关内链
---
## ✅ 做得好的地方
1. ✅ HTTPS 安全连接
2. ✅ 移动端适配良好
3. ✅ 有 canonical 标签
4. ✅ 页面加载速度尚可
---
## 📋 优化清单
### 优先级 P0 (本周完成)
- [ ] 优化 Title 标签
- [ ] 添加 Meta Description
- [ ] 添加 H1 标签
### 优先级 P1 (本月完成)
- [ ] 补充图片 Alt 属性
- [ ] 增加内部链接
- [ ] 添加结构化数据
### 优先级 P2 (持续优化)
- [ ] 内容更新和扩充
- [ ] 外链建设
- [ ] 监控排名变化
---
## 📈 预期效果
优化完成后预计:
- 搜索可见性提升 20-30%
- 点击率提升 15-25%
- 3-6个月见效
---
*报告由 Claude Code seo-analyzer 技能生成*
Usage Examples
Example 1: Single Page Analysis
用户: 分析一下 https://example.com/product 的SEO
Claude:
1. 抓取页面内容
2. 检查所有SEO元素
3. 评估技术指标
4. 生成优化报告
Example 2: Competitive Comparison
用户: 分析我的网站和竞品的SEO差距
网站: example.com
竞品: competitor.com
关键词: "产品管理工具"
Claude:
1. 分别分析两个网站
2. 搜索关键词排名情况
3. 对比优劣势
4. 提出追赶策略
Example 3: Batch Check
用户: 检查我网站这5个重点页面的SEO
- /
- /product
- /pricing
- /about
- /blog
Claude:
1. 逐页分析
2. 汇总共性问题
3. 按优先级排序
4. 输出整体报告
SEO Checklist
Basic Must-Check Items
- Title Tag (30-60 characters)
- Meta Description (120-160 characters)
- H1 Tag (unique)
- HTTPS
- Mobile-friendly
- Image Alt
Advanced Optimization Items
- Schema Structured Data
- Open Graph Tags
- Canonical Tag
- Sitemap.xml
- Robots.txt
- Page Speed <3 seconds
Content Optimization Items
- Natural keyword distribution
- Internal link building
- External link quality
- Content freshness
- User dwell time
Data Storage
- Analysis report:
~/.claude/cache/seo/ - File naming:
{YYYYMMDD}-{domain}.md
Dependencies
- WebFetch: Crawl page HTML
- WebSearch: Search indexing and technical information
- Write: Save analysis report
Limitations
- Cannot access Google Search Console backend data
- Cannot obtain real search ranking positions
- Page speed data comes from public testing tools
- JavaScript-rendered content may be incompletely retrieved