claude-seo

命令行工具

AgriciDaniel/claude-seo

开源 Claude Code 插件,用 19 个 AI 智能体完成全站 SEO 审计。

项目简介

开源的 Claude Code SEO 审计插件,由 26 个子技能与 19 个专家智能体组成。覆盖技术 SEO、核心网页指标、E-E-A-T、结构化数据、AI 搜索可见性(GEO)、本地、电商与国际化 SEO。输出按优先级排序的行动方案,并支持 PDF/Excel 报告与实时数据扩展。

README 预览

\n\n\n\nClaude SEO\n\n\n  Free, open-source SEO audits inside Claude Code.\n  Rank higher in Google and get cited by AI search.\n\n\n\n  Install ·\n  Demo ·\n  Results ·\n  Team ·\n  Commands ·\n  Pricing ·\n  FAQ\n\n\n\n  \n  \n  \n  \n  \n  \n  \n\n\n\n  \n\n\n**Claude SEO is a free SEO plugin for Claude Code.** Give it any website and it runs a full SEO audit in 10 to 15 minutes, then hands you a clear action plan, sorted by what matters most.\n\nIt checks everything a good SEO consultant would:\n\n- **Technical SEO.** Crawlability, indexing, sitemaps, robots.txt, redirects, page speed and Core Web Vitals.\n- **Content quality.** E-E-A-T (experience, expertise, authority and trust), thin pages and topic coverage.\n- **Structured data.** Finds, validates and writes Schema.org markup for rich results.\n- **AI search (GEO).** How likely Google AI Overviews, AI Mode, ChatGPT, Perplexity and Gemini are to cite your pages.\n- **Local and e-commerce SEO.** Google Business Profile, reviews, map pack, product pages and international sites.\n\nClaude SEO is built from 26 sub-skills and 19 specialist agents, and up to 17 agents work on your site at the same time. Every recommendation explains why it matters and how you will know it worked.\n\n## See it in action\n\nType `/seo` in Claude Code to see every command:\n\n\n\nRun a full audit and watch the agents fan out across the site:\n\n\n\n[Watch the full demo on YouTube](https://www.youtube.com/watch?v=COMnNlUakQk)\n\n## Real results\n\nThe project's own site, [claude-seo.md](https://claude-seo.md), audited with Claude SEO from day one: 10.8K Search Console clicks in its first 12 weeks and a 99 mobile PageSpeed score.\n\n\n\n## Meet the team\n\n\n\n\nAll 19 agents\n\n\n| Agent | Role | Model | Command |\n|---|---|---|---|\n| `seo-technical` | Technical SEO Lead | Sonnet | `/seo technical` |\n| `seo-content` | Content Editor | Opus | `/seo content` |\n| `seo-schema` | Structured Data Engineer | Sonnet | `/seo schema` |\n| `s

常见问题 (5)

故障排除
在 claude-seo v2.3.1 中,即使 opr_live API 密钥有效,如何修复 keywordseverywhere_api.py(Open PageRank)返回的 HTTP 404 错误?

这个 404 并不是身份验证失败——脚本调用的是已停用的旧版 DomCop 端点。请修补 scripts/keywordseverywhere_api.py:1) 将 KWE_BASE 从 https://openpagerank.keywordseverywhere.com/api/v1.0/getPageRank 改为 https://openpagerank.keywordseverywhere.com/v1/domains/bulk。2) 将使用重复 domains[] 查询参数的 GET 请求改为使用 JSON 请求体 {"domains": ["example.com"]} 的 POST 请求(每次调用最多 100 个域名)。3) 将 API-OPR: <key> 请求头替换为 Authorization: Bearer opr_live_...。4) 解析 results[] 而不是已移除的 response[] 键,并处理 error/status_code 字段;新的响应负载还新增了 referring_domains 和按月统计的 history 数组。先用阳性对照验证你的密钥:curl -X POST https://openpagerank.keywordseverywhere.com/v1/domains/bulk -H "Authorization: Bearer <key>" -H "Content-Type: application/json" -d '{"domains":["example.com"]}'——返回 HTTP 200 和 JSON 即确认密钥有效,只有旧路径(返回 HTML 404)已失效。注意:旧版 DomCop 密钥将于 2026-09-30 过期。替代方案:使用位于 https://openpagerank.keywordseverywhere.com/mcp 的官方 MCP 服务器(相同的 Bearer 认证,工具包括 get_domain_rank、get_domain_history、bulk_domain_rank),其 initialize/tools/list 无需密钥即可响应,可用于 CI 冒烟测试。

