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

原则:把稳定 SEO/GEO behavior 放在 CLAUDE.md ,不要每个 prompt 重讲 Claude Code 有两个和 SEO/GEO work 相关的 memory surfaces: CLAUDE.md files 和 auto memory。Anthropic docs 说明, CL...

原则:把稳定 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。

探索此主题

继续阅读同一增长脉络