概览
Claude Code 的系统提示词由两部分组成:7 个静态 section 全局缓存,多个动态 section 每轮或按需计算。
| Section | 函数名 | 用途 |
|---|---|---|
| Intro | getSimpleIntroSection() | 身份定义 + 安全边界 |
| System | getSimpleSystemSection() | 运行环境规则 |
| Doing Tasks | getSimpleDoingTasksSection() | 编码原则与行为规范 |
| Actions | getActionsSection() | 风险评估框架 |
| Using Your Tools | getUsingYourToolsSection() | 工具使用指南 |
| Tone and Style | getSimpleToneAndStyleSection() | 语气与格式 |
| Output Efficiency | getOutputEfficiencySection() | 输出效率 |