来源 Issue #312
故障排除
为什么 claude-seo 在处理法语或 UTF-8 页面时显示乱码的重音字符(é mojibake)?

这是一个已在 claude-seo v2.4.0 中修复的已知 bug。requests 会将缺少 charset 标头的 text/* 响应按 ISO-8859-1 解码(依据 RFC 2616),忽略页面的 <meta charset="UTF-8">,导致 UTF-8 重音字符在 render_page.py、parse_html.py、nlp_analyze.py 及其他四个脚本中变成乱码。修复方法:升级到 claude-seo v2.4.0+,该版本中所有七个脚本共用一个解码器,依次检查:BOM、标头 charset、HTML meta charset,最后以 UTF-8 兜底。如果在 scripts/url_safety.py 中手动打补丁,请注意维护者特意避免使用 resp.apparent_encoding,因为读取它会消耗流式响应的响应体。

来源 Issue #314
故障排除
如何修复从 Claude 桌面应用安装插件时出现的 "MARKETPLACE_ERROR:REMOTE_SYNC_FAILED"(marketplace_sync_bin_directory_not_allowed)错误?

将插件/marketplace 更新到 v2.2.6 或更高版本,然后在 Claude 桌面应用中重新添加(Customize > Plugins > Add marketplace)。同步失败的原因是:由 claude.ai 托管的插件不允许附带顶层的 bin/ 目录——这些可执行文件在 CLI 上会被添加到 PATH,但不会显示在管理员审批界面上。桌面端 UI 提示的 "Marketplace sync failed. Check the repository URL and try again" 具有误导性;真正的原因(marketplace_sync_bin_directory_not_allowed)只会出现在应用日志中。在 claude-seo v2.2.6 中,修复方式是将启动器从 bin/claude-seo 移至 scripts/claude-seo,skills 通过 ${CLAUDE_PLUGIN_ROOT} 来调用它。如果你维护插件或 marketplace:请将可执行文件从 bin/ 移到 scripts/(通过 ${CLAUDE_PLUGIN_ROOT} 引用它们),或者改用 hooks、commands 或 mcpServers 来声明入口点。旧版本的临时解决方案:通过 Claude Code CLI 安装(claude plugin marketplace add + claude plugin install),该方式不受此限制影响。

来源 Issue #298
故障排除
如何修复 claude-seo 中的 'fetch_page.py: error: unrecognized arguments: --json' 错误?

--json 支持已在 claude-seo v2.3.0(PR #297)中添加到 fetch_page.py。请升级到 v2.3.0 或更高版本,然后运行:

./bin/claude-seo run fetch_page.py https://example.com --json

JSON 输出与 render_page.py 遵循相同的约定,返回 url、status_code、content、headers 和 redirect_chain 等字段,此外还提供 --max-text 选项用于限制正文大小。

**v2.2.5 及更早版本的替代方案:** 改用 render_page.py,它已支持 --json 以进行结构化数据获取:

./bin/claude-seo run render_page.py https://example.com --json

请避免以编程方式解析 fetch_page.py 的纯文本输出(URL: / Status: 头部)——这种方式很脆弱,并且会遗漏响应头和重定向链。

来源 Issue #282
故障排除
如何修复在本地 HTTP 代理环境下使用 url_safety 的 safe_requests_get 时出现的 "refused to resolve 127.0.0.1 to non-public IP" ProxyError 错误?

当设置了 HTTPS_PROXY=http://127.0.0.1:<port> 时会发生这种情况(在沙箱/CI 环境中很常见):url_safety.py 的 DNS 固定机制 _pin_dns() 拦截了代理自身的主机解析,而 is_safe_ip('127.0.0.1') 将其判定为回环地址并拒绝,导致每个目标 URL 都抛出 requests.exceptions.ProxyError ... Failed to resolve '127.0.0.1' 错误。这一问题导致约 18 个脚本失效,包括 fetch_page.py、sitemap_discovery.py 和 indexnow_submit.py,而这些脚本还会误导性地报告通用的 'Request failed' 错误。修复方法:升级到 v2.3.0,其中 PR #295 加上一个后续提交将配置的代理主机从 DNS 重绑定检查中豁免——但前提是先根据黑名单验证该代理主机,并在其完成解析时重新检查,因此 HTTPS_PROXY 中的元数据地址无法绕过 SSRF 防护。升级后无需任何代码更改或变通方案;相同的 HTTPS_PROXY 设置即可照常工作。

来源 Issue #280