Skip to content
Back/Claude Code

Non-Engineer's Guide to Claude Code

View in Graph
Updated 2026-05-01
2 min read
401 words

Non-Engineer's Guide to Claude Code

来源:Tw93 — You Don\u2019t Know AI Coding

Tw93(HiTw93)为产品、业务和运营同事撰写的 Claude Code 入门指南。核心前提:如果你会用 ChatGPT,就能学会用 Claude Code——关键是把 AI 从"聊天机器人"重新定位为"执行伙伴"。


第一步:克服命令行恐惧

Claude Code 运行在终端里,初学者可用 Kaku(Tw93 构建的友好终端)降低门槛:

  • 内置 AI assist:命令失败时自动建议修复
  • 记不住命令时前缀 # 用英文描述意图
  • 安装 Claude Code 只需一行:curl -fsSL https://claude.ai/install.sh | bash

最低限度的技术素养

不需要会写代码,但以下概念让调试更容易:

  • 常见框架是做什么的:React、Vue、Next.js 解决什么问题
  • 基础工具:终端命令、Git、VS Code、Chrome DevTools
  • 核心编程概念:function、variable、state、为什么分多个文件
  • 读代码和读错误比写代码更重要

三本书推荐(均易读):

  • 《INSPIRED》— 产品判断
  • 《Linux and the Unix Philosophy》— 工程哲学
  • 《The Pragmatic Programmer》— 资深工程师如何思考

CLAUDE.md 是项目说明书

没有 CLAUDE.md 就会每次重复交代背景。把它当作给新同事的入职文档:

三条原则

  1. :150 行以内,太长吃掉对话预算
  2. 直接:用祈使句,"All comments in English" 比 "the team prefers English comments" 有效
  3. 可判断:"Functions over 50 lines must be split" 比 "Code quality should be high" 有用

四条值得直接抄写的规则

  • Ask before acting(不要猜测意图)
  • Prefer simple(两行能搞定不写两百行)
  • Only touch what needs touching(不要重构没被要求改的文件)
  • Verify when done(build 和 tests 通过才算完成)

Preserve When Compacting 段落:Claude Code 会自动压缩长对话,默认先丢弃决策理由。显式保留:架构决策及理由、改了哪些文件、当前进度、未完成的 TODO。

需求越精确,结果越不跑偏

模糊:build me a customer follow-up tool。 精确:build a sales follow-up tool, single-file webpage, store data locally. Left side list showing company name, next follow-up date, status. Right side detail view with communication history. Top has three filters: status, time, keyword. Data lives in browser localStorage, no backend.

精确版当天出原型。模糊版几乎总是需要重做。

验收标准要有数字

  • "Page should be fast" → "First paint under 1.5s"
  • "Layout should look right" → "No layout breakage at 375 and 1440 widths"

不要写 "TBD" 或 "decide later"——Claude Code 会猜测,而猜测通常不对。

复杂任务先用 Plan 模式

按 Shift+Tab 两次进入 Plan mode:Claude 先列出打算改哪些文件、每处改什么、理由和预期影响范围。你确认方向后再执行。

Auto mode(Shift+Tab 切换到 auto):安全操作直接执行,危险操作(数据库写入、文件删除)仍要求确认。

验证三步

Claude 说 "done" 不算,要验证:

  1. 命令通过:build 和 test 绿色
  2. 实际看到:打开页面,肉眼检查数字,走一遍关键流程
  3. 对照清单:逐条验收标准,没完成的发回去

恢复坏改动的两种方法

  • Git snapshot:大改前 commit 一个 checkpoint,"roll back to the last checkpoint"
  • Undo last step:"undo everything you just did" 或 /rewind

不要陷入 try-this-try-that 循环: 根本原因未命名前不要碰代码。先问 "which file, which line, why does this happen"。答案模糊就继续挖。

安全习惯(从第一天开始)

  • Explain before acting:在 CLAUDE.md 加 "Before running any Bash command or editing any file, explain in one sentence what you\u2019re about to do"
  • 不认识的命令先问:"what does this command do, what\u2019s the risk"
  • 不在生产环境练习:本地和 staging 随便玩,生产数据库先验证
  • 不要粘贴 secrets 到聊天:API key、密码进环境变量或 .env 文件
  • 测试通过不代表安全:登录、支付、个人信息功能用 Clerk/Stripe 等成熟服务,不要让 AI 从零写

高级技巧

opusplan 模型策略/model opusplan —— Opus 做 plan,Sonnet 做 execution,省钱省时间。

长会话管理

  • 一任务一会话,完成后 /clear
  • 长任务结束前让 Claude 写 HANDOFF.md:"write current progress to HANDOFF.md"
  • 新会话读 HANDOFF.md 继续

Waza Skill 集合(Tw93):

  • /think — 写代码前想技术方案
  • /design — 设计真实产品页面(非紫蓝渐变 AI 模板)
  • /hunt — 调试,规则:不命名根因不碰代码
  • /check — 收尾前走 diff,自动修 + 汇总问题

Sources

Synthesized from 2 sources
  • Tw93 — You Don\u2019t Know AI CodingSupporting source listed by this page.Whole pagemediumbody
  • You Don’t Know AI Coding A Non-Engineer’s Guide to Claude CodeSupporting source listed by this page.Whole pagemediumabsorb log

Evolution

1 event
  1. absorbed

    Derived from source material

    This page is currently synthesized from 2 sources.

    From Tw93 — You Don\u2019t Know AI Coding, You Don’t Know AI Coding A Non-Engineer’s Guide to Claude CodeTo Non-Engineer's Guide to Claude Code
    Sources: raw/to-learn/You Don\u2019t Know AI Coding A Non-Engineer\u2019s Guide to Claude Code.md · raw/to-learn/You Don’t Know AI Coding A Non-Engineer’s Guide to Claude Code.md

Linked from