seo-analyzer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSEO Analyzer Skill
SEO Analyzer Skill
基于 Google 官方文档的 SEO 自动检测工具。自动分析网址的技术 SEO、内容元数据、性能体验和链接结构,输出符合 Google 最佳实践的检测报告。
An automated SEO testing tool based on official Google documentation. It automatically analyzes a website's technical SEO, content metadata, performance experience, and link structure, and outputs a test report that aligns with Google's best practices.
快速开始
Quick Start
自动模式(推荐)
Auto Mode (Recommended)
使用自动模式分析 URL,脚本会自动获取页面并执行检查:
bash
python scripts/seo_analyzer.py --auto <url>自动模式会:
- 检查 agent-browser 是否已安装
- 使用 agent-browser 获取页面 HTML
- 执行完整的 SEO 检查
- 生成详细的检测报告
Use auto mode to analyze a URL, the script will automatically fetch the page and perform checks:
bash
python scripts/seo_analyzer.py --auto <url>Auto mode will:
- Check if agent-browser is installed
- Use agent-browser to fetch page HTML
- Perform a full SEO check
- Generate a detailed test report
手动模式
Manual Mode
如果 agent-browser 未安装,或已有 HTML 文件:
bash
undefinedIf agent-browser is not installed, or you already have an HTML file:
bash
undefined从文件分析
Analyze from file
python scripts/seo_analyzer.py <html_file> <url>
python scripts/seo_analyzer.py <html_file> <url>
从 stdin 读取
Read from stdin
agent-browser get source | python scripts/seo_analyzer.py - <url>
agent-browser get source | python scripts/seo_analyzer.py - <url>
JSON 输出格式
JSON output format
python scripts/seo_analyzer.py <html_file> <url> --json
undefinedpython scripts/seo_analyzer.py <html_file> <url> --json
undefined工作流程
Workflow
分析网页 SEO 时,按以下步骤执行:
- 获取页面内容 - 使用 agent-browser 打开页面并获取 HTML
- 执行 SEO 检查 - 运行 分析页面
seo_analyzer.py - 生成报告 - 输出按严重程度分类的问题和建议
When analyzing webpage SEO, follow these steps:
- Fetch Page Content - Use agent-browser to open the page and get HTML
- Execute SEO Check - Run to analyze the page
seo_analyzer.py - Generate Report - Output issues and recommendations categorized by severity
完整工作流程示例
Complete Workflow Examples
bash
undefinedbash
undefined方式1: 自动模式(推荐)
Method 1: Auto Mode (Recommended)
python scripts/seo_analyzer.py --auto https://example.com
python scripts/seo_analyzer.py --auto https://example.com
方式2: 分步执行
Method 2: Step-by-step execution
agent-browser open <url> --timeout 30000
agent-browser get source | python scripts/seo_analyzer.py - <url>
agent-browser open <url> --timeout 30000
agent-browser get source | python scripts/seo_analyzer.py - <url>
方式3: 使用文件
Method 3: Use file
agent-browser get source > /tmp/page.html
python scripts/seo_analyzer.py /tmp/page.html <url>
undefinedagent-browser get source > /tmp/page.html
python scripts/seo_analyzer.py /tmp/page.html <url>
undefined检查类别
Check Categories
分析器检查以下 12 个 SEO 类别:
- 技术要求 - HTTP 状态码、Googlebot 可访问性、HTTPS、noindex 指令
- 标题标签 - 存在性、唯一性、描述性、避免关键字堆砌
<title> - Meta 描述 - 存在性、唯一性、描述性、适当长度
- 标题结构 - H1 存在性和唯一性、逻辑层级
- 链接可访问性 - 标准链接格式、描述性锚文本、rel 属性
- 图片优化 - alt 属性、描述性文本
- 结构化数据 - JSON-LD/Microdata/RDFa 存在性、有效性
- URL 结构 - 描述性、可读性、使用连字符
- Canonical URL - 存在性、绝对路径、HTTPS 优先
- 内容质量 - 独特性、可读性、实质性内容
- 移动端友好性 - viewport 标签、响应式设计
- Core Web Vitals - LCP、INP、CLS(需要 JavaScript 运行时测量)
详细检查规则和实现逻辑见 。
references/seo-check-rules.mdThe analyzer checks the following 12 SEO categories:
- Technical Requirements - HTTP status code, Googlebot accessibility, HTTPS, noindex directive
- Title Tags - Existence, uniqueness, descriptiveness, avoiding keyword stuffing
- Meta Descriptions - Existence, uniqueness, descriptiveness, appropriate length
- Heading Structure - Existence and uniqueness of H1, logical hierarchy
- Link Accessibility - Standard link format, descriptive anchor text, rel attributes
- Image Optimization - Alt attributes, descriptive text
- Structured Data - Existence and validity of JSON-LD/Microdata/RDFa
- URL Structure - Descriptiveness, readability, use of hyphens
- Canonical URL - Existence, absolute path, HTTPS priority
- Content Quality - Uniqueness, readability, substantial content
- Mobile Friendliness - Viewport tag, responsive design
- Core Web Vitals - LCP, INP, CLS (requires JavaScript runtime measurement)
Detailed check rules and implementation logic can be found in .
references/seo-check-rules.md报告格式
Report Format
报告按严重程度分类问题:
- Critical(严重) - 必须修复,会阻止索引/排名
- Warning(警告) - 应该修复,影响性能
- Info(建议) - 优化建议,改善表现
报告包含:
- 问题摘要(总数、各严重程度数量)
- 详细问题列表(类别、当前状态、建议、参考文档)
- 通过的检查项
使用 参数可输出 JSON 格式报告,便于程序化处理。
--jsonReports categorize issues by severity:
- Critical - Must be fixed, will prevent indexing/ranking
- Warning - Should be fixed, affects performance
- Info - Optimization recommendations to improve performance
Reports include:
- Issue summary (total count, count by severity level)
- Detailed issue list (category, current status, recommendation, reference documentation)
- Passed check items
Use the parameter to output reports in JSON format for programmatic processing.
--json参考资源
Reference Resources
- 检查规则: - 详细的检查规则和实现逻辑
references/seo-check-rules.md - Google SEO 文档: seo-docs - 基于 Google 官方文档的完整参考
- Check Rules: - Detailed check rules and implementation logic
references/seo-check-rules.md - Google SEO Documentation: seo-docs - Complete reference based on official Google documentation
限制说明
Limitations
- 无法测量 Core Web Vitals(需要 JavaScript 运行时)
- 无法验证页面是否已被 Google 索引
- 无法访问服务器配置(SSL、重定向等)
- 内容质量评估基于启发式方法
- 移动端友好性检查为近似值,非实际设备模拟
- Cannot measure Core Web Vitals (requires JavaScript runtime)
- Cannot verify if pages have been indexed by Google
- Cannot access server configurations (SSL, redirects, etc.)
- Content quality assessment is based on heuristic methods
- Mobile friendliness checks are approximate, not actual device simulation