作るもの
このtutorialでは、Claude Code GitHub Actionsをcomment-onlyのSEO/GEO PR reviewerとして使う方法を示します。初心者向けの安全なversionでは、PRを書き換えません。riskのあるchangesをreviewし、file references付きのfindingsを残し、merge前にhuman reviewerが何をverifyすべきかを伝えます。
作成するものは次のとおりです。
.github/workflows/claude-seo-geo-review.yml
.github/seo-geo-review-prompt.md
CLAUDE.md additions for PR review
seo-geo/pr-review/checklist.md
metadata、schema、page templates、internal links、robots、sitemaps、canonical logic、redirects、analytics、docs、大きなcontent batchesに触れるpull requestsで使います。
Step 1: どのPRにreviewが必要か決める
path filtersから始めます。小さなdependency PRやstyling PRのすべてでAI reviewを走らせないでください。
| PR file pattern | 重要な理由 |
|---|---|
|
| titles、descriptions、canonical URLs、robots tags |
|
| structured dataとrich-result eligibility |
|
| crawlとindexing access |
|
| redirects、localization、route behavior |
|
| page contentとanswer extraction |
|
| hreflangとtranslated metadata |
|
| measurement integrity |
checklist fileを作ります。
mkdir -p .github seo-geo/pr-review
cat > seo-geo/pr-review/checklist.md <<'EOF2'
# SEO/GEO PR Review Checklist
Review risks:
- title, meta description, canonical, robots, noindex
- sitemap, redirects, route generation, localization
- schema and JSON-LD validity
- internal links and navigation changes
- answer extraction: concise answer, evidence, FAQ, tables
- unsupported claims, invented proof, outdated stats
- analytics and conversion tracking changes
- build, lint, tests, or preview validation
Review output:
- severity: blocking / important / note
- file reference
- risk
- why it matters for SEO/GEO
- verification step
EOF2
Step 2: review promptをfileとして書く
promptをfileにしておくと、後で改善しやすくなります。
cat > .github/seo-geo-review-prompt.md <<'EOF2'
Review this pull request for SEO and GEO risk.
Act as a conservative reviewer. Do not rewrite the PR unless explicitly asked.
Focus on:
- title, meta description, canonical, robots, noindex
- sitemap generation, redirects, route changes, localization, hreflang
- schema / JSON-LD validity and unsupported claims
- internal links, navigation, breadcrumbs, related content
- content that is too generic for AI answer extraction
- missing evidence, screenshots, examples, or citations
- analytics / GTM / GA4 changes
- build, lint, test, preview, and crawl validation gaps
Return findings in this format:
## Blocking
- `file`: risk, why it matters, exact verification step
## Important
- `file`: risk, why it matters, exact verification step
## Notes
- `file`: smaller improvement or follow-up
If there are no findings, say that explicitly and list residual risks.
EOF2
Step 3: Claude Codeに現在のworkflowを生成させる
Claude Code GitHub Actions setupは、current action package、GitHub app setup、repository permissions、secretsによって変わることがあります。静かに推測せず、Claude Codeにあなたのrepo向けworkflowを生成させます。
Help me set up Claude Code GitHub Actions for comment-only SEO/GEO PR review.
Use:
- `.github/seo-geo-review-prompt.md`
- `seo-geo/pr-review/checklist.md`
Requirements:
- Trigger only on pull requests that touch SEO/GEO-relevant paths.
- Comment findings on the PR.
- Do not push commits.
- Do not publish, deploy, submit URLs, or change secrets.
- Use the current Claude Code GitHub Action syntax from the installed/current docs.
- Tell me which GitHub app, permissions, and secrets are required.
- Create the workflow file only after explaining the plan.
Step 4: starter workflow shape
final workflowは現在のClaude Code GitHub Action versionによって変わりますが、shapeは次に近いものになります。
name: Claude SEO/GEO PR Review
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'src/**'
- 'app/**'
- 'pages/**'
- 'content/**'
- 'public/robots.txt'
- '**/sitemap*'
- '**/*schema*'
- '**/*seo*'
- '**/*metadata*'
- '.github/seo-geo-review-prompt.md'
- 'CLAUDE.md'
permissions:
contents: read
pull-requests: write
issues: write
jobs:
seo-geo-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Replace this with the current Claude Code GitHub Action block
# recommended by Anthropic's docs for your account.
- name: Claude SEO/GEO review
uses: anthropics/claude-code-action@beta
with:
prompt_file: .github/seo-geo-review-prompt.md
allowed_tools: 'Bash(git diff:*),Bash(git status:*),Bash(cat:*),Bash(ls:*)'
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
commit前に、official Claude Code GitHub Actions docsでaction name、inputs、authentication mode、permissionsを確認します。organizationがAPI key workflowではなくClaude GitHub appを使う場合は、そのsetupに従います。
Step 5: workflowをreview-onlyにする
最初のversionは退屈であるべきです。
contents: read、writeではない- PR commentsは許可
- deployment tokensなし
- CMS tokensなし
- Search ConsoleやBing submit credentialsなし
- automatic commitsなし
- merge permissionなし
Claudeが広いpermissionsを提案したら、次を依頼します。
Reduce this GitHub Actions workflow to comment-only PR review. Explain every permission. Remove anything required for pushing commits, deployment, publishing, or URL submission.
Step 6: 小さなPRでtestする
safe titleまたはmarkdown pageを1つ変更するbranchを作ります。
git checkout -b test/claude-seo-geo-review
小さなcontent changeを行い、PRを開いたらcommentします。
@claude Review this PR for SEO/GEO risk using `.github/seo-geo-review-prompt.md`. Do not make changes.
良いfindingは次のようになります。
Important - `src/lib/seo.ts`: the canonical helper now removes locale prefixes. This may cause localized pages to canonicalize to English URLs. Verify canonical/hreflang output on one English page and one translated page before merge.
弱いfindingは次のようなものです。
Improve SEO.
commentsが曖昧なら、prompt fileとchecklistを締め直します。
Step 7: repo-specific rulesをCLAUDE.mdに追加する
repo rulesが明示されているほど、ClaudeのPR reviewは良くなります。
## PR review rules for SEO/GEO
When reviewing PRs:
- findings first, ordered by severity
- include file references and verification steps
- do not request vague SEO improvements
- never invent product claims, customer proof, ranking data, or statistics
- treat robots, sitemap, canonical, noindex, schema, redirects, analytics, and localization changes as high risk
- if no issues are found, state residual risks and testing gaps
Step 8: comment-onlyからsuggested patchesへ慎重に進む
comment-only reviewsが役に立つまで、自動編集を許可しないでください。許可する場合でも、patch suggestionsはlow-risk itemsに限定します。
| Safe-ish patch | Still needs review |
|---|---|
| missing alt text | yes |
| duplicate meta description on one page | yes |
| broken internal link in markdown | yes |
| typo in FAQ heading | yes |
次はhuman-onlyにします。
- redirects and migrations
- robots/noindex changes
- canonical policy
- analytics and tag manager changes
- legal、medical、financial、competitor claims
- case-study proofとcustomer logos
FAQ
すべてのPRでClaude reviewをtriggerすべきですか?
いいえ。path filtersを使います。SEO、content、routing、schema、localization、analytics、page-template changesでtriggerします。
GitHub ActionsはSEO reviewerを置き換えますか?
いいえ。repeatable risksを捕まえ、PR内にchecklistを作ります。strategy、claims、release timingは人間が決めます。
actionがsecretsにaccessできない場合はどうしますか?
workflowをcomment-onlyに保ち、official Claude Code GitHub Actions setupに沿ってauthenticationを修正します。API keysをworkflow filesやPR commentsに貼り付けてはいけません。
Claude Code SEO/GEO 学習パス
この記事は Claude Code SEO/GEO オペレーターシリーズの一部です。ゼロから構築する場合は、次の順番で進めてください。
- Claude CodeでSEOを自動化する方法
- Claude Code SEO/GEO workflow cockpitを作る方法
- CLAUDE.mdとMemoryをSEO/GEO workflowに使う方法
- Claude Code VS Code extensionでSEO pageを更新する方法
- 2026年版:Best GEO Claude Code Skills
- Claude Code SubagentsをGEO researchに使う方法
- Claude Code HooksをSEO/GEO quality gatesとして使う方法
- MCPでClaude CodeをSEO dataに接続する方法
- Claude Code GitHub ActionsでSEO/GEO reviewsを行う方法
- Claude Codeで毎日のSEO/GEO monitoringを行う方法
参考情報
- Anthropic Claude Code docs: GitHub Actions、Claude Code overview。
Author: Tessa Clarke, Auspiaで120以上のeditorial systemsを支援してきたcontent governance lead。Tessaはreview systems、publishing standards、安全なAI-assisted content operationsについて執筆しています。