如何把 CLAUDE.md 和 Memory 用在 SEO/GEO Workflows

撰寫 beginner-safe CLAUDE.md,分離 durable rules 與 SOPs,並 audit Claude Code memory,避免保存風險資料。

原則:把穩定 SEO/GEO behavior 放在 CLAUDE.md,不要每個 prompt 重講

Claude Code 有兩個和 SEO/GEO work 相關的 memory surfaces:CLAUDE.md files 和 auto memory。Anthropic docs 說明,CLAUDE.md files 是 sessions 開始時載入的 markdown instruction files,而 auto memory 可以保留從 corrections 學到的內容。對 growth teams 來說,實用規則很簡單:把 project standards 放進 CLAUDE.md;讓 auto memory 只記小型 personal preferences,不要記 business-critical policy。

這篇文章會示範如何寫一份 CLAUDE.md,讓 Claude Code 能用於 SEO、GEO、content refreshes、schema edits 和 analytics-driven reviews。

CLAUDE.md 與 Memory 在 SEO/GEO workflows 中的安全分工

圖說:穩定規則放 CLAUDE.md,長 SOP 放檔案,memory 只保留輕量偏好。

CLAUDE.md 應該放什麼

好的 SEO/GEO CLAUDE.md 應該短到仍然實用,也要 specific 到能避免 generic output。

使用這份 starter file:

# CLAUDE.md

## Website context
- Brand: [brand]
- Category: [category]
- Primary audience: [audience]
- Main offer: [demo / tool / consultation / product]
- Production domain: https://example.com

## SEO/GEO standards
- Do not invent customer logos, statistics, testimonials, awards, or legal claims.
- Prefer clear answer blocks, comparison tables, evidence sections, and FAQ only when useful.
- Every important page should have title, meta description, canonical, H1, internal links, and schema review.
- For GEO, make brand facts, product category, use cases, alternatives, and proof easy to extract.

## Files and commands
- Pages live in: [path]
- Metadata lives in: [path]
- Components live in: [path]
- Content lives in: [path]
- Run before final answer: [npm run build / pnpm build / etc.]

## Approval boundaries
- Ask before changing pricing, legal copy, redirects, robots.txt, canonical strategy, analytics scripts, or schema type.
- Never publish or deploy without explicit approval.
- Mark missing evidence as TODO instead of filling it in.

/memory 做 audit,不要把它當魔法

Claude Code memory docs 包含 /memory,可以查看和編輯 memory。對 SEO/GEO teams,建議安排每月 memory audit:

Open /memory and help me audit whether any saved memory is outdated, too broad, or unsafe for SEO/GEO work. Suggest deletions or edits, but do not change project files yet.

為什麼重要:memory 可以讓 repeated work 更順,但 stale brand positioning 或舊 deployment commands 會造成 bad edits。把 memory 當 context,不是 compliance。如果需要 hard rule,請用 hooks 或 review gates。

把 durable rules 和 procedures 分開

不要把 CLAUDE.md 塞滿 long SOPs。把它當 constitution。Long procedures 放在 Claude 可以 reference 的 files:

seo-geo/qa/content-refresh-sop.md
seo-geo/qa/schema-review-sop.md
seo-geo/qa/ai-visibility-check.md
seo-geo/briefs/page-brief-template.md

然後把這段加進 CLAUDE.md

## Reusable SOPs
- For content refresh tasks, read `seo-geo/qa/content-refresh-sop.md` first.
- For schema edits, read `seo-geo/qa/schema-review-sop.md` first.
- For AI visibility checks, read `seo-geo/qa/ai-visibility-check.md` first.

這能讓 active memory 保持小而精,同時保留 detailed operating knowledge。

初始化 SEO/GEO memory 的 prompt

每個 project 使用一次:

Read the repository and draft a project-specific CLAUDE.md for SEO/GEO work.

Do not overwrite files yet. Propose the file first.

Include:
1. Website context inferred from the repo, marked as inferred.
2. Paths for pages, content, metadata, schema, and routing.
3. Build/lint/test commands detected from package files.
4. SEO/GEO standards for content, metadata, schema, internal links, llms.txt, robots, and sitemap.
5. Approval boundaries for risky changes.
6. A section listing unknowns I must confirm.

Review 後,請 Claude 建立 file 並跑 tiny verification task:

Create CLAUDE.md from the approved draft. Then summarize the instructions you loaded and explain how they will change your next SEO/GEO task.

大型網站的 nested memory

大型網站通常需要 docs、blog、product pages 和 localized pages 使用不同 rules。當 platform 支援時,把 local instruction files 放在 specialized work 附近;或使用 main file reference 的 folder-specific SOPs。

Example:

Site area

不同 rules

/blog

Editorial tone、author byline、FAQ rules、internal link policy

/docs

API accuracy、version warnings、code sample validation

/pricing

Claims 和 plan wording 需要 approval

/en, /ja, /pt

Localization、hreflang、translated image policy

問 Claude:

Inspect the site sections and recommend whether we need folder-specific SEO/GEO instructions. Keep the global CLAUDE.md short; propose separate SOP files only where they reduce mistakes.

要避免的錯誤

  1. 把 secrets 放進 CLAUDE.md
  2. 保存 outdated positioning,卻從不 review。
  3. 寫 vague rules,例如「make content high quality」。
  4. 讓 memory 取代 tests、hooks 或 human approval。
  5. 把每個過去偏好都加進去,直到 file 無法閱讀。

FAQ

CLAUDE.md 應該包含 keywords 嗎?

可以包含 core category language 和 strategic query themes,但完整 keyword lists 應放在 separate dated files。Keyword data 會變;project rules 應該穩定。

Claude Code 可以記住 analytics credentials 嗎?

不行。Credentials 應放在 approved local environment files、MCP configuration 或 platform secrets。不要貼進 memory files。

CLAUDE.md 多久更新一次?

在 repeated mistakes、architecture changes、command changes 或 positioning changes 後更新。其他情況每月 review 一次。

Claude Code SEO/GEO 學習路徑

這篇屬於 Claude Code SEO/GEO operator series。如果你從零建立 workflow,請照這個順序:

  1. 如何用 Claude Code 做 SEO Automation
  2. 如何建立 Claude Code SEO/GEO Workflow Cockpit
  3. 如何把 CLAUDE.md 和 Memory 用在 SEO/GEO Workflows
  4. 如何用 Claude Code VS Code Extension 更新 SEO Pages
  5. 2026 年最佳 GEO Claude Code Skills
  6. 如何用 Claude Code Subagents 做 GEO Research
  7. 如何把 Claude Code Hooks 當成 SEO/GEO Quality Gates
  8. 如何用 MCP 將 Claude Code 接上 SEO 資料
  9. 如何用 Claude Code GitHub Actions 做 SEO/GEO Reviews
  10. 如何在 Claude Code 裡跑每日 SEO/GEO Monitoring

下一篇

上一篇: 如何建立 Claude Code SEO/GEO Workflow Cockpit

下一篇: 如何用 Claude Code VS Code Extension 更新 SEO Pages

Sources and notes

Author: Camille Rhodes, Auspia Architect of 300+ AI Content Workflows。Camille 撰寫 AI-assisted publishing systems、workflow design 與 editorial quality control。

探索此主題

繼續閱讀相同的成長脈絡