Files
sxbh.ltd/articles/execute-code-series.html
Hermes CI FixandHermes AI e1a9b25afa init: sxbh.ltd 官网初始提交
- nginx 安全加固 (CSP, HSTS, 缓存策略)
- 共享 style.css
- 138个页面全部接入

Co-authored-by: Hermes AI <agent@hermes>
2026-07-11 17:29:24 +08:00

142 lines
8.2 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>execute_code 系列合集:从「AI只写不执行」到「一句话搞定」</title>
<style>
*{margin:0;padding:0;box-sizing:border-box;}
body{background:#f5f5f5;font-family:'PingFang SC','Microsoft YaHei','Helvetica Neue',Arial,sans-serif;padding:20px;}
.article{max-width:700px;margin:0 auto;background:#fff;padding:30px 25px;border-radius:8px;box-shadow:0 1px 4px rgba(0,0,0,0.06);}
h1{font-size:24px;font-weight:700;color:#1a1a1a;line-height:1.5;margin-bottom:20px;text-align:center;}
h2{font-size:19px;font-weight:700;color:#1a1a1a;margin:28px 0 12px;line-height:1.5;}
p{font-size:16px;line-height:1.9;color:#333;text-indent:2em;margin-bottom:16px;}
blockquote{border-left:4px solid #323ca0;background:#f5f6fc;padding:14px 18px;margin:18px 0;font-size:15px;color:#555;line-height:1.8;text-indent:0;}
blockquote p{text-indent:0;margin:0 0 8px 0;}
blockquote p:last-child{margin:0;}
.code-block{background:#1a1a2e;border-radius:8px;padding:20px;margin:18px 0;overflow-x:auto;}
.code-block code{color:#d4d4f0;font-family:'Menlo','Courier New',monospace;font-size:13px;line-height:1.7;white-space:pre;}
.series-card{background:#f8f9ff;border:1px solid #e0e4f0;border-radius:8px;padding:16px 18px;margin:14px 0;}
.series-card .num{display:inline-block;background:#323ca0;color:#fff;font-size:12px;font-weight:700;padding:2px 8px;border-radius:4px;margin-right:8px;}
.series-card .title{font-size:15px;font-weight:600;color:#1a1a1a;}
.series-card .desc{font-size:13px;color:#666;margin-top:4px;line-height:1.6;}
.series-card.published{border-left:4px solid #323ca0;}
.series-card.draft{border-left:4px solid #d4a853;}
.gold-quote{background:#1a1a2e;border-radius:8px;padding:24px 20px;margin:30px 0 20px;text-align:center;}
.gold-quote p{text-indent:0;color:#d4a853;font-size:17px;font-weight:600;line-height:1.8;margin-bottom:8px;}
.gold-quote .attribution{color:rgba(212,168,83,0.6);font-size:14px;font-weight:400;}
.footer-info{border-top:1px solid #eee;padding-top:16px;margin-top:24px;text-align:center;color:#999;font-size:13px;line-height:1.8;}
@media (max-width:480px){.article{padding:20px 16px;}h1{font-size:20px;}p{font-size:15px;}.code-block code{font-size:12px;}}
</style>
<link rel="stylesheet" href="/style.css">
</head>
<body>
<div class="article">
<h1>execute_code 系列合集:从「AI只写不执行」到「一句话搞定」</h1>
<p>这是埋在我本地的一整套系列文章——6篇完整稿,讲透了 execute_code 从认知到实操到心态的全过程。今天全部整理发布。</p>
<div class="series-card published">
<span class="num"></span>
<span class="title">我被「AI只写不执行」骗了三年</span>
<div class="desc">15秒改完17个文件,我没复制一行代码。第一次真正被AI替执行震撼的经历。</div>
</div>
<div class="series-card published">
<span class="num"></span>
<span class="title">三个让我拍桌子的 execute_code 场景</span>
<div class="desc">批量重构、一键测试、多步调研——每个都有真实代码,可直接改改用。</div>
</div>
<div class="series-card published">
<span class="num"></span>
<span class="title">一个月省900万token?这笔账是这么算的</span>
<div class="desc">execute_code 到底省不省钱?我用实际账单算了一笔账。</div>
</div>
<div class="series-card published">
<span class="num"></span>
<span class="title">踩坑集:我犯的三个蠢错误</span>
<div class="desc">execute_code 不全是爽。这把双刃剑我替你们试过了。</div>
</div>
<div class="series-card published">
<span class="num"></span>
<span class="title">一张表说清楚该不该用</span>
<div class="desc">什么时候该用 execute_code?什么时候闭嘴用传统模式?决策清单在此。</div>
</div>
<div class="series-card published">
<span class="num"></span>
<span class="title">三个月后,我终于明白「AI替你执行」意味着什么</span>
<div class="desc">从「值不值得让AI做」到「这活儿要不要做」——决策模型彻底变了。</div>
</div>
<p style="text-indent:0;text-align:center;margin-top:24px;">—— 以下为第一篇全文 ——</p>
<hr style="border:none;border-top:1px solid #eee;margin:24px 0;">
<h2>第①篇:我被「AI只写不执行」骗了三年</h2>
<blockquote>
<p>我说:「把项目中所有旧API调用改成新的。」</p>
<p>它15秒就干完了,汇报了17个文件的改动清单。</p>
<p>而我,坐在那喝了一口水,什么事都没做。</p>
</blockquote>
<p>你有没有觉得AI编程工具有哪里不对劲?</p>
<p>Copilot在我打字的时候给出灰色建议——我按Tab接受,然后自己贴到终端去跑。Cursor写了一整段逻辑——我复制到编辑器,手动运行看看对不对。Claude Code能执行命令——但每搜一个文件、每改一个地方,它都回来问我「这样可以吗?」</p>
<p><strong>所有工具都假设同一个前提:AI负责写,人负责执行。</strong></p>
<p>这两三年,我试过几乎所有主流AI编程工具。每次的体验都差不多:AI确实能写出不错的代码片段,但写完之后的工作流永远是——复制、粘贴、运行、看结果、复制错误、贴回去、让它改。循环往复。</p>
<p>本质上,我像一个传话筒,在AI和终端之间来回传话。</p>
<p>第一次用Hermes Agent时,我对它说:「把项目里所有requests.get改成httpx。」</p>
<p>它没有像往常一样在对话框里给我显示一段代码,然后等我去操作。它只说了一句「稍等」,然后大概15秒后回来:</p>
<p>「改好了,17个文件全部完成,跑了测试全部通过。」</p>
<p>我当时的第一反应是——等一下,它什么时候跑的?什么时候测试的?这中间发生了什么?</p>
<p>后来我才知道,在这15秒里,它自己完成了:搜索所有匹配文件→读取每个文件确认上下文→逐个执行替换→运行测试套件→汇总结果。<strong>没有一个中间步骤进到我的对话里来。</strong></p>
<p>我下意识想复制代码去执行——才发现根本没有代码需要我复制。</p>
<p>这件事让我开始重新思考:AI编程工具到底应该怎么用?</p>
<p>对比一下传统AI和Hermes处理同一个需求的不同方式。传统AI的典型流程要6轮对话,每轮几KB的中间结果全部留在对话里,后续每多问一句,模型都要重新阅读这些中间信息。而Hermes Agent只用1次对话——中间执行过程完全在单独的子进程里完成。</p>
<p>我算过一笔账。同样一个三到四步的操作:传统AI一步步做消耗约21,000 tokenexecute_code一次完成消耗约500 token。<strong>节省了95%的上下文。</strong></p>
<p>一开始我以为省钱是最大的好处。后来发现不是——更大的变化是心态上的。因为不担心中间结果撑爆对话,我开始更频繁地让AI去做一些以前觉得「不值当让AI做」的事情。</p>
<p><strong>核心变化不是AI变强了,是我敢让它做的事变多了。</strong></p>
<div class="gold-quote">
<p>三个月前,我每天在终端和AI之间来回切换,感觉自己像个传话筒。</p>
<p>现在,我只需要说一句话,整件事就办完了。</p>
<p class="attribution">—— 一切皆如</p>
</div>
<!-- 更多内容可以展开系列所有文章 -->
<p style="margin-top:30px;"><strong>系列其他5篇继续阅读:</strong></p>
<p>第②篇《三个让我拍桌子的execute_code场景》—— 批量重构、一键测试、多步调研的真实代码案例</p>
<p>第③篇《一个月省900万token?没吹牛》—— execute_code成本分析全曝光</p>
<p>第④篇《踩坑集:我犯的三个蠢错误》—— 替你们试过的双刃剑</p>
<p>第⑤篇《一张表说清楚该不该用》—— 什么时候用execute_code,决策清单</p>
<p>第⑥篇《三个月后我终于明白了》—— 从「值不值得让AI做」到「这活儿要不要做」</p>
<div class="footer-info">
<p>发布时间:2026年7月8日</p>
<p>作者:一切皆如 · 博海网络</p>
</div>
</div>
</body>
</html>