[{"data":1,"prerenderedAt":20},["ShallowReactive",2],{"$fFlEYjg-q6TqQNMolAyQl_hZwTf3QHMCHvbkPk3ggSOY":3},{"id":4,"documentId":5,"title":6,"summary":7,"content":8,"author":9,"category":10,"tags":11,"icon":12,"views":13,"isTop":14,"isNew":14,"publishDate":15,"createdAt":16,"updatedAt":17,"publishedAt":18,"slug":19},195,"tlfh75lo5gl1zrj15izb4dn8","2026 氛围编程元年！Claude Code 保姆级安装教程，一句指令写游戏","本文是面向新手的保姆级教程，从安装 Node.js 开始手把手教你安装 Claude Code，并体验它三种编程模式各自的应用场景。","\u003Cp>\u003Chtml>\u003Chead>\u003C/head>\u003Cbody>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">大家好，这里是AI共生阁。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">今天我给大家分享最近热门的编程工具Claude Code。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_1_52db4be600.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003Cbr>\u003C/p>\u003Cp>面向小白的教程，从零开始安装，最后会体验Claude Code的三种编程模式，每个模式都带有小例子。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_2_038b6fd2ca.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">2026年，氛围编程（vibe coding）就从Claude Code开始吧！\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">第一步，我们需要安装 NodeJS, 下载最新版本即可。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">官网地址：\u003Ca href=\"https://nodejs.org/zh-cn\" style=\"color: #1e80ff; text-decoration: none;\">https://nodejs.org/zh-cn\u003C/a>\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">点击“获取Node.js”绿色按钮\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_3_bff094db2c.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">进入页面后，点击“Windows 安装程序(.msi)”, 下载完成后开始进行安装，选择一个你的安装目录后，一直点击 next（下一步）直到结束。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">Node.js 是一个基于 JavaScript 的跨平台、开源的服务器端运行环境，安装这一步就是为了后续通过npm安装claude code。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_4_88b3878a3e.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_5_31fd1a2680.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">接下来，我们点击Window的开始菜单按钮，输入“cmd”, 选择“已管理员运行”，打开这个黑色的框（终端面板）\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_6_8974186aed.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">输入这行命令：npm install -g @anthropic-ai/claude-code\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">开始安装 claude code.\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_7_2c9489ff83.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">安装完成后，重新打开一个终端面板（重新运行cmd）\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">输入：claude，开始启动claude code\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_8_541fcc5387.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_9_e562485909.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">接下来是一些设置：\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">上下箭头切换，选择你喜欢的主题样式，回车进行确认。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_10_3dd2aead64.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">紧接着，会让你选择登录方式：\u003C/p>\u003C/p>\u003Cp>\u003Col style=\"padding-left: 20px; margin: 10px 0;\">\u003C/p>\u003Cp>\u003Cli style=\"margin: 6px 0; line-height: 1.9;\">Claude account with subscription (使用带订阅的 Claude 账户)\u003C/li>\u003C/p>\u003Cp>\u003C/ol>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">就是用你的月付/年付会员权益。\u003C/p>\u003C/p>\u003Cp>\u003Col style=\"padding-left: 20px; margin: 10px 0;\">\u003C/p>\u003Cp>\u003Cli style=\"margin: 6px 0; line-height: 1.9;\">Anthropic Console account (使用 Anthropic 控制台账户)\u003C/li>\u003C/p>\u003Cp>\u003C/ol>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">就是走开发者的 API 余额。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_11_18eaa5d002.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_12_93fd4764ff.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">这里我选择第一种方式，会员订阅登录。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">回车后，会自动打开浏览器，跳转到官网进行授权。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">授权成功后，关闭页面，重新回到终端面板。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_13_27fdeda86e.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_14_914b41449f.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">回到终端面板，会看到已经登录成功。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_15_26a42682d3.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">按住回车继续往下看，会提示你是否授权文件夹，我们目前没有进入自己的项目文件夹，选择退出即可。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_16_b9c98f9970.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_17_c5b188f877.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_18_de77421b9a.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">接下来，在电脑中新建一个你的项目文件夹，\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_19_72b1923d07.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">进入后，在文件夹路径栏，\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">输入：cmd, 回车后进入终端面板。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_20_03f8ac9abd.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_21_ff5327d6c4.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">接下来我们开始 claude code 的实战环节。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">在终端输入：claude，开启claude code.\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">第一次会询问你是否给当前文件夹授权，这里默认选择同意操作。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_22_d0e8dc3e41.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">进入claude code终端对话界面后，进入默认会话状态\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_23_c4c40fdd41.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">在这里你可以通过自然语言沟通，比如我输入：“你是谁？”\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">claude会基于默认的模型，思考之后回复我内容。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_24_f4ce912cb0.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">使用 斜杠符号 “/”, 会自动关联出来内置指令，上下箭头切换。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_25_51f9ae7649.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">接下来介绍一些常用指令：\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">Status\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">显示 Claude Code 的当前运行状态。这包括当前的软件版本、正在使用的 AI 模型、登录的账户信息等。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_26_6a94ca87f9.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">/model\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">会显示现在使用的模型以及可以切换的模型，上下箭头切换，回车确认即可。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_27_9f0c208ebc.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">/usage\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">显示你当前的消耗额度使用。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">Claude每五个小时会重置一次，每周也有一个防止滥用的总量的限制，可以通过这个指令实时查看。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_28_152bbeef04.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">在使用 Claude Code 时，如果你厌倦了反复交代背景信息，那么 /memory 就是你的效率神器。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">通过该指令，你可以让 Claude 记住特定的偏好、身份信息等内容，从此告别“每次对话都要重打一遍”的烦恼。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">用户记忆 (User Memory)：全局生效。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">项目记忆 (Project Memory)：仅对当前项目生效。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_29_cc0cdc99a4.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">它会在项目根目录创建一个配置文件，Claude 每次启动时都会优先阅读。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_30_a0d17109ae.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">比如：我在这里输入了我的名字，当我下次询问claude的时候，它会记住我。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_31_5f353a5b45.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">这就像给 Claude 装了一个“备忘录”，你也可以放一些你常用的提示词进来，方便复用。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_32_5d01145b8f.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">下面开始实战案例：\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">直接输入：“帮我做一个只有一个文件的网页，内容是一个经典的贪吃蛇游戏，要有计分功能，蛇撞墙会游戏结束。”这么一句话。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_33_b189b499fc.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">Claude会思考和输出内容，最后停留在一个确认页面。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_34_bf9e39343a.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">默认的权限不会自动帮我们创建文件，你可以选择\u003C/p>\u003C/p>\u003Cp>\u003Col style=\"padding-left: 20px; margin: 10px 0;\">\u003C/p>\u003Cp>\u003Cli style=\"margin: 6px 0; line-height: 1.9;\">同意\u003C/li>\u003C/p>\u003Cp>\u003Cli style=\"margin: 6px 0; line-height: 1.9;\">在此期间都同意\u003C/li>\u003C/p>\u003Cp>\u003Cli style=\"margin: 6px 0; line-height: 1.9;\">不同意\u003C/li>\u003C/p>\u003Cp>\u003C/ol>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">这里选择1.同意。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_35_30875a2cd1.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">稍等片刻，我们看到它已经处理完了，并且告诉我游戏特性和操作方式。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">可以看到文件夹内多了一个文件。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_36_d9fe0dc8ac.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">双击打开后，我们尝试一下。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">上下左右可以移动贪吃蛇，并且没吃掉一个方块，会增加对应的分数。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">触碰到墙壁后，游戏就会截止。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">整体下来，游戏很完整，不需要调整什么。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">这就是claude code 的魅力，一句话就可以搞定一个小游戏。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_37_5442ac5ce0.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_38_1429814d97.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">开始的时候，我说过claude code有三种编程模式，\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">刚才演示的是第一种 常规模式 (Normal Mode)\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">接下来，我们讲解剩下的两种编程模式。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_39_7a82882bc5.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">在claude code 中，Window系统是按住 Alt + M 键，可以轮播切换编程模式。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_40_09977ce608.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">我们切换到 自动接受模式，这个模式下，不需要你再次确认，输入你的问题后，剩下的活，比如创建文件、修改文件等，claude code都会帮你自动完成。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">示例：“帮我做一个只有一个文件的网页，内容是一个会发光的、科幻风格的数字时钟，让我双击这个文件就能直接在浏览器里看到效果。”\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_41_d9e425e0bd.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">同样是在文件夹内生成一个文件，我们双击看下。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">效果和我的需求相匹配。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_42_fc01e88591.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">最后，我们体验一下 计划模式。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">进入到计划模式后，输入需求后，它会先给你列出来他的任务规划。后续你可以：\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">1.Yes, and auto-accept edits（同意，并开启自动接受）\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">2.Yes, and manually approve edits（同意，但保持手动确认）\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">3.Type here to tell Claude what to change（输入指令进行修正）\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_43_135189b5b5.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_44_a615b49e1d.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">这里我们尝试第三种，我想把背景改成浅色的。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_45_7dbc6bae6a.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">输入完成后，回车。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">稍等片刻，我们看下效果。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_46_97c4771163.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">它不仅是把背景改成了浅色，字体也同步适配了色调。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">Claude code好用，但是有网络问题。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">下期我将讲解如何在Claude Code 环境中，接入智谱AI最新的 GLM 模型作为后端核心。\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">\u003Cimg src=\"https://aigongsheng.com/uploads/image_47_600edff5b4.png\" alt=\"\" style=\"max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px;\">\u003C/p>\u003C/p>\u003Cp>\u003Cp style=\"font-size: 16px; line-height: 1.9; margin: 10px 0;\">这里是AI共生阁，我们下期见！\u003C/p>\u003C/p>\u003Cp>\u003C/body>\u003C/html>\u003C/p>\u003Cp>\u003Ch2>常见问题\u003C/h2>\u003Ch3>Q: 安装 Claude Code 前需要装什么？\u003C/h3>\u003Cp>A: 需要先安装 Node.js（用于后续通过 npm 安装 Claude Code），安装命令是 npm install -g @anthropic-ai/claude-code。\u003C/p>\u003Ch3>Q: Claude Code 有几种编程模式？\u003C/h3>\u003Cp>A: 三种：常规模式（每步都需要手动确认）、自动接受模式（自动完成创建/修改文件等操作不用二次确认）、计划模式（先给出任务规划，再选择是否自动接受、手动确认或修改需求），可以用 Alt + M 快捷键切换。\u003C/p>\u003C/p>","Up Spark","AI编程",[],"👨‍💻",0,false,"2026-01-05","2026-01-05T16:09:07.023Z","2026-07-04T08:06:33.650Z","2026-07-04T08:06:33.669Z","claude-code-install-guide",1783157886258]