Install
openclaw skills install @gingiris-1031/gr-seo-patrol每日 SEO/GEO 巡逻。覆盖:SERP 关键词排名追踪(DataForSEO)、Google 索引数统计、llms.txt 可达性、 GA4 tag 部署检测、PH canonical 合并修复、社媒关键词雪崩救援(title 重写 + 内链注入)。 当用户说"跑 SEO 日报"、"检查排名"、"某关键词掉了"、"修 canonical"、"加内链"时调用。
openclaw skills install @gingiris-1031/gr-seo-patrol| 场景 | 动作 |
|---|---|
| "跑今日 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 个关键词 过程:
site: 查询确认是否索引输入:同主题的 N 篇文章 + 1 个 master URL
过程:替换每篇 frontmatter 里的 canonical_url: → master,GitHub API PUT
安全护栏:
_posts/ 下的 .md输入:1 个雪崩 URL 动作:
| Service | Env var | 用途 |
|---|---|---|
| DataForSEO | DATAFORSEO_B64 | SERP 查询 |
| GitHub PAT | GITHUB_TOKEN | 读写 _posts/ |
完整 key 模板见 docs/api-keys-template.md。
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:
实际可执行的脚本在 scripts/ 下:
daily-report.py — 完整日报canonical-fix.py — canonical 批量合并rescue-post.py — 社媒文章救援diag-keyword.py — 单关键词诊断(roadmap,暂用下方「单词诊断」流程替代)每个脚本独立可跑。调用时优先用 Bash 工具,不要重写脚本。
#6 ↑ / #19 ↓↓gr-blog-post 做 canonical 整合gr-blog-post 扩写grep / find 扫 _posts/,改用 GitHub Contents APIgit push —— 用 Contents API 的 PUTValidated 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
24a0410e) resolved 20 of 43 title issues.
Run once per month before phase2-monthly-checkpoint. Output: HTML report + machine-readable findings.json archived to ~/Downloads/seo-audit/audit-{YYYY-MM-DD}.json.
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
Use the adopted seo-audit-skill scripts in scripts/:
# For each URL — run 2 scripts in parallel
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:
{"field": {"status": "pass|warn|fail|info", "detail": "...", "llm_review_required": false}}
Bucket by category:
Save aggregated counts + per-issue URL lists to findings.json.
1️⃣ Layout-level fixes first (1 commit, fixes 20+ pages):
_layouts/default.html<title> tagdateModified from last_modified_at frontmatter2️⃣ Config-level fixes (1 commit, fixes site-wide):
_config.yml — logo URL (must be absolute), twitter, social, author structure3️⃣ Per-article batch fixes (1 commit per file, parallelizable):
4️⃣ Skip these (low ROI):
Re-run check-schema.py on a sample page. Confirm status: pass for at least:
Article · BlogPosting · Organization · FAQPage
Commit findings.json to ~/Downloads/seo-audit/audit-{YYYY-MM-DD}.json for trend tracking.
Add 2-5 atoms documenting any new lessons learned.
Adopted from JeffLi1993/seo-audit-skill — strict whitelist pattern.
⛔ Output ONLY the checks defined in the audit script's JSON envelope.
status field unless you have additional observable evidencellm_review_required: false in your judgment commentary — the script's status is finalllm_review_required: true, make explicit judgment, document reasoning, then update statusThe script envelope is the single source of truth. Treat it as a strict whitelist.
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.