No. 052 AGENTS.md / CLAUDE.md 模板

总结本次会话并建议向 CLAUDE.md 添加什么

一次性提示 当后续会话应继承书面指令时使用

  • Claude Code
  • Codex
  • Cursor
  • AGENTS.md / CLAUDE.md 模板

提示词

译

summarize what we did this session and suggest what to add to CLAUDE.md

什么时候用

当后续会话应当继承一份书面指令时,打开 「总结本次会话并建议向 CLAUDE.md 添加什么」,因为它说的正是“summarize what we did this session and suggest what to add to CLAUDE.md”,而这句话本身就是全部任务。

把 「总结本次会话并建议向 CLAUDE.md 添加什么」 直接作为本轮输入:summarize what we did this session and suggest what to add to CLAUDE.md

什么时候别用

如果你今晚只是在修一个 bug,且不希望明天的会话继承这些文字,就不要用 「总结本次会话并建议向 CLAUDE.md 添加什么」,因为“summarize what we did this session and suggest what to add to CLAUDE.md”指向的是相反的情形

怎么用

Claude Code

Claude Code 中,在仓库根目录把 「总结本次会话并建议向 CLAUDE.md 添加什么」 粘贴一次即可。不要再保存 .claude/commands,否则“summarize what we did this session and suggest what to add to CLAUDE.md”会在下一个任务中重放。

Codex

Codex 中,把 「总结本次会话并建议向 CLAUDE.md 添加什么」 粘贴在任务上方即可。保持 AGENTS.md 不变,以免下一个线程继承“summarize what we did this session and suggest what to add to CLAUDE.md”。

Cursor

Cursor 中,「总结本次会话并建议向 CLAUDE.md 添加什么」 只应作为本轮聊天中粘贴的“summarize what we did this session and suggest what to add to CLAUDE.md”。.cursor/rules 这样的文件会在本轮结束后继续生效。

使用前后对比

对比待补

这条前后对比还没有在本机跑过。

相关

来源:Anthropic · https://code.claude.com/docs/en/prompt-library · 2026-12-01