{"id":1162,"date":"2025-08-31T16:03:05","date_gmt":"2025-08-31T08:03:05","guid":{"rendered":"https:\/\/www.agidt.com\/?p=1162"},"modified":"2025-10-12T20:27:00","modified_gmt":"2025-10-12T12:27:00","slug":"claude-code-%e7%94%a8%e6%b3%95%e5%85%a8%e9%9d%a2%e6%8b%86%e8%a7%a3%ef%bc%8126-%e9%a1%b9%e6%a0%b8%e5%bf%83%e5%8a%9f%e8%83%bd-%e5%ae%9e%e6%88%98%e6%8a%80%e5%b7%a7%ef%bc%88%e5%bb%ba%e8%ae%ae%e6%94%b6","status":"publish","type":"post","link":"https:\/\/www.agidt.com\/?p=1162","title":{"rendered":"Claude Code \u7528\u6cd5\u5168\u9762\u62c6\u89e3\uff0126 \u9879\u6838\u5fc3\u529f\u80fd + \u5b9e\u6218\u6280\u5de7\uff08\u5efa\u8bae\u6536\u85cf\uff01\uff09"},"content":{"rendered":"\n<p><strong>Claude Code \u7b80\u76f4\u5f3a\u5230\u79bb\u8c31\uff01\uff01\uff01<\/strong><\/p>\n\n\n\n<p>\u8fd9\u6bb5\u65f6\u95f4\u4e00\u76f4\u5728\u73a9 Claude Code\uff0c\u8d8a\u7528\u8d8a\u4e0a\u5934\u3002\u4e0d\u4ec5\u7f16\u7a0b\u80fd\u529b\u6781\u5176\u5f3a\u608d\uff0c\u66f4\u662f\u5e26\u6765\u4eba\u673a\u4ea4\u4e92\u7684\u65b0\u8303\u5f0f\u3002\u7528\u5f97\u8d8a\u4e45\u8d8a\u53d1\u73b0\uff0c\u5b83\u8fdc\u4e0d\u53ea\u662f\u4e00\u4e2a\u5199\u4ee3\u7801\u7684 AI\u3002<\/p>\n\n\n\n<p>\u6770\u4e00\u8d81\u673a\u7cfb\u7edf\u5730\u68b3\u7406\u4e86 Claude Code \u5728\u5f00\u53d1\u573a\u666f\u4e0b\u7684&nbsp;<strong>26 \u4e2a\u5173\u952e\u529f\u80fd<\/strong>\uff0c\u4ece\u57fa\u7840\u6307\u4ee4\u5230\u4e0a\u4e0b\u6587\u538b\u7f29\u3001\u4ece\u4ee3\u7801\u8f85\u52a9\u5230 GitHub \u81ea\u52a8\u5316\uff0c\u5f88\u591a\u7528\u6cd5\u90fd<strong>\u8d85\u51fa\u4e86 AI \u5199\u4ee3\u7801\u7684\u4f20\u7edf\u7406\u89e3<\/strong>\u3002<\/p>\n\n\n\n<p>\u8fd9\u7bc7\u6587\u7ae0\u65e2\u662f\u4e00\u6b21\u5168\u9762\u6574\u7406\uff0c\u4e5f\u662f\u4e00\u4efd\u5b9e\u6218\u603b\u7ed3\u3002\u5efa\u8bae\u6536\u85cf\uff0c\u6162\u6162\u62c6\u89e3\u3002<\/p>\n\n\n\n<p><strong>\ud83d\udd17 \u6269\u5c55\u9605\u8bfb\uff1a<\/strong>&nbsp;<a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-production-workflow\">Claude Code \u751f\u4ea7\u5de5\u4f5c\u6d41\u6307\u5357<\/a>&nbsp;|&nbsp;<a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/99-percent-ai-development-comprehensive-guide\">99.9% AI \u9a71\u52a8\u5f00\u53d1<\/a><\/p>\n\n\n\n<p>\u5168\u6587\u5185\u5bb9\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u57fa\u7840\u64cd\u4f5c<\/strong>\uff1a\u5e38\u7528\u6307\u4ee4\u3001CLAUDE.md \u3001\u56fe\u7247\u5904\u7406\u3001\u5b89\u88c5 IDE \u63d2\u4ef6\u3001Safe YOLO \u6a21\u5f0f<\/li>\n\n\n\n<li><strong>\u4ea4\u4e92\u4e0e\u4f1a\u8bdd\u7ba1\u7406<\/strong>\uff1a\u6e05\u9664\u804a\u5929\u4e0a\u4e0b\u6587\u3001\u5feb\u6377\u952e\u64cd\u4f5c\u3001\u4e2d\u65ad\u64cd\u4f5c\u3001\u6062\u590d\u5386\u53f2\u4f1a\u8bdd\u3001\u4e0a\u4e0b\u6587\u538b\u7f29\u3001\u81ea\u5b9a\u4e49\u547d\u4ee4<\/li>\n\n\n\n<li><strong>\u63d0\u793a\u4e0e\u601d\u8003\u7b56\u7565<\/strong>\uff1aXML \u6807\u7b7e\u7ed3\u6784\u5316\u63d0\u793a\u3001\u9884\u6fc0\u6d3b\u3001\u5f3a\u5236\u6df1\u5ea6\u601d\u8003\u3001\u9700\u6c42\u5206\u6790<\/li>\n\n\n\n<li><strong>\u8f6f\u4ef6\u5f00\u53d1\u5b9e\u8df5<\/strong>\uff1a\u4efb\u52a1\u62c6\u89e3\u3001\u7406\u89e3\u9879\u76ee\u4e0a\u4e0b\u6587\u3001Linux \u547d\u4ee4\u8f85\u52a9<\/li>\n\n\n\n<li><strong>\u6210\u672c\u4e0e\u6a21\u578b\u7ba1\u7406<\/strong>\uff1a\u6a21\u578b\u5207\u6362\u3001\u76d1\u63a7 token \u6210\u672c\u3001\u4f7f\u7528 ccusage \u6d88\u8017\u76d1\u63a7<\/li>\n\n\n\n<li><strong>\u8fdb\u9636\u529f\u80fd<\/strong>\uff1a\u4f7f\u7528 Git worktrees \u8fd0\u884c\u5e76\u884c Claude Code \u4f1a\u8bdd\u3001MCP\u3001Claude Code GitHub Action\u3001\u5c06 Claude \u5f53\u4f5c\u7528\u4f5c\u7c7b Unix \u7a0b\u5e8f<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u4e00\u57fa\u7840\u64cd\u4f5c\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E4%B8%80%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C\"><strong>\u4e00\u3001\u57fa\u7840\u64cd\u4f5c<\/strong><\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u5b89\u88c5-vs-code-\u6216-cursor-\u63d2\u4ef6\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E5%AE%89%E8%A3%85-vs-code-%E6%88%96-cursor-%E6%8F%92%E4%BB%B6\"><strong>\u5b89\u88c5 VS Code \u6216 Cursor \u63d2\u4ef6<\/strong><\/a><\/h3>\n\n\n\n<p>\u56e0\u4e3a Claude Code \u662f\u8fd0\u884c\u5728\u7ec8\u7aef\u7684\uff0c\u7f16\u8f91\u6587\u4ef6\u4e0d\u592a\u65b9\u4fbf\uff0c\u6240\u4ee5\u4f60\u53ef\u4ee5\u5728 IDE \u4e2d\uff08VS Code\u3001Cursor\u3001JetBrains \u7b49\uff09\u4e2d\u5b89\u88c5 Claude Code \u63d2\u4ef6\uff0c\u5b89\u88c5\u540e\u53ef\u4ee5\u5feb\u901f\u542f\u52a8 Claude Code\u3002\u5b9e\u73b0 IDE \u548c Claude Code \u534f\u540c\u5de5\u4f5c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cc.deeptoai.com\/_next\/image?url=%2F_next%2Fstatic%2Fmedia%2Fvs-code-plugin.cac11d87.jpg&amp;w=3840&amp;q=75\" alt=\"VSCode \u63d2\u4ef6\u5b89\u88c5\"\/><\/figure>\n\n\n\n<p><strong>\ud83d\udd17 \u6269\u5c55\u9605\u8bfb\uff1a<\/strong>&nbsp;<a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-setup-tips\">33 \u4e2a Claude Code \u8bbe\u7f6e\u6280\u5de7<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u5e38\u7528\u6307\u4ee4\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E5%B8%B8%E7%94%A8%E6%8C%87%E4%BB%A4\"><strong>\u5e38\u7528\u6307\u4ee4<\/strong><\/a><\/h3>\n\n\n\n<p>\u4e0b\u9762\u8fd9\u4e9b\u662f Claude Code \u65e5\u5e38\u4f7f\u7528\u4e2d\u6700\u91cd\u8981\u7684\u547d\u4ee4\uff0c\u5efa\u8bae\u5168\u90e8\u638c\u63e1\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u547d\u4ee4<\/th><th>\u529f\u80fd<\/th><th>\u793a\u4f8b<\/th><\/tr><\/thead><tbody><tr><td>claude<\/td><td>\u542f\u52a8\u4ea4\u4e92\u6a21\u5f0f<\/td><td>claude<\/td><\/tr><tr><td>claude &#8220;task&#8221;<\/td><td>\u8fd0\u884c\u4e00\u6b21\u6027\u4efb\u52a1<\/td><td>claude &#8220;fix the build error&#8221;<\/td><\/tr><tr><td>claude -p &#8220;query&#8221;<\/td><td>\u8fd0\u884c\u4e00\u6b21\u6027\u67e5\u8be2\uff0c\u7136\u540e\u9000\u51fa<\/td><td>claude -p &#8220;explain this function&#8221;<\/td><\/tr><tr><td>claude -c<\/td><td>\u7ee7\u7eed\u6700\u8fd1\u7684\u5bf9\u8bdd<\/td><td>claude -c<\/td><\/tr><tr><td>claude -r<\/td><td>\u6062\u590d\u4e4b\u524d\u7684\u5bf9\u8bdd<\/td><td>claude -r<\/td><\/tr><tr><td>claude commit<\/td><td>\u521b\u5efa Git \u63d0\u4ea4<\/td><td>claude commit<\/td><\/tr><tr><td>\/clear<\/td><td>\u6e05\u9664\u5bf9\u8bdd\u5386\u53f2<\/td><td>&gt; \/clear<\/td><\/tr><tr><td>\/help<\/td><td>\u663e\u793a\u53ef\u7528\u547d\u4ee4<\/td><td>&gt; \/help<\/td><\/tr><tr><td>exit \u6216 Ctrl+C<\/td><td>\u9000\u51fa Claude Code<\/td><td>&gt; exit<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"claudemd-\u6587\u4ef6\u7ba1\u7406\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#claudemd-%E6%96%87%E4%BB%B6%E7%AE%A1%E7%90%86\"><strong>CLAUDE.md \u6587\u4ef6\u7ba1\u7406<\/strong><\/a><\/h3>\n\n\n\n<p>Claude.md \u6587\u4ef6\u5c31\u7c7b\u4f3c\u4e8e Cursor \u7684 Rules \u6587\u4ef6\uff0c\u89c4\u5b9a\u4e86 AI \u600e\u6837\u751f\u6210\u4ee3\u7801\u3002\u4f60\u53ef\u4ee5\u5728\u91cc\u9762\u6307\u5b9a\u4ee3\u7801\u98ce\u683c\u3001\u5f00\u53d1\u73af\u5883\u3001\u4ed3\u5e93\u89c4\u8303\u7b49\u7b49\u3002<\/p>\n\n\n\n<p>Claude.md \u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Bash \u547d\u4ee4  - `npm run build`: \u6784\u5efa\u9879\u76ee  - `npm run typecheck`: \u8fd0\u884c\u7c7b\u578b\u68c0\u67e5  # \u4ee3\u7801\u98ce\u683c  - \u4f7f\u7528 ES \u6a21\u5757\u8bed\u6cd5\uff08`import\/export`\uff09\uff0c\u800c\u975e CommonJS\uff08`require`\uff09  - \u5c3d\u53ef\u80fd\u4f7f\u7528\u89e3\u6784\u5bfc\u5165\uff08\u4f8b\u5982\uff1a`import { foo } from 'bar'`\uff09  # \u5de5\u4f5c\u6d41\u7a0b  - \u5b8c\u6210\u4e00\u7cfb\u5217\u4ee3\u7801\u4fee\u6539\u540e\uff0c\u52a1\u5fc5\u8fdb\u884c\u7c7b\u578b\u68c0\u67e5  - \u51fa\u4e8e\u6027\u80fd\u8003\u8651\uff0c\u4f18\u5148\u8fd0\u884c\u5355\u4e2a\u6d4b\u8bd5\uff0c\u800c\u975e\u6574\u4e2a\u6d4b\u8bd5\u5957\u4ef6<\/code><\/pre>\n\n\n\n<p>\u4f60\u53ef\u4ee5\u5728\u9879\u76ee\u6839\u548c\u5b50\u76ee\u5f55\u521b\u5efa\u591a\u4e2a&nbsp;<code>CLAUDE.md<\/code>\uff0c\u4e3a\u6bcf\u4e2a\u4e0a\u4e0b\u6587\u63d0\u4f9b\u4e2a\u6027\u5316\u914d\u7f6e\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u6587\u4ef6\u8def\u5f84<\/th><th>\u4f5c\u7528<\/th><\/tr><\/thead><tbody><tr><td>\u9879\u76ee\u6839\u76ee\u5f55 \/ CLAUDE.md<\/td><td>\u56e2\u961f\u5171\u4eab\u7684\u9879\u76ee\u7ea7\u914d\u7f6e\uff0c\u63d0\u4ea4\u81f3 Git \u4f9b\u6240\u6709\u6210\u5458\u4f7f\u7528<\/td><\/tr><tr><td>\u9879\u76ee\u6839\u76ee\u5f55 \/ CLAUDE.local.md<\/td><td>\u4e2a\u4eba\u672c\u5730\u8986\u76d6\u914d\u7f6e\uff0c\u901a\u5e38\u52a0\u5165 .gitignore \u907f\u514d\u5f71\u54cd\u4ed6\u4eba<\/td><\/tr><tr><td>\u7236\u76ee\u5f55 \/ CLAUDE.md<\/td><td>\u5728 Monorepo \u7ed3\u6784\u4e2d\u81ea\u52a8\u7ee7\u627f\u7684\u4e0a\u7ea7\u914d\u7f6e\uff08\u9012\u5f52\u5411\u4e0a\u67e5\u627e\uff09<\/td><\/tr><tr><td>\u5b50\u76ee\u5f55 \/ CLAUDE.md<\/td><td>\u9488\u5bf9\u7279\u5b9a\u5b50\u6a21\u5757 \/ \u529f\u80fd\u7684\u72ec\u7acb\u914d\u7f6e\uff08\u4f18\u5148\u4e8e\u7236\u7ea7\u914d\u7f6e\u52a0\u8f7d\uff09<\/td><\/tr><tr><td>~\/.claude\/CLAUDE.md<\/td><td>\u7528\u6237\u5168\u5c40\u9ed8\u8ba4\u914d\u7f6e\uff0c\u9002\u7528\u4e8e\u6240\u6709 Claude \u4f1a\u8bdd\u7684\u57fa\u7ebf\u8bbe\u5b9a<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u4f60\u4e5f\u53ef\u4ee5\u5728\u5bf9\u8bdd\u4e2d\uff0c\u8f93\u5165<code>#<\/code>\u6765\u5411 CLAUDE.md \u4e2d\u52a8\u6001\u6dfb\u52a0\u5185\u5bb9<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cc.deeptoai.com\/_next\/image?url=%2F_next%2Fstatic%2Fmedia%2Fclaude-md-dynamic-add.02a359b5.jpg&amp;w=3840&amp;q=75\" alt=\"Claude MD \u52a8\u6001\u6dfb\u52a0\"\/><\/figure>\n\n\n\n<p><strong>\ud83d\udd17 \u6269\u5c55\u9605\u8bfb\uff1a<\/strong>&nbsp;<a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/tools\/ccpm-claude-code-project-manager\">CCPM Claude Code \u9879\u76ee\u7ba1\u7406\u5668<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u56fe\u7247\u5904\u7406\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E5%9B%BE%E7%89%87%E5%A4%84%E7%90%86\"><strong>\u56fe\u7247\u5904\u7406<\/strong><\/a><\/h3>\n\n\n\n<p>Claude Code \u652f\u6301\u7c98\u8d34\u56fe\u7247\uff0c\u53ef\u4ee5\u8ba9 Claude \u6839\u636e\u56fe\u7247\u6765\u5b8c\u6210\u4efb\u52a1\uff0c\u4f8b\u5982\uff1a&#8221;\u6839\u636e\u56fe\u7247\u8bbe\u8ba1\u7f51\u9875&#8221; \u6216 &#8220;\u5206\u6790\u9519\u8bef\u622a\u56fe\u539f\u56e0&#8221;\u3002<\/p>\n\n\n\n<p>\u4e0a\u4f20\u540e\u7684\u56fe\u7247\u4e0d\u4f1a\u76f4\u63a5\u663e\u793a\u51fa\u6765\uff0c\u800c\u662f\u4f1a\u7528<code>[Image #id]<\/code>\u7684\u5360\u4f4d\u7b26\u66ff\u4ee3\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cc.deeptoai.com\/_next\/image?url=%2F_next%2Fstatic%2Fmedia%2Fimage-placeholder.df163d6a.jpg&amp;w=3840&amp;q=75\" alt=\"\u5360\u4f4d\u7b26\u56fe\u7247\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"safe-yolo-\u6a21\u5f0f\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#safe-yolo-%E6%A8%A1%E5%BC%8F\"><strong>Safe YOLO \u6a21\u5f0f<\/strong><\/a><\/h3>\n\n\n\n<p>\u4e3a\u4e86\u5b89\u5168\u8d77\u89c1\uff0c Claude Code \u6267\u884c\u4e00\u4e9b\u547d\u4ee4\u65f6\u9ed8\u8ba4\u8bf7\u6c42\u4f60\u7684\u540c\u610f\u3002\u4e3a\u4e86\u5b9e\u73b0\u66f4\u65b9\u4fbf\u7684\u81ea\u52a8\u5316\uff0c\u4f60\u53ef\u4ee5\u8bbe\u7f6e Safe YOLO \u6a21\u5f0f\u3002<\/p>\n\n\n\n<p>\u5728\u542f\u52a8 Claude \u7684\u65f6\u5019\uff0c\u6267\u884c\u4e0b\u9762\u7684\u6307\u4ee4\u5373\u53ef\uff1a<\/p>\n\n\n\n<p><code>claude --dangerously-skip-permissions<\/code><\/p>\n\n\n\n<p>\u6267\u884c\u8fd9\u4e2a\u4e4b\u540e\uff0cClaude \u4f1a<strong>\u81ea\u52a8\u8df3\u8fc7\u6240\u6709\u6743\u9650\u786e\u8ba4<\/strong>\uff0c\u4e0d\u9700\u8981\u4f60\u624b\u52a8\u70b9\u5141\u8bb8\u3002\u8fd9\u5bf9\u4e8e\u4e00\u4e9b\u91cd\u590d\u6027\u4efb\u52a1\u5341\u5206\u65b9\u4fbf\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u4e8c\u4ea4\u4e92\u4e0e\u4f1a\u8bdd\u7ba1\u7406\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E4%BA%8C%E4%BA%A4%E4%BA%92%E4%B8%8E%E4%BC%9A%E8%AF%9D%E7%AE%A1%E7%90%86\"><strong>\u4e8c\u3001\u4ea4\u4e92\u4e0e\u4f1a\u8bdd\u7ba1\u7406<\/strong><\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u6e05\u9664\u804a\u5929\u4e0a\u4e0b\u6587\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E6%B8%85%E9%99%A4%E8%81%8A%E5%A4%A9%E4%B8%8A%E4%B8%8B%E6%96%87\"><strong>\u6e05\u9664\u804a\u5929\u4e0a\u4e0b\u6587<\/strong><\/a><\/h3>\n\n\n\n<p>\u4f7f\u7528&nbsp;<strong><code>\/clear<\/code><\/strong>&nbsp;\u6e05\u9664\u804a\u5929\u4e0a\u4e0b\u6587\uff0c\u907f\u514d\u7d2f\u79ef\u8fc7\u591a\u5386\u53f2\u4fe1\u606f\u5f71\u54cd\u6548\u7387\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cc.deeptoai.com\/_next\/image?url=%2F_next%2Fstatic%2Fmedia%2Fclear-context.b3ad42b6.jpg&amp;w=3840&amp;q=75\" alt=\"\u6e05\u9664\u4e0a\u4e0b\u6587\"\/><\/figure>\n\n\n\n<p><strong>\ud83d\udd17 \u6269\u5c55\u9605\u8bfb\uff1a<\/strong>&nbsp;<a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/advanced\/compounding-engineering\">\u590d\u5408\u5de5\u7a0b\u6846\u67b6<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u5feb\u6377\u952e\u64cd\u4f5c\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E5%BF%AB%E6%8D%B7%E9%94%AE%E6%93%8D%E4%BD%9C\"><strong>\u5feb\u6377\u952e\u64cd\u4f5c<\/strong><\/a><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>\/<\/code>\u00a0\u67e5\u770b\u547d\u4ee4<\/li>\n\n\n\n<li>\u65b9\u5411\u952e\u7ffb\u5386\u53f2<\/li>\n\n\n\n<li><code>Tab<\/code>\u00a0\u8865\u5168<\/li>\n\n\n\n<li><code>Option+Enter<\/code>\u00a0\u6362\u884c<\/li>\n\n\n\n<li><code>Ctrl+C<\/code>\u00a0\u9000\u51fa\u7b49\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u4e2d\u65ad\u64cd\u4f5c\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E4%B8%AD%E6%96%AD%E6%93%8D%E4%BD%9C\"><strong>\u4e2d\u65ad\u64cd\u4f5c<\/strong><\/a><\/h3>\n\n\n\n<p>\u8f93\u9519\u6307\u4ee4\u65f6\uff0c\u6309&nbsp;<code>ESC<\/code>&nbsp;\u952e\u7acb\u5373\u505c\u6b62 AI \u5f53\u524d\u4efb\u52a1\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cc.deeptoai.com\/_next\/image?url=%2F_next%2Fstatic%2Fmedia%2Finterrupt-operation.1230da1e.jpg&amp;w=3840&amp;q=75\" alt=\"\u4e2d\u65ad\u64cd\u4f5c\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u6062\u590d\u5386\u53f2\u4f1a\u8bdd\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E6%81%A2%E5%A4%8D%E5%8E%86%E5%8F%B2%E4%BC%9A%E8%AF%9D\"><strong>\u6062\u590d\u5386\u53f2\u4f1a\u8bdd<\/strong><\/a><\/h3>\n\n\n\n<p>\u5728\u542f\u52a8\u7684\u65f6\u5019\uff0c\u6267\u884c<code>claude -c<\/code>\uff0c\u53ef\u4ee5\u7ee7\u7eed\u4e0a\u6b21\u5bf9\u8bdd<\/p>\n\n\n\n<p>\u6267\u884c<code>claude -r<\/code>\uff0c\u53ef\u4ee5\u9009\u62e9\u5386\u53f2\u5bf9\u8bdd\u7ee7\u7eed\u3002\u5982\u679c\u4f60\u5df2\u7ecf\u6253\u5f00\u4e86\u67d0\u4e2a\u5bf9\u8bdd\uff0c\u4f60\u4e5f\u53ef\u4ee5\u8f93\u5165&nbsp;<code>\/resume<\/code>&nbsp;\u6765\u5207\u6362\u5230\u5176\u4ed6\u4f1a\u8bdd\u4e2d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cc.deeptoai.com\/_next\/image?url=%2F_next%2Fstatic%2Fmedia%2Fresume-history.e7439523.jpg&amp;w=3840&amp;q=75\" alt=\"\u6062\u590d\u5386\u53f2\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u4e0a\u4e0b\u6587\u538b\u7f29\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E4%B8%8A%E4%B8%8B%E6%96%87%E5%8E%8B%E7%BC%A9\"><strong>\u4e0a\u4e0b\u6587\u538b\u7f29<\/strong><\/a><\/h3>\n\n\n\n<p>Claude Code \u63d0\u4f9b\u4e86<code>\/compact<\/code>&nbsp;\uff0c\u5b83\u7684\u4f5c\u7528\u662f<strong>\u538b\u7f29\u5bf9\u8bdd\u5386\u53f2<\/strong>\uff0c\u53ea\u4fdd\u7559\u4e0a\u4e0b\u6587\u6458\u8981\uff0c\u4ece\u800c\u51cf\u5c11 token \u5360\u7528\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cc.deeptoai.com\/_next\/image?url=%2F_next%2Fstatic%2Fmedia%2Fcompact-context.0a044088.jpg&amp;w=3840&amp;q=75\" alt=\"\u7cbe\u7b80\u4e0a\u4e0b\u6587\"\/><\/figure>\n\n\n\n<p>\u8fd9\u6837 Claude \u5c31\u4e0d\u4f1a\u56e0\u4e3a\u4e0a\u4e0b\u6587\u592a\u6742\u800c\u5361\u58f3\u6216\u8dd1\u504f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u81ea\u5b9a\u4e49\u547d\u4ee4\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%91%BD%E4%BB%A4\"><strong>\u81ea\u5b9a\u4e49\u547d\u4ee4<\/strong><\/a><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>- \u7528\u6237\u7ea7\u547d\u4ee4\uff1a`~\/.claude\/commands\/`\uff0c\u524d\u7f00 `\/user:`\u3002- \u9879\u76ee\u7ea7\u547d\u4ee4\uff1a`.claude\/commands\/`\uff0c\u524d\u7f00 `\/project:`\u3002- \u793a\u4f8b\uff1a\u521b\u5efa `optimize.md` \u6587\u4ef6\u540e\uff0c\u8f93\u5165 `\/project:optimize` \u81ea\u52a8\u6267\u884c\"\u5206\u6790\u6027\u80fd\u5e76\u63d0\u51fa\u4f18\u5316\u5efa\u8bae\"\u3002<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u6709\u4e00\u4e9b\u7ecf\u5e38\u7528\u5230\u7684\u5de5\u4f5c\u6d41\u7a0b\uff0c\u4f60\u53ef\u4ee5\u5c06\u6d41\u7a0b\u8bbe\u7f6e\u4e3a\u81ea\u5b9a\u4e49\u6307\u4ee4\u3002\u81ea\u5b9a\u4e49\u6307\u4ee4\u5206\u4e3a\u4e24\u79cd\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7528\u6237\u7ea7\u547d\u4ee4<\/strong>\uff1a\u653e\u5728\u00a0<code>~\/.claude\/commands\/<\/code>\u00a0\u76ee\u5f55\u4e0b\uff0c\u9002\u5408\u6240\u6709\u9879\u76ee\u901a\u7528\u7684\u547d\u4ee4\u3002\u89e6\u53d1\u65b9\u5f0f\u662f\u8f93\u5165\u00a0<code>\/user:\u547d\u4ee4\u540d<\/code>\u3002<\/li>\n\n\n\n<li><strong>\u9879\u76ee\u7ea7\u547d\u4ee4<\/strong>\uff1a\u653e\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684\u00a0<code>.claude\/commands\/<\/code>\u00a0\u76ee\u5f55\u4e2d\uff0c\u9002\u5408\u8fd9\u4e2a\u9879\u76ee\u4e13\u7528\u7684\u547d\u4ee4\u3002\u89e6\u53d1\u65b9\u5f0f\u662f\u00a0<code>\/project:\u547d\u4ee4\u540d<\/code>\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u4e3e\u4e2a\u4f8b\u5b50\uff1a<\/strong><\/p>\n\n\n\n<p>\u5047\u8bbe\u5728&nbsp;<code>.claude\/commands\/<\/code>&nbsp;\u6587\u4ef6\u5939\u91cc\u65b0\u5efa\u4e86\u4e00\u4e2a&nbsp;<code>optimize.md<\/code>&nbsp;\u6587\u4ef6\uff0c\u91cc\u9762\u5199\u4e0a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u8bf7\u5206\u6790\u5e76\u4fee\u590d\u8fd9\u4e2aGitHub Issue\uff1a$ARGUMENTS\u3002\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a1. \u4f7f\u7528`gh issue view`\u547d\u4ee4\u67e5\u770bIssue\u8be6\u60c52. \u7406\u89e3Issue\u63cf\u8ff03. \u5728\u4ee3\u7801\u5e93\u4e2d\u641c\u7d22\u76f8\u5173\u6587\u4ef64. \u5b9e\u65bd\u5fc5\u8981\u7684\u4fee\u6539\u6765\u89e3\u51b3Issue5. \u7f16\u5199\u5e76\u8fd0\u884c\u6d4b\u8bd5\u6765\u9a8c\u8bc1\u4fee\u590d6. \u786e\u4fdd\u4ee3\u7801\u901a\u8fc7\u4ee3\u7801\u98ce\u683c\u68c0\u67e5\u548c\u7c7b\u578b\u68c0\u67e57. \u521b\u5efa\u63cf\u8ff0\u6027\u7684\u63d0\u4ea4\u4fe1\u606f8. \u63a8\u9001\u4ee3\u7801\u5e76\u521b\u5efaPR\u8bf7\u8bb0\u4f4f\u6240\u6709GitHub\u76f8\u5173\u64cd\u4f5c\u90fd\u4f7f\u7528GitHub CLI\u5de5\u5177(`gh`)\u6765\u5b8c\u6210\u3002<\/code><\/pre>\n\n\n\n<p>\u4fdd\u5b58\u540e\uff0c\u4f60\u5c31\u53ef\u4ee5\u5728 Claude Code \u4e2d\u6267\u884c&nbsp;<code>\/project:fix-github-issue 1234<\/code>&nbsp;\uff0c\u8ba9 Claude \u81ea\u52a8\u4fee\u590d\u6307\u5b9a\u7684 GitHub issue\u3002\u5176\u4e2d 1234 \u662f Issue \u7684 ID\uff0c\u800c\u6307\u4ee4\u4e2d\u7684 ARGUMENTS \u4f1a\u88ab\u81ea\u52a8\u66ff\u6362\u6210 1234<\/p>\n\n\n\n<p>\u4f60\u8fd8\u53ef\u4ee5\u628a\u5176\u4ed6\u9700\u6c42\u5c01\u88c5\u6210\u547d\u4ee4\uff0c\u6bd4\u5982\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>\/user:write-tests<\/code>\u00a0\u2192 \u751f\u6210\u6d4b\u8bd5\u7528\u4f8b<\/li>\n\n\n\n<li><code>\/project:lint<\/code>\u00a0\u2192 \u6309\u56e2\u961f\u89c4\u8303\u683c\u5f0f\u5316\u4ee3\u7801<\/li>\n\n\n\n<li><code>\/user:explain<\/code>\u00a0\u2192 \u628a\u590d\u6742\u4ee3\u7801\u89e3\u91ca\u6210\u4eba\u8bdd<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u4e09\u63d0\u793a\u4e0e\u601d\u8003\u7b56\u7565\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E4%B8%89%E6%8F%90%E7%A4%BA%E4%B8%8E%E6%80%9D%E8%80%83%E7%AD%96%E7%95%A5\"><strong>\u4e09\u3001\u63d0\u793a\u4e0e\u601d\u8003\u7b56\u7565<\/strong><\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"xml-\u6807\u7b7e\u7ed3\u6784\u5316\u63d0\u793a\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#xml-%E6%A0%87%E7%AD%BE%E7%BB%93%E6%9E%84%E5%8C%96%E6%8F%90%E7%A4%BA\"><strong>XML \u6807\u7b7e\u7ed3\u6784\u5316\u63d0\u793a<\/strong><\/a><\/h3>\n\n\n\n<p>Claude \u5bf9\u7ed3\u6784\u5316\u8bed\u8a00\u6bd4\u8f83\u654f\u611f\uff0c\u4f7f\u7528\u7c7b\u4f3c XML \u7684\u5206\u5757\u683c\u5f0f\uff0c\u53ef\u4ee5\u663e\u8457\u63d0\u5347\u63d0\u793a\u8bcd\u7684\u6e05\u6670\u5ea6\u4e0e\u53ef\u63a7\u6027\u3002\u63a8\u8350\u4f7f\u7528\u5982\u4e0b\u7ed3\u6784\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;instruction&gt;\u4f60\u5e0c\u671b Claude \u6267\u884c\u7684\u4e3b\u8981\u4efb\u52a1\u6216\u76ee\u6807&lt;\/instruction&gt;&lt;context&gt;\u4efb\u52a1\u7684\u80cc\u666f\u4fe1\u606f\uff0c\u6bd4\u5982\u6d89\u53ca\u7684\u6846\u67b6\u3001\u4e1a\u52a1\u903b\u8f91\u3001\u56e2\u961f\u89c4\u8303\u7b49&lt;\/context&gt;&lt;code_example&gt;\u53ef\u4ee5\u53c2\u8003\u7684\u4ee3\u7801\u7247\u6bb5\u3001\u63a5\u53e3\u89c4\u8303\u6216\u5df2\u6709\u5b9e\u73b0&lt;\/code_example&gt;<\/code><\/pre>\n\n\n\n<p>\u8fd9\u79cd\u5199\u6cd5\u80fd\u5e2e\u52a9 Claude \u66f4\u51c6\u786e\u5730\u533a\u5206 &#8220;<strong>\u4f60\u8981\u5b83\u505a\u4ec0\u4e48<\/strong>&#8221; \u548c &#8220;<strong>\u4f60\u63d0\u4f9b\u4e86\u54ea\u4e9b\u8f85\u52a9\u4fe1\u606f<\/strong>&#8220;\uff0c\u907f\u514d\u5b83\u628a\u80cc\u666f\u5f53\u6210\u76ee\u6807\u6765\u6267\u884c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u9884\u6fc0\u6d3b\u5148\u5b66\u4f1a\u518d\u52a8\u624b\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E9%A2%84%E6%BF%80%E6%B4%BB%E5%85%88%E5%AD%A6%E4%BC%9A%E5%86%8D%E5%8A%A8%E6%89%8B\"><strong>\u9884\u6fc0\u6d3b\uff1a\u5148\u5b66\u4f1a\uff0c\u518d\u52a8\u624b<\/strong><\/a><\/h3>\n\n\n\n<p>Claude \u662f\u53ef\u4ee5\u5b66\u4e60\u7684\uff0c\u5173\u952e\u662f\u4f60\u5f97\u8ba9\u5b83\u5728\u884c\u52a8\u524d<strong>\u5148\u7406\u89e3\u4e0a\u4e0b\u6587<\/strong>\u3002<\/p>\n\n\n\n<p>\u6bd4\u5982\uff1a<\/p>\n\n\n\n<p>\u4f60\u5e0c\u671b\u5b83\u91cd\u6784\u4e00\u4e2a\u540e\u7aef\u6a21\u5757\uff0c\u4e0d\u8981\u4e00\u4e0a\u6765\u5c31\u8bf4 &#8220;\u91cd\u6784\u8fd9\u6bb5\u4ee3\u7801&#8221;\uff0c\u800c\u662f\u5148\u8ba9\u5b83\u9605\u8bfb\u6574\u4e2a\u6a21\u5757\u3001\u5206\u6790\u76ee\u5f55\u7ed3\u6784\u3001\u603b\u7ed3\u5df2\u6709\u529f\u80fd\uff0c\u518d\u8fdb\u5165\u7f16\u7801\u9636\u6bb5\u3002<\/p>\n\n\n\n<p>\u5206\u6b65\u9aa4\u64cd\u4f5c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u8981\u6c42 Claude \u9605\u8bfb\u7279\u5b9a\u6587\u4ef6\u5939\uff08\u5982\u00a0<code>\/src\/services\/user\/<\/code>\uff09\uff0c\u5e76\u8ba9\u5b83\u8f93\u51fa\u603b\u7ed3\uff1b<\/li>\n\n\n\n<li>\u786e\u4fdd\u5b83\u5df2\u7ecf\u7406\u89e3\u540e\uff0c\u518d\u4e0b\u8fbe\u5177\u4f53\u4efb\u52a1\uff0c\u4f8b\u5982 &#8220;\u5c06 A \u529f\u80fd\u8fc1\u79fb\u5230 B \u6a21\u5757\u4e2d\u5e76\u4f18\u5316\u903b\u8f91&#8221;\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u8fd9\u79cd\u9884\u6fc0\u6d3b\u5f0f\u5f15\u5bfc\uff0c\u6bd4\u76f4\u63a5\u629b\u4efb\u52a1\u66f4\u53ef\u9760\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u5f3a\u5236\u6df1\u5ea6\u601d\u8003\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E5%BC%BA%E5%88%B6%E6%B7%B1%E5%BA%A6%E6%80%9D%E8%80%83\"><strong>\u5f3a\u5236\u6df1\u5ea6\u601d\u8003<\/strong><\/a><\/h3>\n\n\n\n<p>\u4ece\u63d0\u793a\u8bcd\u7684\u89d2\u5ea6\u6765\u770b\uff0cClaude \u6709\u6df1\u5ea6\u601d\u8003\u6a21\u5f0f\uff0c\u4f46\u662f\u9ed8\u8ba4\u4e0d\u542f\u7528\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u5173\u952e\u8bcd\u5524\u8d77\u5b83\u8fdb\u5165<strong>\u8ba4\u771f\u601d\u8003<\/strong>\u7684\u72b6\u6001\u3002<\/p>\n\n\n\n<p>\u5e38\u7528\u5173\u952e\u8bcd\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>think harder<\/code><\/li>\n\n\n\n<li><code>ultrathink<\/code><\/li>\n\n\n\n<li><code>step-by-step reasoning<\/code><\/li>\n<\/ul>\n\n\n\n<p>\u6dfb\u52a0\u4e0a\u8ff0\u5173\u952e\u8bcd\u540e\uff0c\u867d\u7136\u54cd\u5e94\u65f6\u95f4\u7a0d\u957f\uff0c\u4f46\u6a21\u578b\u8f93\u51fa\u8d28\u91cf\u4f1a\u663e\u8457\u63d0\u5347\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>I need to implement a new authentication system using OAuth2 for our API. Think deeply about the best approach for implementing this in our codebase. think about potential security vulnerabilities in this approach think harder about edge cases we should handle <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u63d0\u4f9b\u6e05\u6670\u7684\u9700\u6c42\u6587\u6863\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E6%8F%90%E4%BE%9B%E6%B8%85%E6%99%B0%E7%9A%84%E9%9C%80%E6%B1%82%E6%96%87%E6%A1%A3\"><strong>\u63d0\u4f9b\u6e05\u6670\u7684\u9700\u6c42\u6587\u6863<\/strong><\/a><\/h3>\n\n\n\n<p>Claude \u4e0d\u662f\u4f60\u8111\u5185\u7684\u590d\u5236\u4eba\uff0c\u5982\u679c\u4f60\u7684\u6307\u4ee4\u542b\u7cca\u3001\u4fe1\u606f\u4e0d\u5168\uff0c\u5b83\u5c31\u53ea\u80fd\u778e\u731c\uff0c\u7ed3\u679c\u5341\u6709\u516b\u4e5d\u90fd\u4e0d\u51c6\u3002<\/p>\n\n\n\n<p>\u6b63\u786e\u505a\u6cd5\u662f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u82b1\u65f6\u95f4\u5199\u6e05\u695a\u4f60\u8981\u5b83\u5b8c\u6210\u7684\u529f\u80fd\u70b9\uff1b<\/li>\n\n\n\n<li>\u660e\u786e\u6d89\u53ca\u54ea\u4e9b\u63a5\u53e3\u3001\u4ea4\u4e92\u65b9\u5f0f\u3001\u8fb9\u754c\u6761\u4ef6\uff1b<\/li>\n\n\n\n<li>\u5982\u679c\u80fd\u753b\u56fe\uff08\u6d41\u7a0b\u56fe\u3001\u6570\u636e\u6d41\uff09\u5c31\u66f4\u597d\u4e86\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u4f60\u5199\u5f97\u8d8a\u6e05\u6670\uff0cClaude \u8d8a\u80fd\u51c6\u786e\u6267\u884c\uff1b \u4f60\u6a21\u7cca\u5e26\u8fc7\uff0c\u5b83\u5c31\u53ea\u80fd\u542c\u4e2a\u54cd\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u56db\u8f6f\u4ef6\u5f00\u53d1\u5b9e\u8df5\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E5%9B%9B%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%AE%9E%E8%B7%B5\"><strong>\u56db\u3001\u8f6f\u4ef6\u5f00\u53d1\u5b9e\u8df5<\/strong><\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u4efb\u52a1\u62c6\u89e3\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E4%BB%BB%E5%8A%A1%E6%8B%86%E8%A7%A3\"><strong>\u4efb\u52a1\u62c6\u89e3<\/strong><\/a><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5c0f\u4efb\u52a1<\/strong>\uff1a\u4e00\u6b21\u6027\u53d1\u9001\u660e\u786e\u9700\u6c42\uff0cClaude \u53ef\u5feb\u901f\u5b8c\u6210\uff0c\u9002\u5408\u5982 &#8220;\u91cd\u5199\u6ce8\u91ca&#8221;\u3001&#8221;\u683c\u5f0f\u5316\u5f53\u524d\u6587\u4ef6&#8221; \u7b49\u573a\u666f\u3002<\/li>\n\n\n\n<li><strong>\u590d\u6742\u4efb\u52a1<\/strong>\uff1a\u5efa\u8bae\u624b\u52a8\u62c6\u5206\u6b65\u9aa4\uff0c\u4f8b\u5982\uff1a<\/li>\n\n\n\n<li>\u7b2c\u4e00\u6b65\uff1a\u521b\u5efa API \u63a5\u53e3<\/li>\n\n\n\n<li>\u7b2c\u4e8c\u6b65\uff1a\u6dfb\u52a0\u5b57\u6bb5\u9a8c\u8bc1<\/li>\n\n\n\n<li>\u7b2c\u4e09\u6b65\uff1a\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b<\/li>\n\n\n\n<li>\u7b2c\u56db\u6b65\uff1a\u5199\u6587\u6863\u6216 PR \u63cf\u8ff0<br>\u62c6\u89e3\u6709\u52a9\u4e8e Claude \u805a\u7126\u4e0a\u4e0b\u6587\uff0c\u907f\u514d token \u8d85\u9650\u6216\u903b\u8f91\u6df7\u4e71\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u7406\u89e3\u9879\u76ee\u4e0a\u4e0b\u6587\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E7%90%86%E8%A7%A3%E9%A1%B9%E7%9B%AE%E4%B8%8A%E4%B8%8B%E6%96%87\"><strong>\u7406\u89e3\u9879\u76ee\u4e0a\u4e0b\u6587<\/strong><\/a><\/h3>\n\n\n\n<p>\u5728\u8ba9 Claude \u4fee\u6539\u4ee3\u7801\u524d\uff0c\u6700\u597d\u5148\u8ba9\u5b83\u5206\u6790\u9879\u76ee\u7ed3\u6784\u3002\u5e38\u89c1\u505a\u6cd5\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7c98\u8d34\u6570\u636e\u5e93 schema\uff0c\u8ba9 Claude \u719f\u6089\u8868\u7ed3\u6784\u548c\u5b57\u6bb5\u7c7b\u578b<\/li>\n\n\n\n<li>\u5c55\u793a\u9519\u8bef\u5904\u7406\u903b\u8f91\u3001\u9274\u6743\u903b\u8f91\u3001\u76ee\u5f55\u7ed3\u6784\u7b49\u6838\u5fc3\u6846\u67b6\u5185\u5bb9<\/li>\n\n\n\n<li>\u901a\u8fc7 CLAUDE.md \u660e\u786e\u98ce\u683c\u89c4\u8303\u548c\u4f9d\u8d56\u6846\u67b6\uff08\u5982\u662f\u5426\u4f7f\u7528 DRF\u3001\u662f\u5426\u81ea\u5b9a\u4e49\u5f02\u5e38\u5904\u7406\u7b49\uff09<\/li>\n<\/ul>\n\n\n\n<p>Claude \u7406\u89e3\u8d8a\u6e05\u6670\uff0c\u751f\u6210\u7684\u4ee3\u7801\u8d8a\u8d34\u5408\u9879\u76ee\u73b0\u72b6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"linux-\u547d\u4ee4\u8f85\u52a9\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#linux-%E5%91%BD%E4%BB%A4%E8%BE%85%E5%8A%A9\"><strong>Linux \u547d\u4ee4\u8f85\u52a9<\/strong><\/a><\/h3>\n\n\n\n<p>\u4f60\u53ef\u4ee5\u76f4\u63a5\u7528\u65e5\u5e38\u8bed\u8a00\u8ba9 Claude \u5e2e\u4f60\u5199\u51fa\u590d\u6742\u7684 Linux \u547d\u4ee4\u3002\u5178\u578b\u4f8b\u5b50\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5217\u51fa\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709 Java \u6587\u4ef6\u4e2d\u884c\u6570\u6700\u591a\u7684\u524d 3 \u4e2a<\/li>\n\n\n\n<li>\u67e5\u627e\u6700\u8fd1 7 \u5929\u5185\u88ab\u4fee\u6539\u8fc7\u7684 Markdown \u6587\u4ef6<\/li>\n\n\n\n<li>\u6279\u91cf\u91cd\u547d\u540d\u7b26\u5408\u7279\u5b9a\u89c4\u5219\u7684\u6587\u4ef6<\/li>\n\n\n\n<li>\u7edf\u8ba1\u6bcf\u4e2a Python \u6587\u4ef6\u7684\u51fd\u6570\u6570\u91cf\u5e76\u6392\u5e8f<\/li>\n<\/ul>\n\n\n\n<p>Claude \u4f1a\u8f93\u51fa\u5bf9\u5e94\u7684 Bash \u547d\u4ee4\uff0c\u5e76\u89e3\u91ca\u542b\u4e49\uff0c\u9002\u5408\u811a\u672c\u751f\u6210\u3001\u81ea\u52a8\u5316\u5904\u7406\u6216\u547d\u4ee4\u5b66\u4e60\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u4e94\u6210\u672c\u4e0e\u6a21\u578b\u7ba1\u7406\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E4%BA%94%E6%88%90%E6%9C%AC%E4%B8%8E%E6%A8%A1%E5%9E%8B%E7%AE%A1%E7%90%86\"><strong>\u4e94\u3001\u6210\u672c\u4e0e\u6a21\u578b\u7ba1\u7406<\/strong><\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u6a21\u578b\u5207\u6362\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E6%A8%A1%E5%9E%8B%E5%88%87%E6%8D%A2\"><strong>\u6a21\u578b\u5207\u6362<\/strong><\/a><\/h3>\n\n\n\n<p><code>\/model<\/code>&nbsp;\u5207\u6362&nbsp;<code>Claude Sonnet 4<\/code>\uff08\u9ed8\u8ba4\uff0c\u6027\u4ef7\u6bd4\u9ad8\uff09\u548c&nbsp;<code>Claude Opus<\/code>\uff08Max \u7528\u6237\u4e13\u5c5e\uff0c\u6027\u80fd\u66f4\u5f3a\uff09\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u76d1\u63a7-token-\u6210\u672c\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E7%9B%91%E6%8E%A7-token-%E6%88%90%E6%9C%AC\"><strong>\u76d1\u63a7 token \u6210\u672c<\/strong><\/a><\/h3>\n\n\n\n<p>\u4f7f\u7528&nbsp;<code>\/cost<\/code>&nbsp;\u53ef\u4ee5\u67e5\u770b\u6d88\u8d39\u60c5\u51b5\uff0c\u53ef\u4ee5\u67e5\u770b\u603b\u82b1\u8d39\u3001\u603b\u4f7f\u7528\u65f6\u957f\u3001\u6a21\u578b\u4f7f\u7528\u60c5\u51b5\u7b49\u4fe1\u606f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cc.deeptoai.com\/_next\/image?url=%2F_next%2Fstatic%2Fmedia%2Fcost-monitoring.322e3223.jpg&amp;w=3840&amp;q=75\" alt=\"\u6210\u672c\u76d1\u63a7\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u4f7f\u7528-ccusage-\u6d88\u8017\u76d1\u63a7\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E4%BD%BF%E7%94%A8-ccusage-%E6%B6%88%E8%80%97%E7%9B%91%E6%8E%A7\"><strong>\u4f7f\u7528 ccusage \u6d88\u8017\u76d1\u63a7<\/strong><\/a><\/h3>\n\n\n\n<p><code>\/cost<\/code>&nbsp;\u7684\u4f5c\u7528\u6bd4\u8f83\u5c40\u9650\uff0c\u53ea\u80fd\u67e5\u770b\u5f53\u524d\u4f1a\u8bdd\u7684\u6d88\u8017\u3002\u63a8\u8350\u4f7f\u7528&nbsp;<code>ccusage<\/code>&nbsp;\u8fdb\u884c\u66f4\u7ec6\u81f4\u7684\u76d1\u63a7\u3002<\/p>\n\n\n\n<p>\u5b89\u88c5\u65b9\u5f0f\uff1a<code>sudo npm install -g ccusage<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cc.deeptoai.com\/_next\/image?url=%2F_next%2Fstatic%2Fmedia%2Fccusage-monitoring.7445775a.jpg&amp;w=3840&amp;q=75\" alt=\"\u4f7f\u7528\u76d1\u63a7\"\/><\/figure>\n\n\n\n<p>ccusage \u5176\u4ed6\u5e38\u7528\u6307\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u57fa\u7840\u7528\u6cd5  ccusage          # \u663e\u793a\u6bcf\u65e5\u62a5\u544a\uff08\u9ed8\u8ba4\uff09  ccusage daily    # \u6bcf\u65e5 token \u4f7f\u7528\u91cf\u53ca\u8d39\u7528  ccusage monthly  # \u6708\u5ea6\u6c47\u603b\u62a5\u544a  ccusage session  # \u6309\u4f1a\u8bdd\u7edf\u8ba1\u7528\u91cf  ccusage blocks   # 5\u5c0f\u65f6\u8ba1\u8d39\u7a97\u53e3\u6570\u636e  # \u5b9e\u65f6\u76d1\u63a7  ccusage blocks --live  # \u5b9e\u65f6\u7528\u91cf\u4eea\u8868\u76d8  # \u7b5b\u9009\u4e0e\u9009\u9879  ccusage daily --since 20250525 --until 20250530  # \u6307\u5b9a\u65e5\u671f\u8303\u56f4  ccusage daily --json      # \u8f93\u51fa JSON \u683c\u5f0f  ccusage daily --breakdown # \u6309\u6a21\u578b\u7ec6\u5206\u8d39\u7528<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u516d\u8fdb\u9636\u529f\u80fd\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E5%85%AD%E8%BF%9B%E9%98%B6%E5%8A%9F%E8%83%BD\"><strong>\u516d\u3001\u8fdb\u9636\u529f\u80fd<\/strong><\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u4f7f\u7528-git-worktrees-\u8fd0\u884c\u5e76\u884c-claude-code-\u4f1a\u8bdd\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E4%BD%BF%E7%94%A8-git-worktrees-%E8%BF%90%E8%A1%8C%E5%B9%B6%E8%A1%8C-claude-code-%E4%BC%9A%E8%AF%9D\"><strong>\u4f7f\u7528 Git worktrees \u8fd0\u884c\u5e76\u884c Claude Code \u4f1a\u8bdd<\/strong><\/a><\/h3>\n\n\n\n<p>\u5728\u4f7f\u7528 Claude Code \u65f6\uff0c\u5982\u679c\u4f60\u5e0c\u671b\u540c\u65f6\u5904\u7406\u591a\u4e2a\u4efb\u52a1\u3001\u591a\u4e2a\u5206\u652f\uff0c\u5e76\u8ba9\u6bcf\u4e2a\u5b9e\u4f8b\u5f7c\u6b64\u5b8c\u5168\u9694\u79bb\uff0cGit worktrees \u662f\u975e\u5e38\u5b9e\u7528\u7684\u65b9\u6848\u3002<\/p>\n\n\n\n<p>Git worktree \u5141\u8bb8\u4f60\u5c06\u540c\u4e00\u4e2a Git \u4ed3\u5e93\u7684\u4e0d\u540c\u5206\u652f\u5206\u522b\u68c0\u51fa\u5230\u72ec\u7acb\u7684\u76ee\u5f55\u4e2d\u3002\u6bcf\u4e2a worktree \u6709\u81ea\u5df1\u7684\u5de5\u4f5c\u76ee\u5f55\u3001\u9694\u79bb\u7684\u6587\u4ef6\u72b6\u6001\uff0c\u4f46\u5171\u4eab\u76f8\u540c\u7684 Git \u5386\u53f2\u3002<\/p>\n\n\n\n<p>\u5b98\u65b9\u6587\u6863\u89c1\uff1a<strong><a rel=\"nofollow\" href=\"https:\/\/git-scm.com\/docs\/git-worktree\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/git-scm.com\/docs\/git-worktree<\/a><\/strong><\/p>\n\n\n\n<p><strong>\u6b65\u9aa4\u4e00\uff1a\u521b\u5efa\u65b0\u7684 worktree<\/strong><\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u8981\u521b\u5efa\u65b0\u7684\u5206\u652f\u5e76\u542f\u52a8\u4e00\u4e2a\u65b0\u7684\u5de5\u4f5c\u526f\u672c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git worktree add ..\/project-feature-a -b feature-a<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u4f60\u5df2\u7ecf\u6709\u4e00\u4e2a\u73b0\u6210\u7684\u5206\u652f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git worktree add ..\/project-bugfix bugfix-123<\/code><\/pre>\n\n\n\n<p>\u8fd9\u4f1a\u5728\u9879\u76ee\u5916\u90e8\uff08\u5982&nbsp;<code>..\/project-feature-a<\/code>\uff09\u521b\u5efa\u4e00\u4e2a\u72ec\u7acb\u7684\u76ee\u5f55\uff0c\u5176\u4e2d\u5305\u542b\u8be5\u5206\u652f\u7684\u5b8c\u6574\u5de5\u4f5c\u76ee\u5f55\u3002<\/p>\n\n\n\n<p><strong>\u6b65\u9aa4\u4e8c\uff1a\u5728\u6bcf\u4e2a worktree \u4e2d\u8fd0\u884c Claude Code<\/strong><\/p>\n\n\n\n<p>\u8fdb\u5165\u65b0\u7684 worktree\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ..\/project-feature-aclaude<\/code><\/pre>\n\n\n\n<p>\u518d\u5f00\u4e00\u4e2a worktree\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ..\/project-bugfixclaude<\/code><\/pre>\n\n\n\n<p>\u6bcf\u4e2a\u4f1a\u8bdd\u8fd0\u884c\u5728\u5404\u81ea\u72ec\u7acb\u7684\u4ee3\u7801\u73af\u5883\u4e2d\uff0cClaude Code \u5b9e\u4f8b\u4e92\u4e0d\u5e72\u6270\u3002<\/p>\n\n\n\n<p><strong>\u6b65\u9aa4\u4e09\uff1a\u7ba1\u7406 worktree<\/strong><\/p>\n\n\n\n<p>\u5217\u51fa\u5f53\u524d\u6240\u6709 worktree\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git worktree list<\/code><\/pre>\n\n\n\n<p>\u5220\u9664\u4e00\u4e2a worktree\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git worktree remove ..\/project-feature-a<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f\uff1a\u5220\u9664 worktree \u4e0d\u4f1a\u5220\u9664 Git \u5206\u652f\uff0c\u53ea\u4f1a\u6e05\u7406\u76ee\u5f55\u3002<\/p>\n\n\n\n<p>\u6ce8\u610f\u4e8b\u9879\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6bcf\u4e2a worktree \u76f8\u5f53\u4e8e\u72ec\u7acb\u7684 Claude Code \u6c99\u76d2\uff0c\u9002\u5408\u5e76\u884c\u5904\u7406\u591a\u4e2a\u4efb\u52a1\uff08\u5982 bug \u4fee\u590d\u3001\u7279\u6027\u5f00\u53d1\u3001\u91cd\u6784\uff09\u3002<\/li>\n\n\n\n<li>\u5728\u4e00\u4e2a worktree \u4e2d\u7684\u66f4\u6539\u4e0d\u4f1a\u5f71\u54cd\u53e6\u4e00\u4e2a worktree\u3002<\/li>\n\n\n\n<li>\u6240\u6709 worktrees \u5171\u4eab\u76f8\u540c\u7684 Git \u5386\u53f2\u548c\u8fdc\u7a0b\u8bbe\u7f6e\uff0c\u4fbf\u4e8e\u7edf\u4e00\u63a8\u9001\u3002<\/li>\n\n\n\n<li>\u4f7f\u7528\u6709\u610f\u4e49\u7684\u76ee\u5f55\u540d\uff08\u5982\u00a0<code>project-auth<\/code>,\u00a0<code>project-api-v2<\/code>\uff09\u80fd\u5e2e\u52a9\u4f60\u5feb\u901f\u533a\u5206\u4efb\u52a1\u3002<\/li>\n\n\n\n<li>\u6bcf\u4e2a\u65b0 worktree \u521b\u5efa\u540e\uff0c\u52a1\u5fc5\u521d\u59cb\u5316\u5f00\u53d1\u73af\u5883\uff0c\u4f8b\u5982\uff1a<\/li>\n\n\n\n<li><strong>JavaScript \u9879\u76ee<\/strong>\uff1anpm install<\/li>\n\n\n\n<li><strong>Python \u9879\u76ee<\/strong>\uff1apython -m venv .venv<br>source .venv\/bin\/activate<br>pip install -r requirements.txt<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"mcp\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#mcp\"><strong>MCP<\/strong><\/a><\/h3>\n\n\n\n<p>\u4f60\u53ef\u4ee5\u5728 Claude Code \u4e2d\u63a5\u5165 MCP\uff08\u5982 Postgres\uff09\u3001\u7f51\u9875\u3001\u56fe\u50cf\u5904\u7406\u7b49\uff0c\u4f7f Claude \u80fd\u76f4\u63a5\u64cd\u4f5c\u5916\u90e8\u7cfb\u7edf\u3002<\/p>\n\n\n\n<p><strong>\u6dfb\u52a0 MCP \u793a\u4f8b:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>claude mcp add &lt;name&gt; &lt;command&gt; &#91;args...]# \u793a\u4f8bclaude mcp add pg-server \/path\/to\/postgres-mcp --connection-string \"postgresql:\/\/user:pass@localhost:5432\/mydb\"<\/code><\/pre>\n\n\n\n<p><strong>\u7ba1\u7406 MCP\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>claude mcp list             # \u67e5\u770b\u5df2\u914d\u7f6e\u7684\u670d\u52a1claude mcp get &lt;name&gt;       # \u67e5\u770b\u670d\u52a1\u8be6\u60c5claude mcp remove &lt;name&gt;    # \u5220\u9664\u670d\u52a1<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"claude-code-github-action\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#claude-code-github-action\"><strong>Claude Code GitHub Action<\/strong><\/a><\/h3>\n\n\n\n<p>Claude Code GitHub Actions \u662f\u4e00\u5957 AI \u9a71\u52a8\u7684 GitHub \u81ea\u52a8\u5316\u5de5\u5177\uff0c\u65e8\u5728\u5c06 Claude \u7684\u4ee3\u7801\u751f\u6210\u4e0e\u534f\u4f5c\u80fd\u529b\u65e0\u7f1d\u6574\u5408\u8fdb\u4f60\u7684\u5f00\u53d1\u5de5\u4f5c\u6d41\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cc.deeptoai.com\/_next\/image?url=%2F_next%2Fstatic%2Fmedia%2Fgithub-action.4b12c21b.jpg&amp;w=3840&amp;q=75\" alt=\"GitHub Action \u96c6\u6210\"\/><\/figure>\n\n\n\n<p><strong>\u5b89\u88c5\u65b9\u5f0f<\/strong>\uff1a\u5728 Claude Code \u4e2d\u6267\u884c&nbsp;<code>\/install-github-app<\/code>&nbsp;\uff0c\u6309\u7167\u6d41\u7a0b\u5b89\u88c5\u5373\u53ef\u3002<\/p>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u5728 PR \u6216\u8005 issue \u4e2d&nbsp;<code>@claude<\/code>\uff0c\u8ba9\u5b83\u5b8c\u6210\u6307\u5b9a\u4efb\u52a1\uff1a<\/p>\n\n\n\n<p><strong>\u901a\u8fc7 issue \u81ea\u52a8\u751f\u6210 PR\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@claude implement this feature based on the issue description<\/code><\/pre>\n\n\n\n<p><strong>\u8bf7\u6c42\u4ee3\u7801\u5efa\u8bae\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@claude how should I implement user authentication for this endpoint?<\/code><\/pre>\n\n\n\n<p><strong>\u4fee\u590d bug\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@claude fix the TypeError in the user dashboard component<\/code><\/pre>\n\n\n\n<p><strong>\ud83d\udd17 \u6269\u5c55\u9605\u8bfb\uff1a<\/strong>&nbsp;<a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-production-workflow\">Claude Code \u751f\u4ea7\u5de5\u4f5c\u6d41<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u5c06-claude-\u5f53\u4f5c\u7528\u4f5c\u7c7b-unix-\u7a0b\u5e8f\"><a rel=\"nofollow\" href=\"https:\/\/cc.deeptoai.com\/docs\/zh\/best-practices\/claude-code-comprehensive-guide#%E5%B0%86-claude-%E5%BD%93%E4%BD%9C%E7%94%A8%E4%BD%9C%E7%B1%BB-unix-%E7%A8%8B%E5%BA%8F\"><strong>\u5c06 Claude \u5f53\u4f5c\u7528\u4f5c\u7c7b Unix \u7a0b\u5e8f<\/strong><\/a><\/h3>\n\n\n\n<p>Claude \u4e0d\u53ea\u662f\u4e00\u4e2a\u4ea4\u4e92\u5f0f AI\uff0c\u5b83\u8fd8\u53ef\u4ee5\u50cf\u4e00\u4e2a\u666e\u901a\u7684 Unix \u547d\u4ee4\u884c\u5de5\u5177\u90a3\u6837\uff0c\u878d\u5165\u4f60\u7684\u5f00\u53d1\u6d41\u7a0b\u4e2d\u3002<\/p>\n\n\n\n<p>\u6bd4\u5982\u4f60\u53ef\u4ee5\u7528\u7ba1\u9053&nbsp;<code>|<\/code>&nbsp;\u4e3a Claude \u8f93\u5165\u5185\u5bb9\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat build-error.txt | claude -p 'concisely explain the root cause of this build error' &gt; output.txt<\/code><\/pre>\n\n\n\n<p>\u9664\u4e86\u7eaf\u6587\u672c\u5916\uff0c\u5728\u8f93\u51fa\u7684\u65f6\u5019\u8fd8\u53ef\u4ee5\u6307\u5b9a\u8f93\u51fa\u683c\u5f0f\uff1a<\/p>\n\n\n\n<p><strong>\u6587\u672c\u683c\u5f0f\uff08\u9ed8\u8ba4\uff09:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat data.txt | claude -p 'summarize this data' --output-format text &gt; summary.txt<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4ec5\u8f93\u51fa\u7eaf\u6587\u672c\u5185\u5bb9\u3002<\/li>\n\n\n\n<li>\u9002\u5408\u65e5\u5e38\u5bf9\u8bdd\u3001\u6458\u8981\u3001\u8bf4\u660e\u7b49\u4efb\u52a1\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>JSON \u683c\u5f0f\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat code.py | claude -p 'analyze this code for bugs' --output-format json &gt; analysis.json<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8f93\u51fa\u4e3a JSON \u6570\u7ec4\uff0c\u5305\u542b Claude \u7684\u54cd\u5e94\u3001\u5143\u6570\u636e\uff08\u5982 token \u6210\u672c\u3001\u8fd0\u884c\u65f6\u95f4\u7b49\uff09\u3002<\/li>\n\n\n\n<li>\u9002\u5408\u5c06\u7ed3\u679c\u5d4c\u5165\u81ea\u52a8\u5316\u6d41\u7a0b\u6216\u524d\u7aef\u5c55\u793a\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u6d41\u5f0f JSON\uff08stream-json\uff09<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat log.txt | claude -p 'parse this log file for errors' --output-format stream-json<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5b9e\u65f6\u9010\u6761\u8f93\u51fa JSON \u6d88\u606f\uff0c\u6bcf\u6761\u662f\u4e00\u4e2a\u72ec\u7acb JSON \u5bf9\u8c61\u3002<\/li>\n\n\n\n<li>\u66f4\u9002\u5408\u5904\u7406\u5927\u6587\u4ef6\u3001\u957f\u8f93\u51fa\u6216\u5b9e\u65f6\u76d1\u63a7\u7b49\u573a\u666f\u3002<\/li>\n\n\n\n<li>\u6ce8\u610f\uff1a\u6574\u4e2a\u8f93\u51fa\u4e0d\u662f\u5b8c\u6574 JSON \u6570\u7ec4\uff0c\u9700\u9010\u6761\u5904\u7406\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u4f60\u751a\u81f3\u8fd8\u53ef\u4ee5\u628a Claude \u52a0\u5165\u6784\u5efa\u811a\u672c\uff0c\u4f5c\u4e3a\u4ee3\u7801\u5ba1\u67e5\u5de5\u5177\u8fd0\u884c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{  \"scripts\": {    \"lint:claude\": \"claude -p 'you are a linter. please look at the changes vs. main and report any issues related to typos. report the filename and line number on one line, and a description of the issue on the second line. do not return any other text.'\"  }}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Claude Code \u7b80\u76f4\u5f3a\u5230\u79bb\u8c31\uff01\uff01\uff01 \u8fd9\u6bb5\u65f6\u95f4\u4e00\u76f4\u5728\u73a9 Claude Code\uff0c\u8d8a\u7528\u8d8a\u4e0a\u5934\u3002\u4e0d\u4ec5\u7f16\u7a0b\u80fd\u529b\u6781\u5176\u5f3a\u608d\uff0c\u66f4\u662f\u5e26\u6765\u4eba\u673a\u4ea4\u4e92\u7684\u65b0\u8303\u5f0f\u3002\u7528\u5f97\u8d8a\u4e45\u8d8a\u53d1\u73b0\uff0c\u5b83\u8fdc\u4e0d\u53ea\u662f\u4e00\u4e2a\u5199\u4ee3\u7801\u7684 AI\u3002 \u6770\u4e00\u8d81\u673a\u7cfb\u7edf\u5730\u68b3\u7406\u4e86 Claude Code &#8230;<\/p>\n","protected":false},"author":1,"featured_media":1248,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,33],"tags":[52],"topic":[],"class_list":["post-1162","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-self-learning","category-ai-course","tag-claude-code"],"_links":{"self":[{"href":"https:\/\/www.agidt.com\/index.php?rest_route=\/wp\/v2\/posts\/1162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.agidt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.agidt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.agidt.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.agidt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1162"}],"version-history":[{"count":1,"href":"https:\/\/www.agidt.com\/index.php?rest_route=\/wp\/v2\/posts\/1162\/revisions"}],"predecessor-version":[{"id":1165,"href":"https:\/\/www.agidt.com\/index.php?rest_route=\/wp\/v2\/posts\/1162\/revisions\/1165"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.agidt.com\/index.php?rest_route=\/wp\/v2\/media\/1248"}],"wp:attachment":[{"href":"https:\/\/www.agidt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.agidt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.agidt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1162"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.agidt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftopic&post=1162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}