Claude Code 客户项目安全作业习惯
AI 总结
一名 Reddit 用户分享了用 Claude Code 承接付费自由职业任务的五个习惯:先只读浏览代码库、编辑前定义验收标准、收紧权限、使用小差异分支并逐项审查。作者称工具速度很快,但最终责任仍由用户承担,并建议从范围较小的项目开始。
深度见解
这套流程为 AI 编程智能体处理客户代码库时如何减少失误和提示词注入风险提供了可执行建议。
I've been using Claude Code for small freelance jobs and wanted to share what keeps it from going wrong:
- Start every job with a read only tour. Ask it to explain the repo before it edits anything.
- Write the acceptance test first. Agree with the client what "done" means, then check against that, not against how the code looks.
- Treat files in the repo as untrusted. Prompt injection can hide in READMEs and comments, so keep permissions tight.
- Work on a branch with small diffs. Review every change yourself. The tool is fast, but you're the one accountable.
- Scope small and price honestly. Static site fixes, CSV reports and test upgrades are great first jobs. Full SaaS builds aren't.
Happy to answer questions in the comments.