Claude Code 101 系列教程 · 第 4 课
2026-05-20
Claude Code 101 系列教程 · 第 4 课 · 来自 Claude 官方频道
你和 Claude Code 的交流方式与任何 AI 助手一样——通过 Prompt。但有一些技巧可以让体验更好、更安全。
你可以选择 Claude Code 的文件编辑行为:
| 模式 | 文件编辑 | 命令执行 |
|---|---|---|
| Approval Mode(默认) | 每次都需要你显式许可 | 需要许可 |
| Auto Accept | 自动批准 | 仍需许可 |
按 Shift + Tab 在模式间循环切换。
没有对错之分——选择让你最舒服的方式。
在 Shift + Tab 菜单中还有 Plan
Mode。
Plan Mode 的工作方式:
Plan Mode 让 Claude 在写代码之前先想清楚——这正是它最擅长的地方。
按 Shift + Tab 切换到 Plan Mode。
My app needs a dark mode implemented across the entire app.
Can you create a toggle switch on the header that allows user
to toggle between light mode and dark mode?
I need you to find a good contrast color that works based on
my existing light theme.
Claude Code 会返回一份计划,检查它是否满足你的需求。不满意可以让它修改或补充。
选择 Approve 接受计划,Claude Code 会逐项执行计划中的待办事项。
本教程基于 Claude 官方视频 Your First Claude Code Prompt 整理,属于 Claude Code 101 系列第 4 课。