{"id":4218,"date":"2026-07-14T11:41:32","date_gmt":"2026-07-14T11:41:32","guid":{"rendered":"https:\/\/umaax.com\/cavemanshiceaiagentdejijianshuchuyasuochajian01xiangmujianji\/"},"modified":"2026-07-14T11:41:32","modified_gmt":"2026-07-14T11:41:32","slug":"cavemanshiceaiagentdejijianshuchuyasuochajian01xiangmujianji","status":"publish","type":"post","link":"https:\/\/umaax.com\/en\/cavemanshiceaiagentdejijianshuchuyasuochajian01xiangmujianji\/","title":{"rendered":"Caveman\u5b9e\u6d4b \u2013 AI Agent \u7684\u6781\u7b80\u8f93\u51fa\u538b\u7f29\u63d2\u4ef601. \u9879\u76ee\u7b80\u4ecb02. \u9879\u76ee\u5b9e\u6d4b03. \u6316\u4e00\u6316"},"content":{"rendered":"<p>\u4eca\u5929\u53d1\u70b9\u9002\u5408\u8ba9 AI Agent \u7b80\u6d01\u8f93\u51fa\u7684\u4e1c\u897f\u3002<\/p>\n<p>\u5e73\u65f6\u6211\u4eec\u7528 AI Agent \u65f6\uff0c\u8f93\u51fa\u7684\u5185\u5bb9\u4e0d\u7ba1\u5bf9\u4e0d\u5bf9\u90fd\u4f1a\u6709\u4e00\u4e9b\u5570\u91cc\u516b\u55e6\u7684\u5e9f\u8bdd\uff0c\u8bfb\u8d77\u6765\u5f88\u6d6a\u8d39\u6211\u4eec\u7684\u65f6\u95f4\u548c\u7cbe\u529b\uff0c\u7528\u8d77\u6765\u4e5f\u6d6a\u8d39 Token\u3002<\/p>\n<p>\u53ea\u8981\u7ed9\u4f60\u7684 AI Agent \u88c5\u4e0a\u8fd9\u4e2a\u53eb Caveman \u7684GitHub\u9879\u76ee\u4e4b\u540e\uff0c\u8f93\u51fa\u7684\u5185\u5bb9\u7acb\u9a6c\u53d8\u5f97\u7b80\u6d01\u8d77\u6765\uff0c\u53ea\u6709\u5728\u91cd\u70b9\uff0c\u6ca1\u6709\u5e9f\u8bdd\u3002<\/p>\n<p> <img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-81524\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-4.png\"  alt=\"\" width=\"1031\" height=\"675\" \/> <\/p>\n<p>\u00a0<\/p>\n<h1 style=\"text-align: center;\"><span style=\"font-size: 24pt;\">01. \u9879\u76ee\u7b80\u4ecb<\/span><\/h1>\n<p>\u00a0<\/p>\n<p>Caveman \u662f\u4e00\u4e2a\u7ed9 AI Agent \u7528\u7684\u538b\u7f29\u8868\u8fbe\u63d2\u4ef6\u3002<\/p>\n<blockquote>\n<p>\u9879\u76ee\u5730\u5740\uff1ahttps:\/\/github.com\/JuliusBrussee\/caveman<\/p>\n<\/blockquote>\n<p>Caveman\u80fd\u8ba9 Claude Code\u3001Codex\u3001Gemini\u3001Cursor\u3001Windsurf\u3001Cline\u3001Copilot \u7b49\u5c11\u8bf4\u94fa\u57ab\u8bdd\u3001\u573a\u9762\u8bdd\uff0c\u591a\u7ed9\u6709\u6548\u4fe1\u606f\u3002<\/p>\n<p>\u91cd\u70b9\u662f\u538b\u7f29\u201c\u8868\u8fbe\u65b9\u5f0f\u201d\uff0c\u4e0d\u662f\u538b\u7f29\u6a21\u578b\u601d\u8003\u3001\u4e0a\u4e0b\u6587\u3001\u6587\u4ef6\u5185\u5bb9\u6216\u5de5\u5177\u8c03\u7528\u672c\u8eab\u3002\u5b98\u65b9\u8bf4\u7684 65% \u8282\u7701\uff0c\u6307\u7684\u662f\u8f93\u51fa token \u5e73\u5747\u51cf\u5c11\uff0c\u4e0d\u7b49\u4e8e\u603b\u8d26\u5355\u76f4\u63a5\u51cf\u5c11 65%\u3002<\/p>\n<p>Caveman \u7684\u601d\u8def\u662f\u628a\u8bed\u8a00\u4e60\u60ef\u5199\u6210\u5f3a\u89c4\u5219\uff0c\u6301\u7eed\u585e\u7ed9\u4ee3\u7406\u3002\u5305\u62ec\u5220\u9664\u51a0\u8bcd\u3001\u5bd2\u6684\u3001\u5f31\u5316\u8bed\u3001\u8fde\u63a5\u5e9f\u8bdd\uff0c\u5141\u8bb8\u53e5\u5b50\u788e\u7247\u5316\uff0c\u4fdd\u7559\u4ee3\u7801\u3001\u547d\u4ee4\u3001\u9519\u8bef\u3001API \u540d\u79f0\u548c\u6280\u672f\u672f\u8bed\u3002<\/p>\n<p>\u6838\u5fc3\u6280\u80fd\u5305\u62ec caveman\u3001caveman-commit\u3001caveman-review\u3001caveman-stats\u3001caveman-compress\u3001caveman-shrink\u3002<\/p>\n<ul>\n<li>\/caveman\uff1a\u5f00\u542f\u8f93\u51fa\u538b\u7f29\u3002\u652f\u6301 lite\u3001full\u3001ultra\u3001wenyan \u7b49\u5f3a\u5ea6\u3002full \u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002<\/li>\n<li>\/caveman-commit\uff1a\u751f\u6210\u77ed Conventional Commit \u4fe1\u606f\uff0c\u5f3a\u8c03\u4e3a\u4ec0\u4e48\u6539\uff0c\u800c\u4e0d\u662f\u6d41\u6c34\u8d26\u63cf\u8ff0\u6539\u4e86\u4ec0\u4e48\u3002<\/li>\n<li>\/caveman-review\uff1a\u505a\u4ee3\u7801 review \u65f6\u8f93\u51fa\u4e00\u884c\u5f0f\u610f\u89c1\uff0c\u8df3\u8fc7\u5ba2\u5957\u548c\u65e0\u7528\u8868\u626c\u3002<\/li>\n<li>\/caveman-stats\uff1a\u8bfb\u53d6 Claude Code \u672c\u5730\u4f1a\u8bdd\u65e5\u5fd7\uff0c\u4f30\u7b97 token \u4f7f\u7528\u548c\u8282\u7701\u60c5\u51b5\u3002<\/li>\n<li>\/caveman-compress <file>\uff1a\u538b\u7f29 CLAUDE.md\u3001\u504f\u597d\u3001\u9879\u76ee\u7b14\u8bb0\u8fd9\u7c7b\u81ea\u7136\u8bed\u8a00\u8bb0\u5fc6\u6587\u4ef6\u3002<\/li>\n<li>caveman-shrink\uff1a\u4f5c\u4e3a MCP proxy \u5305\u4e00\u5c42\u4e0a\u6e38 MCP server\uff0c\u538b\u7f29 tools\/list\u3001prompts\/list\u3001resources\/list \u91cc\u7684\u63cf\u8ff0\u5b57\u6bb5\u3002<\/li>\n<\/ul>\n<p> <img decoding=\"async\" class=\"aligncenter wp-image-81525\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-5.png\"  alt=\"\" width=\"678\" height=\"381\" \/> <\/p>\n<p>Caveman \u51e0\u4e2a\u6a21\u5f0f\u7684\u5dee\u5f02\uff1a<\/p>\n<ul>\n<li>lite\uff1a\u53ea\u662f\u53bb\u6389\u5e9f\u8bdd\uff0c\u53e5\u5b50\u4ecd\u7136\u6bd4\u8f83\u6b63\u5e38\u3002<\/li>\n<li>full\uff1a\u9ed8\u8ba4\u6a21\u5f0f\u3002\u53e5\u5b50\u66f4\u77ed\uff0c\u5141\u8bb8 fragment\u3002<\/li>\n<li>ultra\uff1a\u66f4\u538b\u7f29\uff0c\u7701\u6389\u66f4\u591a\u8fde\u63a5\u8bcd\u3002<\/li>\n<li>wenyan\uff1a\u6587\u8a00\u538b\u7f29\u6a21\u5f0f\uff0c\u4e3b\u8981\u9762\u5411\u4e2d\u6587\uff0c\u56e0\u4e3a\u4e2d\u6587\u5b57\u7b26\u627f\u8f7d\u4fe1\u606f\u5bc6\u5ea6\u66f4\u9ad8\u3002\u8fd9\u4e2a\u6a21\u5f0f\u5f88\u6709\u8da3\uff0c\u4f46\u4e0d\u9002\u5408\u6240\u6709\u573a\u666f\uff0c\u5c24\u5176\u4e0d\u9002\u5408\u9700\u8981\u9762\u5411\u56e2\u961f\u534f\u4f5c\u3001PR \u8bc4\u8bba\u6216\u65b0\u624b\u89e3\u91ca\u7684\u5185\u5bb9\u3002<\/li>\n<\/ul>\n<p>caveman-compress \u6709\u4e00\u5957\u8c28\u614e\u7684\u6587\u4ef6\u89c4\u5219\uff1a<\/p>\n<ul>\n<li>\u53ea\u5904\u7406\u81ea\u7136\u8bed\u8a00\u6587\u4ef6\uff0c\u6bd4\u5982 .md\u3001.txt\u3001.tex<\/li>\n<li>\u4e0d\u5904\u7406 .py\u3001.js\u3001.json\u3001.yaml\u3001.env\u3001.sql\u3001.sh<\/li>\n<li>\u4ee3\u7801\u5757\u3001inline code\u3001URL\u3001\u8def\u5f84\u3001\u547d\u4ee4\u3001\u6280\u672f\u540d\u8bcd\u5fc5\u987b\u539f\u6837\u4fdd\u7559<\/li>\n<li>\u539f\u6587\u4ef6\u4f1a\u5907\u4efd\u6210 FILE.original.md<\/li>\n<li>\u5982\u679c\u9a8c\u8bc1\u5931\u8d25\uff0c\u4e0d\u8986\u76d6\u539f\u6587\u4ef6<\/li>\n<\/ul>\n<p>\u8fd9\u4e2a\u8bbe\u8ba1\u8bf4\u660e\u4f5c\u8005\u77e5\u9053\u201c\u538b\u7f29\u8bb0\u5fc6\u6587\u4ef6\u201d\u6709\u7834\u574f\u4fe1\u606f\u7684\u98ce\u9669\uff0c\u6240\u4ee5\u505a\u4e86\u6587\u4ef6\u7c7b\u578b\u9650\u5236\u548c\u9a8c\u8bc1\u6d41\u7a0b\u3002<\/p>\n<p>\u00a0<\/p>\n<h1 style=\"text-align: center;\"><span style=\"font-size: 24pt;\">02. \u9879\u76ee\u5b9e\u6d4b<\/span><\/h1>\n<h3><strong>case 1 Bug \u89e3\u91ca<\/strong><\/h3>\n<blockquote>\n<p>\u63d0\u793a\u8bcd\uff1a<\/p>\n<p>\u89e3\u91ca\u4e00\u4e0b\u4e3a\u4ec0\u4e48\u8fd9\u4e2a React \u7ec4\u4ef6\u4f1a\u91cd\u590d\u6e32\u67d3\uff0c\u5e76\u7ed9\u51fa\u6700\u5c0f\u4fee\u590d\u65b9\u6848\uff1a<\/p>\n<p>\u00a0<\/p>\n<p>function UserCard({ user }) {<\/p>\n<p>const options = { showEmail: true };<\/p>\n<p>return <Profile user={user} options={options} \/>;<\/p>\n<p>}<\/p>\n<p>\u00a0<\/p>\n<p>const Profile = React.memo(function Profile({ user, options }) {<\/p>\n<p>console.log(\u201crender profile\u201d);<\/p>\n<p>return <\/p>\n<div>{user.name}<\/div>\n<p>;<\/p>\n<p>});<\/p>\n<\/blockquote>\n<p><strong>\u4e0d\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img decoding=\"async\" class=\"aligncenter wp-image-81526\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-6.png\"  alt=\"\" width=\"678\" height=\"839\" \/> <\/p>\n<p><strong>\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81527\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-7.png\"  alt=\"\" width=\"678\" height=\"596\" \/> <\/p>\n<p>Caveman \u660e\u663e\u66f4\u77ed\uff0c\u5927\u6982\u780d\u6389\u4e09\u5206\u4e4b\u4e00\u5230\u4e00\u534a\u5185\u5bb9\uff0c\u4e14\u6ca1\u6709\u660e\u663e\u9519\u8bef\u3002<\/p>\n<h3><strong>case 2 Debug \u4fee\u590d<\/strong><\/h3>\n<blockquote>\n<p>\u63d0\u793a\u8bcd\uff1a<br \/> \u5e2e\u6211\u6392\u67e5\u8fd9\u4e2a Node.js \u767b\u5f55\u4e2d\u95f4\u4ef6\u7684\u95ee\u9898\u3002\u7528\u6237 token \u5df2\u7ecf\u8fc7\u671f\uff0c\u4f46\u6709\u65f6\u4ecd\u7136\u80fd\u901a\u8fc7\u6821\u9a8c\u3002\u8bf7\u6307\u51fa bug\uff0c\u5e76\u7ed9\u51fa\u4fee\u590d\u4ee3\u7801\u3002function auth(req, res, next) { \u00a0const token = parseToken(req.headers.authorization); \u00a0if (!token) return res.status(401).send(\u201cmissing token\u201d); \u00a0if (token.exp < Date.now() \/ 1000) { \u00a0 \u00a0return res.status(401).send(\u201cexpired\u201d); \u00a0} \u00a0req.user = token.user; \u00a0next();}<\/p>\n<\/blockquote>\n<p><strong>\u4e0d\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81528\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-8.png\"  alt=\"\" width=\"678\" height=\"1108\" \/> <\/p>\n<p><strong>\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81529\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-9.png\"  alt=\"\" width=\"678\" height=\"465\" \/> <\/p>\n<p>Caveman \u7248\u8f93\u51fa Token \u5c11\u5f88\u591a\uff0c\u6b63\u6587\u548c\u4ee3\u7801\u90fd\u66f4\u77ed\uff0c\u4e24\u7248\u90fd\u6307\u51fa exp \u7f3a\u5931\/\u975e\u6cd5\u4f1a\u653e\u884c\u3001\u8fb9\u754c\u5224\u65ad\u5e94\u6309 now >= exp\u3001JWT \u9700\u8981\u9a8c\u7b7e\u3002<\/p>\n<h3><strong>case 3 \u67b6\u6784\u6743\u8861<\/strong><\/h3>\n<blockquote>\n<p>\u63d0\u793a\u8bcd\uff1a\u6211\u4eec\u6b63\u5728\u505a\u4e00\u4e2a B2B SaaS\uff0c\u56e2\u961f 8 \u4e2a\u5de5\u7a0b\u5e08\uff0c\u5f53\u524d\u662f\u5355\u4f53 Rails \u5e94\u7528\u3002\u73b0\u5728\u6709 3 \u4e2a\u6a21\u5757\uff1a\u8ba1\u8d39\u3001\u901a\u77e5\u3001\u62a5\u8868\u3002\u8001\u677f\u60f3\u62c6\u5fae\u670d\u52a1\u3002\u8bf7\u5206\u6790\u662f\u5426\u5e94\u8be5\u62c6\uff0c\u7ed9\u51fa\u5efa\u8bae\u548c\u8fc1\u79fb\u8def\u5f84\u3002<\/p>\n<\/blockquote>\n<p><strong>\u4e0d\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81701\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u5fae\u4fe1\u56fe\u7247_20260710134112_16_1124.png\"  alt=\"\" width=\"678\" height=\"3408\" \/> <\/p>\n<p><strong>\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81564\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-11.png\"  alt=\"\" width=\"678\" height=\"1192\" \/> <\/p>\n<p>\u666e\u901a\u7248\u7ea6 1400 \u5230 1600 token\uff0cCaveman \u7248\u7ea6 650 \u5230 800 token\uff0c\u51cf\u5c11\u5927\u7ea6 50%\uff0c\u626b\u8bfb\u6210\u672c\u660e\u663e\u4f4e\u3002\u800c\u4e14\u91cd\u70b9\u5185\u5bb9\uff1a\u4e0d\u5efa\u8bae\u5168\u9762\u62c6\u3001\u5148\u505a\u6a21\u5757\u5316\u5355\u4f53\u3001\u901a\u77e5\/\u62a5\u8868\u4f18\u5148\u3001\u8ba1\u8d39\u6700\u540e\u62c6\uff0c\u8fd9\u4e9b\u5224\u65ad\u90fd\u4fdd\u4f4f\u4e86\u3002<\/p>\n<h3><strong>case 4 PR Review<\/strong><\/h3>\n<blockquote>\n<p>\u63d0\u793a\u8bcd\uff1a<\/p>\n<p>\u8bf7 review \u4e0b\u9762\u8fd9\u6bb5\u4ee3\u7801\uff0c\u91cd\u70b9\u770b\u5b89\u5168\u3001\u5e76\u53d1\u548c\u8fb9\u754c\u6761\u4ef6\u3002\u53ea\u6307\u51fa\u771f\u5b9e\u95ee\u9898\uff0c\u4e0d\u9700\u8981\u8868\u626c\u3002<\/p>\n<p>\u00a0<\/p>\n<p>async function transfer(fromUserId, toUserId, amount) {<\/p>\n<p>const from = await db.users.findById(fromUserId);<\/p>\n<p>const to = await db.users.findById(toUserId);<\/p>\n<p>\u00a0<\/p>\n<p>if (from.balance < amount) {<\/p>\n<p>throw new Error(\u201cinsufficient funds\u201d);<\/p>\n<p>}<\/p>\n<p>\u00a0<\/p>\n<p>from.balance -= amount;<\/p>\n<p>to.balance += amount;<\/p>\n<p>\u00a0<\/p>\n<p>await db.users.update(fromUserId, { balance: from.balance });<\/p>\n<p>await db.users.update(toUserId, { balance: to.balance });<\/p>\n<p>\u00a0<\/p>\n<p>return true;<\/p>\n<p>}<\/p>\n<\/blockquote>\n<p><strong>\u4e0d\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81565\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-12.png\"  alt=\"\" width=\"678\" height=\"628\" \/> <\/p>\n<p><strong>\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81566\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-13.png\"  alt=\"\" width=\"678\" height=\"693\" \/> <\/p>\n<p>\u8fd9\u6b21\u4e24\u7248\u5dee\u8ddd\u6ca1\u6709\u524d\u51e0\u7ec4\u5927\uff0cCaveman \u7c97\u7565\u5c11 10% \u5230 15%\uff0c\u539f\u56e0\u662f Caveman \u591a\u8865\u4e86\u201c\u5e42\u7b49\u201d\u95ee\u9898\u3002<\/p>\n<p>\u800c\u4e14\u4ee3\u7801 review \u573a\u666f\uff0c\u4e0d\u7528 Caveman \u5df2\u7ecf\u662f\u95ee\u9898\u6e05\u5355\u5f0f\u5199\u6cd5\uff0c\u538b\u7f29\u7a7a\u95f4\u6709\u9650\u3002<\/p>\n<h3><strong>case 5 Docker \u4f18\u5316<\/strong><\/h3>\n<blockquote>\n<p>\u63d0\u793a\u8bcd\uff1a<\/p>\n<p>\u5e2e\u6211\u4f18\u5316\u8fd9\u4e2a Dockerfile\uff0c\u76ee\u6807\u662f\u51cf\u5c11\u955c\u50cf\u4f53\u79ef\u3001\u63d0\u9ad8\u6784\u5efa\u7f13\u5b58\u547d\u4e2d\u7387\uff0c\u5e76\u907f\u514d\u628a\u654f\u611f\u6587\u4ef6\u5e26\u8fdb\u955c\u50cf\u3002<\/p>\n<p>\u00a0<\/p>\n<p>FROM node:20<\/p>\n<p>WORKDIR \/app<\/p>\n<p>COPY . .<\/p>\n<p>RUN npm install<\/p>\n<p>RUN npm run build<\/p>\n<p>CMD [\u201cnpm\u201d, \u201cstart\u201d]<\/p>\n<\/blockquote>\n<p><strong>\u4e0d\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81702\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u5fae\u4fe1\u56fe\u7247_20260710134125_17_1124.png\"  alt=\"\" width=\"678\" height=\"1577\" \/> <\/p>\n<p><strong>\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81703\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u5fae\u4fe1\u56fe\u7247_20260710134132_18_1124.png\"  alt=\"\" width=\"678\" height=\"1369\" \/> <\/p>\n<p>Caveman \u7248\u51cf\u5c11\u5927\u7ea6 35% \u5230 45% Token\u7684\u3002\u5dee\u5f02\u5728\u57fa\u7840\u955c\u50cf\uff1a\u666e\u901a\u7248\u7528 bookworm-slim\uff0c\u517c\u5bb9\u6027\u66f4\u7a33\uff1bCaveman \u7528 alpine\uff0c\u4f53\u79ef\u66f4\u5c0f\u3002<\/p>\n<h3><strong>case 6 \u6570\u636e\u5e93\u95ee\u9898<\/strong><\/h3>\n<blockquote>\n<p>\u63d0\u793a\u8bcd\uff1a<\/p>\n<p>\u89e3\u91ca\u8fd9\u4e2a PostgreSQL \u67e5\u8be2\u4e3a\u4ec0\u4e48\u6162\uff0c\u5e76\u7ed9\u51fa\u6392\u67e5\u548c\u4f18\u5316\u65b9\u6848\u3002<\/p>\n<p>\u00a0<\/p>\n<p>\u8868 orders \u6709 8000 \u4e07\u884c\uff0c\u5b57\u6bb5\u5305\u62ec id, user_id, status, created_at, total_amount\u3002<\/p>\n<p>\u5e38\u89c1\u67e5\u8be2\uff1a<\/p>\n<p>\u00a0<\/p>\n<p>SELECT *<\/p>\n<p>FROM orders<\/p>\n<p>WHERE user_id = $1<\/p>\n<p>AND status = \u2018paid\u2019<\/p>\n<p>ORDER BY created_at DESC<\/p>\n<p>LIMIT 20;<\/p>\n<\/blockquote>\n<p><strong>\u4e0d\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81704\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u5fae\u4fe1\u56fe\u7247_20260710134139_19_1124.png\"  alt=\"\" width=\"678\" height=\"2065\" \/> <\/p>\n<p><strong>\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81705\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u5fae\u4fe1\u56fe\u7247_20260710134144_20_1124.png\"  alt=\"\" width=\"678\" height=\"1512\" \/> <\/p>\n<p>\u4e0d\u7528 Caveman \u7ea6 1000 \u5230 1200 token\uff1bCaveman \u7248\u7ea6 500 \u5230 650 token\uff0c\u51cf\u5c11\u5927\u7ea6 45% \u5230 50%\u3002<\/p>\n<p>\u666e\u901a\u7248\u591a\u4e86\u7a33\u5b9a\u6392\u5e8f created_at, id\uff0c\u8fd9\u662f Caveman \u6f0f\u6389\u7684\u5b9e\u7528\u7ec6\u8282\u3002<\/p>\n<h3><strong>case 7 \u91cd\u6784\u4efb\u52a1<\/strong><\/h3>\n<blockquote>\n<p>function loadUser(id, callback) {<\/p>\n<p>db.findUser(id, function(err, user) {<\/p>\n<p>if (err) return callback(err);<\/p>\n<p>\u00a0<\/p>\n<p>api.fetchProfile(user.profileId, function(err, profile) {<\/p>\n<p>if (err) return callback(err);<\/p>\n<p>\u00a0<\/p>\n<p>cache.set(id, profile, function(err) {<\/p>\n<p>if (err) return callback(err);<\/p>\n<p>callback(null, { user, profile });<\/p>\n<p>});<\/p>\n<p>});<\/p>\n<p>});<\/p>\n<p>}<\/p>\n<\/blockquote>\n<p><strong>\u4e0d\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81706\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u5fae\u4fe1\u56fe\u7247_20260710134151_21_1124.png\"  alt=\"\" width=\"678\" height=\"1382\" \/> <\/p>\n<p><strong>\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81707\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u5fae\u4fe1\u56fe\u7247_20260710134157_22_1124.png\"  alt=\"\" width=\"678\" height=\"1593\" \/> <\/p>\n<p>\u4e0d\u7528 Caveman \u7ea6 850 \u5230 1000 token\uff1bCaveman \u7ea6 650 \u5230 800 token\uff0c\u51cf\u5c11\u5927\u7ea6 20% \u5230 30%\u3002<\/p>\n<p>Caveman Token\u7a0d\u4f4e\uff0c\u4f46\u4f18\u52bf\u4e0d\u5927\u3002\u56e0\u4e3a\u8fd9\u9898\u5929\u7136\u9700\u8981\u4ee3\u7801\u5757\uff0ctoken \u4e3b\u8981\u82b1\u5728\u4ee3\u7801\u4e0a\uff0c\u98ce\u683c\u538b\u7f29\u7a7a\u95f4\u6709\u9650\u3002<\/p>\n<h3><strong>case 8 \u65b0\u529f\u80fd\u8bbe\u8ba1<\/strong><\/h3>\n<blockquote>\n<p>\u63d0\u793a\u8bcd\uff1a\u8bbe\u8ba1\u4e00\u4e2a\u201c\u5bfc\u51fa\u62a5\u8868\u4e3a CSV\u201d\u7684\u540e\u7aef\u63a5\u53e3\u3002\u8981\u6c42\u652f\u6301\u5927\u6570\u636e\u91cf\u3001\u6743\u9650\u6821\u9a8c\u3001\u5f02\u6b65\u4efb\u52a1\u3001\u4e0b\u8f7d\u94fe\u63a5\u8fc7\u671f\u3002\u8bf7\u7ed9\u51fa API \u8bbe\u8ba1\u3001\u6570\u636e\u6d41\u548c\u4e3b\u8981\u8868\u7ed3\u6784\u3002<\/p>\n<\/blockquote>\n<p><strong>\u4e0d\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81708\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u5fae\u4fe1\u56fe\u7247_20260710134202_23_1124.png\"  alt=\"\" width=\"678\" height=\"3387\" \/> <\/p>\n<p><strong>\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81709\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u5fae\u4fe1\u56fe\u7247_20260710134207_24_1124.png\"  alt=\"\" width=\"678\" height=\"3700\" \/> <\/p>\n<p>\u4e0d\u7528 Caveman \u7ea6 1300 \u5230 1600 token\uff1bCaveman \u7ea6 900 \u5230 1100 token\uff0c\u51cf\u5c11\u5927\u7ea6 25% \u5230 35%\u3002<\/p>\n<p>\u666e\u901a\u7248\u591a\u4e86 Idempotency-Key\u3001report_export_files \u72ec\u7acb\u8868\u3001CSV \u6ce8\u5165\u9632\u62a4\u7ec6\u8282\u3002<\/p>\n<h3><strong>case 9 \u4e8b\u6545\u590d\u76d8<\/strong><\/h3>\n<blockquote>\n<p>\u63d0\u793a\u8bcd\uff1a\u6211\u4eec\u7ebf\u4e0a\u670d\u52a1\u6628\u5929 10:05 \u5230 10:27 \u51fa\u73b0\u5927\u91cf 500\u3002\u521d\u6b65\u53d1\u73b0 Redis \u8fde\u63a5\u6c60\u8017\u5c3d\uff0c\u5e94\u7528\u4e0d\u65ad\u91cd\u8bd5\uff0c\u6570\u636e\u5e93 QPS \u540c\u65f6\u5347\u9ad8\u3002\u8bf7\u5199\u4e00\u4efd\u5de5\u7a0b\u5185\u90e8\u4e8b\u6545\u590d\u76d8\uff0c\u5305\u542b\u65f6\u95f4\u7ebf\u3001\u6839\u56e0\u3001\u5f71\u54cd\u3001\u4fee\u590d\u3001\u540e\u7eed\u884c\u52a8\u3002<\/p>\n<\/blockquote>\n<p><strong>\u4e0d\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81567\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-14.png\"  alt=\"\" width=\"678\" height=\"1308\" \/> <\/p>\n<p><strong>\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81710\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u5fae\u4fe1\u56fe\u7247_20260710134215_25_1124.png\"  alt=\"\" width=\"678\" height=\"1859\" \/> <\/p>\n<p>\u4e0d\u7528 Caveman \u7ea6 900 \u5230 1100 token\uff1bCaveman \u7ea6 550 \u5230 700 token\uff0c\u51cf\u5c11\u5927\u7ea6 35% \u5230 45%\u3002<\/p>\n<p>\u666e\u901a\u7248\u591a\u4e86\u5360\u4f4d\u7b26\u63d0\u793a\u3001\u6570\u636e\u4e00\u81f4\u6027\u6838\u67e5\u3001\u5355\u98de\u673a\u5236\uff1bCaveman \u591a\u5f3a\u8c03 retry budget\u3001jitter\u3001\u7194\u65ad\u548c\u4fdd\u62a4 DB\u3002<\/p>\n<h3><strong>case 10 \u4ee3\u7801\u89e3\u91ca<\/strong><\/h3>\n<blockquote>\n<p>\u63d0\u793a\u8bcd\uff1a\u8bf7\u7ed9\u521a\u5165\u804c\u7684\u540e\u7aef\u65b0\u4eba\u89e3\u91ca\u4ec0\u4e48\u662f\u6570\u636e\u5e93\u8fde\u63a5\u6c60\uff0c\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u6bcf\u4e2a\u8bf7\u6c42\u90fd\u65b0\u5efa\u8fde\u63a5\uff0c\u5e76\u4e3e\u4e00\u4e2a\u5b9e\u9645\u670d\u52a1\u91cc\u7684\u4f8b\u5b50\u3002<\/p>\n<\/blockquote>\n<p><strong>\u4e0d\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81568\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-15.png\"  alt=\"\" width=\"678\" height=\"1002\" \/> <\/p>\n<p><strong>\u7528Caveman\uff1a<\/strong><\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81569\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-16.png\"  alt=\"\" width=\"678\" height=\"788\" \/> <\/p>\n<p>\u4e0d\u7528 Caveman \u7ea6 700 \u5230 850 token\uff1bCaveman \u7ea6 300 \u5230 400 token\uff0c\u51cf\u5c11\u5927\u7ea6 50% \u5230 60%\u3002<\/p>\n<p>\u4e24\u7248\u90fd\u547d\u4e2d\u8fde\u63a5\u590d\u7528\u3001\u5efa\u8fde\u6210\u672c\u3001\u8fde\u63a5\u6570\u9650\u5236\u3001\u6c60\u5927\u5c0f\u4e0d\u80fd\u4e71\u914d\u3002\u666e\u901a\u7248\u591a\u4e86\u5b8c\u6574\u4ee3\u7801\u4f8b\u5b50\u548c\u201c\u7b2c 21 \u4e2a\u8bf7\u6c42\u7b49\u5f85\u201d\u7684\u76f4\u89c2\u8bf4\u660e\u3002<\/p>\n<p>\u8fd9 10 \u4e2a case \u8dd1\u4e0b\u6765\uff0cCaveman \u6ca1\u6709\u51fa\u73b0\u660e\u663e\u6280\u672f\u9519\u8bef\uff0c\u6838\u5fc3\u5224\u65ad\u90fd\u4fdd\u4f4f\u4e86\uff0c\u4f46 Caveman \u4f1a\u727a\u7272\u4e00\u90e8\u5206\u7ec6\u8282\uff0c\u5728\u660e\u786e\u95ee\u9898\u548c\u719f\u624b\u573a\u666f\u91cc\uff0c\u6536\u76ca\u5f88\u9ad8\u3002<\/p>\n<p>\u6700\u540e\u8fd8\u8981\u7ed9\u5927\u5bb6\u8bf4\u51e0\u4e2a\u9700\u8981\u6ce8\u610f\u7684\u70b9\uff1a<\/p>\n<ul>\n<li>Caveman \u53ea\u51cf\u5c11\u8f93\u51fa token\uff0c\u8f93\u5165 token \u4e0d\u4f1a\u81ea\u52a8\u51cf\u5c11<\/li>\n<li>skill \u672c\u8eab\u6bcf\u8f6e\u4f1a\u589e\u52a0\u7ea6 1k \u5230 1.5k input tokens<\/li>\n<li>\u5982\u679c\u666e\u901a\u56de\u7b54\u672c\u6765\u53ea\u6709 150 output tokens\uff0c\u542f\u7528 Caveman \u53ef\u80fd\u53cd\u800c\u66f4\u8d35<\/li>\n<li>\u5982\u679c\u5e73\u53f0\u6309\u8bf7\u6c42\u8ba1\u8d39\uff0c\u800c\u4e0d\u662f\u6309 token \u8ba1\u8d39\uff0c\u77ed\u56de\u7b54\u4e0d\u4f1a\u964d\u4f4e\u8bf7\u6c42\u6570<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<h1 style=\"text-align: center;\"><span style=\"font-size: 24pt;\">03. \u6316\u4e00\u6316<\/span><\/h1>\n<p>\u00a0<\/p>\n<p>Caveman \u8fd9\u7c7b\u5de5\u4e0d\u662f\u7701\u51e0\u4e2a token\u7684\u5c0f\u9700\u6c42\uff0c\u800c\u662f AI Agent \u8fdb\u5165\u6211\u4eec\u7684\u65e5\u5e38\u5f00\u53d1\u540e\uff0c\u5bf9\u8f93\u51fa\u6548\u7387\u3001\u9605\u8bfb\u6210\u672c\u548c\u534f\u4f5c\u8d28\u91cf\u7684\u8981\u6c42\u53d8\u9ad8\u4e86\u3002<\/p>\n<p>\u8fd9\u6b21 10 \u4e2a case \u6d4b\u4e0b\u6765\uff0cCaveman \u7684\u4ef7\u503c\u4e5f\u6bd4\u8f83\u6e05\u695a\u3002\u67b6\u6784\u6743\u8861\u3001\u6570\u636e\u5e93\u4f18\u5316\u3001\u4e8b\u6545\u590d\u76d8\u3001\u6982\u5ff5\u89e3\u91ca\u8fd9\u7c7b\u5bb9\u6613\u5c55\u5f00\u7684\u4efb\u52a1\uff0c\u8f93\u51fa\u5927\u591a\u80fd\u51cf\u5c11 35% \u5230 60%\uff1b\u4ee3\u7801\u5757\u5360\u6bd4\u9ad8\u7684\u4efb\u52a1\uff0c\u538b\u7f29\u5e45\u5ea6\u4f1a\u964d\u5230 10% \u5230 30%\u3002\u5f88\u9002\u5408\u5904\u7406\u6a21\u578b\u5bb9\u6613\u5570\u55e6\uff0c\u4f46\u5de5\u7a0b\u5e08\u53ea\u60f3\u770b\u7ed3\u8bba\u7684\u573a\u666f\u3002<\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81570\" src=\"https:\/\/ai-bot.cn\/wp-content\/uploads\/2026\/07\/\u672a\u547d\u540d24-17.png\"  alt=\"\" width=\"678\" height=\"381\" \/> <\/p>\n<p>\u5bf9\u6211\u4eec\u6765\u8bf4\uff0cCaveman \u80fd\u51cf\u5c11\u6bcf\u5929\u8bfb AI \u56de\u590d\u7684\u65f6\u95f4\uff1b\u8ba9 review\u3001debug\u3001\u65b9\u6848\u8ba8\u8bba\u66f4\u50cf\u5de5\u7a0b\u6c9f\u901a\uff0c\u5e2e\u52a9\u7edf\u4e00\u8f93\u51fa\u98ce\u683c\uff0c\u964d\u4f4e\u6765\u56de\u786e\u8ba4\u7684\u6210\u672c\u3002<\/p>\n<p>Caveman \u4e0d\u8be5\u53ea\u88ab\u7406\u89e3\u6210\u7701\u94b1\u795e\u5668\u3002\u5b83\u4e3b\u8981\u538b\u7f29\u8f93\u51fa token\uff0c\u8f93\u5165 token \u548c\u63a8\u7406\u6210\u672c\u4e0d\u4f1a\u81ea\u52a8\u6d88\u5931\u3002<\/p>\n<p>AI Agent \u771f\u6b63\u8fdb\u5165\u751f\u4ea7\u6d41\u7a0b\u540e\uff0c\u5dee\u8ddd\u4e0d\u53ea\u5728\u4f1a\u4e0d\u4f1a\u751f\u6210\u7b54\u6848\uff0c\u4e5f\u5728\u751f\u6210\u7684\u7b54\u6848\u80fd\u4e0d\u80fd\u88ab\u4eba\u5feb\u901f\u4f7f\u7528\u3002<\/p>\n<blockquote>\n<p>\u539f\u6587\u94fe\u63a5\uff1a<span class=\"js_title_inner\">GitHub \u72c2\u63fd 85K Stars\uff0cAI Agent \u518d\u4e5f\u4e0d\u8bf4\u5e9f\u8bdd<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u53d1\u70b9\u9002\u5408\u8ba9 AI Agent \u7b80\u6d01\u8f93\u51fa\u7684\u4e1c\u897f\u3002 \u5e73\u65f6\u6211\u4eec\u7528 AI Agent \u65f6\uff0c\u8f93\u51fa\u7684\u5185\u5bb9\u4e0d\u7ba1\u5bf9\u4e0d\u5bf9\u90fd\u4f1a<\/p>","protected":false},"author":1,"featured_media":4219,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_tocer_settings":[],"footnotes":""},"categories":[85],"tags":[86],"class_list":["post-4218","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","tag-aijiaocheng"],"_links":{"self":[{"href":"https:\/\/umaax.com\/en\/wp-json\/wp\/v2\/posts\/4218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/umaax.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/umaax.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/umaax.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/umaax.com\/en\/wp-json\/wp\/v2\/comments?post=4218"}],"version-history":[{"count":0,"href":"https:\/\/umaax.com\/en\/wp-json\/wp\/v2\/posts\/4218\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/umaax.com\/en\/wp-json\/wp\/v2\/media\/4219"}],"wp:attachment":[{"href":"https:\/\/umaax.com\/en\/wp-json\/wp\/v2\/media?parent=4218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/umaax.com\/en\/wp-json\/wp\/v2\/categories?post=4218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/umaax.com\/en\/wp-json\/wp\/v2\/tags?post=4218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}