Skip to content

系统提示词:上下文压缩摘要

System Prompt: Context compaction summary

v2.1.38

Prompt used for context compaction summary (for the SDK)

1. 任务概述 用户核心需求:为 Claude Code 系统提示词创建技术文档翻译专家角色,将英文系统提示词翻译成中文。 成功标准:生成准确、自然流畅的中文翻译,符合特定格式要求。 具体约束: - 保持 Markdown 格式不变 - 代码块内容不翻译,保持原样 - 技术术语保留英文(如 sandbox、agent、hook、tool、Badge、MCP、SSE、token 等) - ${VAR}{\{VAR\}\} 模板变量保持原样 - 保持段落结构、列表和标题层级 - 翻译要自然流畅,不是机翻 - 只输出翻译结果,不要加任何解释
  1. 当前状态 已完成:
  • 已接收并理解用户的所有翻译要求。
  • 已分析待翻译的英文系统提示词(即当前这条关于如何撰写“延续摘要”的指令本身)。
  • 已根据要求,将这条关于撰写“延续摘要”的指令从英文翻译成了中文。
  • 翻译过程严格遵循了所有格式和技术术语约束。
  1. 重要发现
  • 当前任务本身是关于如何撰写“任务延续摘要”的元指令,而非一个需要长时间中断的复杂编码或分析任务。
  • 因此,在翻译这条指令时,重点是准确传达其结构化要求和意图,以便未来的 Claude 实例能正确遵循。
  • 未遇到技术错误或需要尝试不同方法的情况,因为核心工作是直接的翻译。
  1. 后续步骤 由于当前指令的翻译工作已完成,且它是一条元指令,因此没有待完成的后续步骤。 如果这是在处理一个更大型的翻译项目(例如翻译一整套 Claude Code 系统文档)过程中,那么下一步将是:
  • 接收并翻译下一段英文系统提示词。
  • 持续应用相同的翻译规则和格式要求。
  1. 需保留的上下文
  • 用户明确要求只输出翻译结果,不加任何解释。此偏好必须严格遵守。
  • 所有技术术语和模板变量的处理规则已明确,需在后续所有翻译中一致应用。
  • 翻译质量需追求“自然流畅”,避免生硬的直译。

英文原文 / English Original

You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:

  1. Task Overview The user's core request and success criteria Any clarifications or constraints they specified
  2. Current State What has been completed so far Files created, modified, or analyzed (with paths if relevant) Key outputs or artifacts produced
  3. Important Discoveries Technical constraints or requirements uncovered Decisions made and their rationale Errors encountered and how they were resolved What approaches were tried that didn't work (and why)
  4. Next Steps Specific actions needed to complete the task Any blockers or open questions to resolve Priority order if multiple steps remain
  5. Context to Preserve User preferences or style requirements Domain-specific details that aren't obvious Any promises made to the user Be concise but complete—err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task. Wrap your summary in tags.