gr-seo-patrol
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesegr-seo-patrol — SEO/GEO 日常巡逻
gr-seo-patrol — SEO/GEO 日常巡逻
什么时候用
什么时候用
| 场景 | 动作 |
|---|---|
| "跑今日 SEO 日报" | 执行完整巡逻(scripts/daily-report.py) |
| "某关键词排名掉了" | 单词诊断(Claude 直接执行下方诊断流程) |
| "修 canonical" | 批量合并(scripts/canonical-fix.py) |
| "救一下这篇文章" | 社媒救援(scripts/rescue-post.py)—— title 前置 + 3 个高权重内链 |
| "检查 GA4 部署" | 扫 HTML 里的 G-XXXXX tag |
| "查 llms.txt" | HTTP 200 + 字节数 |
| 场景 | 动作 |
|---|---|
| "跑今日 SEO 日报" | 执行完整巡逻(scripts/daily-report.py) |
| "某关键词排名掉了" | 单关键词诊断(Claude 直接执行下方诊断流程) |
| "修 canonical" | 批量合并(scripts/canonical-fix.py) |
| "救一下这篇文章" | 社媒救援(scripts/rescue-post.py)—— title 前置 + 3 个高权重内链 |
| "检查 GA4 部署" | 扫描 HTML 里的 G-XXXXX tag |
| "查 llms.txt" | 检查 HTTP 200 状态码 + 字节数 |
核心流程
核心流程
1. 日报模式
1. 日报模式
输入:无(全自动) 或 指定关键词清单
输出:
- 关键词排名 diff 表(今日 vs 昨日基线)
- Google 索引数
- llms.txt 状态
- GA4 覆盖状态
- 🚨 异常提示(跌出 top 100、整体刷新)
输入:无(全自动) 或 指定关键词清单
输出:
- 关键词排名差异表(今日 vs 昨日基线)
- Google 索引数
- llms.txt 状态
- GA4 覆盖状态
- 🚨 异常提示(跌出 top 100、整体刷新)
2. 单词诊断
2. 单关键词诊断
输入:1 个关键词
过程:
- 跑 4-5 个 long-tail 变体 SERP
- 检查目标 URL 是否 HTTP 200
- 用 查询确认是否索引
site: - 对比 3 天前的数据(如果有历史)
- 2026-06-24 新增检查:
- 确认关键词在 volume 300–1,000 / KD 5–35 区间(若不在,标注为低优先级)
- 检查该页面 title 是否含 best/free/top/guide+年份(CTR 公式)
- 检查该页面内链密度是否超 2-3/段
- 确认页面有 BreadcrumbList schema
- 确认 last-updated 日期已展示(freshness 信号) 输出:雪崩 / 个别 / SERP 刷新 / 死链 四选一,附 2026 合规评分
输入:1 个关键词
过程:
- 运行 4-5 个长尾变体 SERP 查询
- 检查目标 URL 是否返回 HTTP 200
- 用 查询确认是否已被索引
site: - 对比 3 天前的数据(如有历史记录)
- 2026-06-24 新增检查:
- 确认关键词处于 volume 300–1,000 / KD 5–35 区间(若不在此区间,标注为低优先级)
- 检查该页面 title 是否含 best/free/top/guide+年份(CTR 公式要求)
- 检查该页面内链密度是否超过 2-3/段
- 确认页面有 BreadcrumbList schema
- 确认 last-updated 日期已展示(新鲜度信号) 输出:雪崩 / 个别波动 / SERP 刷新 / 死链 四选一,附 2026 合规评分
3. Canonical 批量修复
3. Canonical 批量修复
输入:同主题的 N 篇文章 + 1 个 master URL
过程:替换每篇 frontmatter 里的 → master,GitHub API PUT
安全护栏:
canonical_url:- 只改 下的 .md
_posts/ - 每篇 commit 独立(方便回滚)
- 跳过 ja/ko(hreflang 替代,保持 self-canonical)
输入:同主题的 N 篇文章 + 1 个主 URL(master URL)
过程:替换每篇文章 frontmatter 里的 → master,通过 GitHub API 执行 PUT 请求
安全护栏:
canonical_url:- 只改 下的 .md 文件
_posts/ - 每篇文章独立提交 commit(方便回滚)
- 跳过 ja/ko 语言版本(用 hreflang 替代,保持自引用 canonical)
4. 社媒救援
4. 社媒文章救援
输入:1 个雪崩 URL
动作:
- a. 重写 title:主关键词前置,长度 ≤ 60 字,必须含 best/free/top/guide+年份(2026-06-24 CTR 公式)
- b. 重写 meta description:关键词 rephrase(如 "figma alternative" → "the alternative to Figma")
- c. 从 top-3 高权重文章注入内链(带 anchor text = 目标关键词),每段 ≤ 2-3 个内链上限
- d. 主动添加 1-2 个竞品 blog 外链(提信用分 → 提 ranking)
- e. 检查并添加/更新【最后更新日期】(freshness 信号)
- f. 确认 BreadcrumbList schema 已配置
- g. 记录修改前后到日志
输入:1 个排名雪崩的 URL
动作:
- a. 重写 title:主关键词前置,长度 ≤ 60 字符,必须含 best/free/top/guide+年份(2026-06-24 CTR 公式)
- b. 重写 meta description:关键词改写(如 "figma alternative" → "the alternative to Figma")
- c. 从排名前 3 的高权重文章注入内链(锚文本 = 目标关键词),每段内链上限 ≤ 2-3 个
- d. 主动添加 1-2 个竞品博客外链(提升信用分 → 提升排名)
- e. 检查并添加/更新【最后更新日期】(新鲜度信号)
- f. 确认 BreadcrumbList schema 已配置
- g. 记录修改前后到日志
API 依赖
API 依赖
| Service | Env var | 用途 |
|---|---|---|
| DataForSEO | | SERP 查询 |
| GitHub PAT | | 读写 |
完整 key 模板见 。
docs/api-keys-template.md| 服务 | 环境变量 | 用途 |
|---|---|---|
| DataForSEO | | SERP 查询 |
| GitHub PAT | | 读写 |
完整密钥模板见 。
docs/api-keys-template.mdSERP 查询模板
SERP 查询模板
python
import urllib.request, json
def serp(kw, loc=2840, lang="en", depth=100):
key = os.environ["DATAFORSEO_B64"]
payload = json.dumps([{"keyword": kw, "location_code": loc,
"language_code": lang, "device": "desktop",
"depth": depth}]).encode()
req = urllib.request.Request(
"https://api.dataforseo.com/v3/serp/google/organic/live/advanced",
data=payload,
headers={"Authorization": f"Basic {key}",
"Content-Type": "application/json"})
with urllib.request.urlopen(req, timeout=40) as r:
return json.loads(r.read())常用 location_code:
- 2840 US / 2826 UK / 2392 JP / 2410 KR / 2156 CN(无效,中国不返回)
python
import urllib.request, json
def serp(kw, loc=2840, lang="en", depth=100):
key = os.environ["DATAFORSEO_B64"]
payload = json.dumps([{"keyword": kw, "location_code": loc,
"language_code": lang, "device": "desktop",
"depth": depth}]).encode()
req = urllib.request.Request(
"https://api.dataforseo.com/v3/serp/google/organic/live/advanced",
data=payload,
headers={"Authorization": f"Basic {key}",
"Content-Type": "application/json"})
with urllib.request.urlopen(req, timeout=40) as r:
return json.loads(r.read())常用 location_code:
- 2840 美国 / 2826 英国 / 2392 日本 / 2410 韩国 / 2156 中国(无效,中国地区不返回结果)
执行脚本
执行脚本
实际可执行的脚本在 下:
scripts/- — 完整日报
daily-report.py - — canonical 批量合并
canonical-fix.py - — 社媒文章救援
rescue-post.py - — 单关键词诊断(roadmap,暂用下方「单词诊断」流程替代)
diag-keyword.py
每个脚本独立可跑。调用时优先用 Bash 工具,不要重写脚本。
实际可执行的脚本在 目录下:
scripts/- — 完整日报生成
daily-report.py - — canonical 批量合并修复
canonical-fix.py - — 社媒文章救援
rescue-post.py - — 单关键词诊断(规划中,暂用下方「单关键词诊断」流程替代)
diag-keyword.py
每个脚本独立可运行。调用时优先使用 Bash 工具,请勿重写脚本。
输出规范
输出规范
- 先给表格,再给结论
- 差异用箭头:/
#6 ↑#19 ↓↓ - 超过 3 项异常 → 单独开"🚨 异常"一节
- 所有排名必须带 location_code,不要假设
- 先展示表格,再给出结论
- 差异用箭头标识:/
#6 ↑#19 ↓↓ - 异常超过 3 项 → 单独开设"🚨 异常"章节
- 所有排名必须附带 location_code,请勿默认假设
级联推荐
级联推荐
- 发现 cannibalization(同一关键词多篇排名接近) → 做 canonical 整合
gr-blog-post - 发现 N 个关键词同日跌出 top 100 → 先等 24h,不要硬改内容
- 发现新关键词机会(长尾 top 30) → 扩写
gr-blog-post
- 发现 cannibalization(同一关键词多篇文章排名接近) → 调用 做 canonical 整合
gr-blog-post - 发现多个关键词同日跌出 top 100 → 先等待 24h,不要硬改内容
- 发现新关键词机会(长尾词排名进入 top 30) → 调用 扩写
gr-blog-post
反模式
反模式
- ❌ 不要用 /
grep扫find,改用 GitHub Contents API_posts/ - ❌ 不要在生产环境直接 —— 用 Contents API 的 PUT
git push - ❌ 不要一次 serp 50 个关键词 —— 批量过大易触发 rate limit,按 6-10 个一批
- ❌ canonical 改到 master 后不要立刻 force Google 重新索引 —— 等 3-7 天自然爬取
- ❌ 不要用 /
grep扫描find目录,改用 GitHub Contents API_posts/ - ❌ 不要在生产环境直接执行 —— 使用 Contents API 的 PUT 请求
git push - ❌ 不要单次查询 50 个关键词的 SERP 数据 —— 批量过大易触发速率限制,建议按 6-10 个一批处理
- ❌ canonical 指向 master URL 后不要立刻强制 Google 重新索引 —— 等待 3-7 天自然爬取
Monthly Full-Site Audit Workflow
月度全站审计流程
Validated 2026-05-07 on 58 pages: caught 43 SERP-truncating titles + 36 schema warns + 27 stop-word slugs in a single 30-min pass. Single layout-level fix (commit) resolved 20 of 43 title issues.24a0410e
Run once per month before . Output: HTML report + machine-readable findings.json archived to .
phase2-monthly-checkpoint~/Downloads/seo-audit/audit-{YYYY-MM-DD}.json2026-05-07 已在 58 个页面验证:仅用 30 分钟就发现了 43 个可能导致 SERP 截断的标题 + 36 个 schema 警告 + 27 个含停用词的 slug。通过一次布局级修复(提交记录)解决了 43 个标题问题中的 20 个。24a0410e
每月执行一次,在 之前完成。输出:HTML 报告 + 机器可读的 findings.json,归档至 。
phase2-monthly-checkpoint~/Downloads/seo-audit/audit-{YYYY-MM-DD}.jsonStage 1 — Discovery (5 min)
阶段 1 — 发现(5 分钟)
python
import urllib.request, re
sm = urllib.request.urlopen("https://gingiris.tools/sitemap.xml").read().decode()
urls = [u for u in re.findall(r"<loc>([^<]+)</loc>", sm) if "/blog/" in u]python
import urllib.request, re
sm = urllib.request.urlopen("https://gingiris.tools/sitemap.xml").read().decode()
urls = [u for u in re.findall(r"<loc>([^<]+)</loc>", sm) if "/blog/" in u]typically 50-70 URLs
通常为 50-70 个 URL
undefinedundefinedStage 2 — Parallel Audit (20 min for 60 pages, 4 threads)
阶段 2 — 并行审计(60 个页面约 20 分钟,4 线程)
Use the adopted seo-audit-skill scripts in :
scripts/bash
undefined使用 目录下已采用的 seo-audit-skill 脚本:
scripts/bash
undefinedFor each URL — run 2 scripts in parallel
针对每个 URL —— 并行运行 2 个脚本
python3 scripts/check-page.py URL --timeout 20 # title, H1, meta, canonical, slug, alt, keyword placement
python3 scripts/check-schema.py URL --timeout 20 # JSON-LD validation
Or batch with Python's `concurrent.futures.ThreadPoolExecutor(max_workers=4)`. Don't go higher than 4 — GitHub Pages CDN throttles aggressive parallel hits.
Each script outputs structured JSON envelope:
```json
{"field": {"status": "pass|warn|fail|info", "detail": "...", "llm_review_required": false}}python3 scripts/check-page.py URL --timeout 20 # 检查标题、H1、meta 标签、canonical、slug、图片 alt 文本、关键词布局
python3 scripts/check-schema.py URL --timeout 20 # JSON-LD 验证
或使用 Python 的 `concurrent.futures.ThreadPoolExecutor(max_workers=4)` 进行批量处理。线程数请勿超过 4 —— GitHub Pages CDN 会限制过于频繁的并行请求。
每个脚本输出结构化 JSON 包:
```json
{"field": {"status": "pass|warn|fail|info", "detail": "...", "llm_review_required": false}}Stage 3 — Aggregate Findings
阶段 3 — 汇总发现结果
Bucket by category:
- Title length > 70 chars (SERP truncation risk)
- H1 length > 70 chars (mobile readability)
- Meta description < 80 or > 170 chars
- Schema warns by @type (BlogPosting, Article, Organization)
- Canonical issues (mismatch with final URL)
- Slug issues (stop words, uppercase, missing keyword)
- Image alt text missing on content images
Save aggregated counts + per-issue URL lists to .
findings.json按类别分类:
- 标题长度 > 70 字符(存在 SERP 截断风险)
- H1 长度 > 70 字符(移动端可读性问题)
- Meta 描述 < 80 或 > 170 字符
- Schema 警告 按 @type 分类(BlogPosting、Article、Organization)
- Canonical 问题(与最终 URL 不匹配)
- Slug 问题(含停用词、大写字母、缺失关键词)
- 图片 alt 文本 内容图片缺失 alt 文本
将汇总统计数 + 每个问题对应的 URL 列表保存至 。
findings.jsonStage 4 — Layered Fix Strategy (HIGH ROI ORDER)
阶段 4 — 分层修复策略(高 ROI 优先)
1️⃣ Layout-level fixes first (1 commit, fixes 20+ pages):
- Schema bugs in
_layouts/default.html - Site-name suffix in tag
<title> - Missing from
dateModifiedfrontmatterlast_modified_at - Organization / Publisher / contactPoint completeness
2️⃣ Config-level fixes (1 commit, fixes site-wide):
- — logo URL (must be absolute), twitter, social, author structure
_config.yml
3️⃣ Per-article batch fixes (1 commit per file, parallelizable):
- Trim long titles while preserving keyword (target ≤ 70 chars, ideal 50-60)
- Trim long H1s (target ≤ 70 chars)
- Expand short meta descriptions (target 120-160 chars)
- Add missing Citable Statistics blocks for top GSC-impression pages
4️⃣ Skip these (low ROI):
- Slug stop words (changing breaks 301)
- Old articles with <50 imp/month (low traffic = low fix priority)
1️⃣ 优先进行布局级修复(一次提交,修复 20+ 页面):
- 中的 Schema 漏洞
_layouts/default.html - 标签中的站点名称后缀
<title> - 未从 frontmatter 获取
last_modified_atdateModified - Organization / Publisher / contactPoint 信息完整性
2️⃣ 配置级修复(一次提交,全站生效):
- —— logo URL(必须为绝对路径)、twitter、社交账号、作者结构
_config.yml
3️⃣ 单篇文章批量修复(每篇文件一次提交,可并行处理):
- 修剪过长标题,同时保留关键词(目标 ≤ 70 字符,理想长度 50-60)
- 修剪过长 H1(目标 ≤ 70 字符)
- 扩充过短的 Meta 描述(目标 120-160 字符)
- 为 GSC 展示量靠前的页面添加缺失的可引用统计模块
4️⃣ 以下内容可跳过(低 ROI):
- Slug 中的停用词(修改会破坏 301 重定向)
- 月展示量 <50 的旧文章(流量低,修复优先级低)
Stage 5 — Verify (after Jekyll rebuild ~60-90s)
阶段 5 — 验证(Jekyll 重建后约 60-90 秒)
Re-run on a sample page. Confirm for at least:
Article · BlogPosting · Organization · FAQPage
check-schema.pystatus: pass重新运行 检查样本页面。确认至少以下类型的 :
Article · BlogPosting · Organization · FAQPage
check-schema.pystatus: passStage 6 — Archive
阶段 6 — 归档
Commit to for trend tracking.
Add 2-5 atoms documenting any new lessons learned.
findings.json~/Downloads/seo-audit/audit-{YYYY-MM-DD}.json将 归档至 用于趋势跟踪。
添加 2-5 条记录,记录任何新学到的经验。
findings.json~/Downloads/seo-audit/audit-{YYYY-MM-DD}.jsonHARD RULE (anti-hallucination guardrail)
严格规则(防幻觉护栏)
Adopted from JeffLi1993/seo-audit-skill — strict whitelist pattern.
⛔ Output ONLY the checks defined in the audit script's JSON envelope.
- Do NOT add "bonus" checks not in the script output
- Do NOT contradict the script's field unless you have additional observable evidence
status - Do NOT invent metrics like "EEAT score 89" — third-party scoring tools are unofficial (per Google's 2026 guidance)
- Do NOT include checks marked in your judgment commentary — the script's
llm_review_required: falseis finalstatus - If , make explicit judgment, document reasoning, then update status
llm_review_required: true
The script envelope is the single source of truth. Treat it as a strict whitelist.
改编自 JeffLi1993/seo-audit-skill —— 严格白名单模式。
⛔ 仅输出审计脚本 JSON 包中定义的检查项。
- 请勿添加脚本输出中未包含的"额外"检查项
- 请勿与脚本的 字段矛盾,除非你有额外的可观测证据
status - 请勿编造诸如"EEAT 分数 89"之类的指标——第三方评分工具是非官方的(根据 Google 2026 年指南)
- 请勿在判断评论中包含标记为 的检查项——脚本的
llm_review_required: false为最终结果status - 如果 ,请做出明确判断,记录推理过程,然后更新状态
llm_review_required: true
脚本的 JSON 包是唯一可信来源。将其视为严格的白名单。
Companion skill
配套 Skill
For single-page audits (not full-site), the same scripts power JeffLi1993/seo-audit-skill which produces a polished HTML audit report.
Install as a complementary skill if you want client-presentable per-page audits.
对于单页面审计(非全站),相同的脚本支持 JeffLi1993/seo-audit-skill,可生成精美的 HTML 审计报告。
如果需要面向客户的单页面审计报告,请安装此配套 Skill。
Platform Description
平台说明
EN: Daily SEO/GEO patrol skill (2026-06-24 standards). Tracks SERP keyword rankings (DataForSEO, filters volume 300–1,000 / KD 5–35), checks Google index count, llms.txt accessibility, GA4 tag deployment + AI traffic channel grouping. Rescues underperforming posts by applying title formula (best/free/top/guide+year), keyword rephrase in meta description, internal link density enforcement (≤2–3 per paragraph), competitor blog external link injection, BreadcrumbList schema check, and freshness date update. Fixes canonical issues.
ZH: 每日 SEO/GEO 巡逻 skill(2026-06-24 标准)。追踪 SERP 排名(DataForSEO,volume 300–1,000 / KD 5–35 筛选),检查 Google 索引数、llms.txt 可达性、GA4 部署 + AI 流量频道分组。救援雪崩文章:title 含 best/free/top/guide+年份、meta description 关键词 rephrase、内链密度 ≤2–3/段、主动 cite 竞品外链、BreadcrumbList schema、freshness 日期更新、canonical 修复。
JA: デイリーSEO/GEOパトロールskill(2026-06-24基準)。SERPランキング追跡(DataForSEO、volume 300–1,000/KD 5–35フィルター)、Googleインデックス数、llms.txt確認、GA4タグ+AIトラフィックチャンネル設定。スノーアバランシュ記事の救援:タイトルにbest/free/top/guide+年、meta descriptionキーワードrephrase、内部リンク密度≤2–3/段落、競合ブログ外部リンク挿入、BreadcrumbListスキーマ、freshness日付更新、canonical修正。
KO: 일일 SEO/GEO 순찰 skill(2026-06-24 기준). SERP 순위 추적(DataForSEO, volume 300–1,000/KD 5–35 필터), Google 인덱스 수, llms.txt 접근성, GA4 태그 + AI 트래픽 채널 그룹 확인. 부진 게시물 복구: 제목 best/free/top/guide+연도 적용, meta description 키워드 rephrase, 내부 링크 밀도 ≤2–3/단락, 경쟁사 블로그 외부링크 삽입, BreadcrumbList 스키마, freshness 날짜 업데이트, canonical 수정.
英文: 每日 SEO/GEO 巡逻 Skill(2026-06-24 标准)。追踪 SERP 关键词排名(DataForSEO,筛选 volume 300–1,000 / KD 5–35),检查 Google 索引数、llms.txt 可达性、GA4 标签部署+AI 流量渠道分组。通过应用标题公式(best/free/top/guide+年份)、Meta 描述关键词改写、内链密度限制(≤2–3 个/段落)、注入竞品博客外链、BreadcrumbList schema 检查、新鲜度日期更新来挽救表现不佳的文章。修复 Canonical 问题。
中文: 每日 SEO/GEO 巡逻 Skill(2026-06-24 标准)。追踪 SERP 排名(DataForSEO,volume 300–1,000 / KD 5–35 筛选),检查 Google 索引数、llms.txt 可达性、GA4 部署 + AI 流量频道分组。救援雪崩文章:title 含 best/free/top/guide+年份、meta description 关键词 rephrase、内链密度 ≤2–3/段、主动 cite 竞品外链、BreadcrumbList schema、freshness 日期更新、canonical 修复。
日文: デイリーSEO/GEOパトロールskill(2026-06-24基準)。SERPランキング追跡(DataForSEO、volume 300–1,000/KD 5–35フィルター)、Googleインデックス数、llms.txt確認、GA4タグ+AIトラフィックチャンネル設定。スノーアバランシュ記事の救援:タイトルにbest/free/top/guide+年、meta descriptionキーワードrephrase、内部リンク密度≤2–3/段落、競合ブログ外部リンク挿入、BreadcrumbListスキーマ、freshness日付更新、canonical修正。
韩文: 일일 SEO/GEO 순찰 skill(2026-06-24 기준). SERP 순위 추적(DataForSEO, volume 300–1,000/KD 5–35 필터), Google 인덱스 수, llms.txt 접근성, GA4 태그 + AI 트래픽 채널 그룹 확인. 부진 게시물 복구: 제목 best/free/top/guide+연도 적용, meta description 키워드 rephrase, 내부 링크 밀도 ≤2–3/단락, 경쟁사 블로그 외부링크 삽입, BreadcrumbList 스키마, freshness 날짜 업데이트, canonical 수정.