<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Claude Code on BeYoung</title>
    <link>https://lyapple2008.github.io/tags/claude-code/</link>
    <description>Recent content in Claude Code on BeYoung</description>
    <image>
      <title>BeYoung</title>
      <url>https://lyapple2008.github.io/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://lyapple2008.github.io/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.147.9</generator>
    <language>zh</language>
    <copyright>See this site&amp;rsquo;s source code here, licensed under GPLv3 ·</copyright>
    <lastBuildDate>Thu, 02 Apr 2026 09:58:19 +0800</lastBuildDate>
    <atom:link href="https://lyapple2008.github.io/tags/claude-code/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Claude Code 是如何工作的</title>
      <link>https://lyapple2008.github.io/posts/202604/2026-04-02-claude-code%E6%98%AF%E5%A6%82%E4%BD%95%E5%B7%A5%E4%BD%9C%E7%9A%84/</link>
      <pubDate>Thu, 02 Apr 2026 09:58:19 +0800</pubDate>
      <guid>https://lyapple2008.github.io/posts/202604/2026-04-02-claude-code%E6%98%AF%E5%A6%82%E4%BD%95%E5%B7%A5%E4%BD%9C%E7%9A%84/</guid>
      <description>&lt;h1 id=&#34;从claude-code学习agent开发&#34;&gt;从Claude Code学习Agent开发&lt;/h1&gt;
&lt;p&gt;最近一直在重度使用 Claude Code，也一直被各种新名词轰炸：vibe coding、spec coding、agent、openclaw、harness 等等。刚好看到一个介绍 Claude Code 工程原理的教程，对Agent Engneer有了一些认识，记录总结一下。&lt;/p&gt;</description>
      <content:encoded><![CDATA[<h1 id="从claude-code学习agent开发">从Claude Code学习Agent开发</h1>
<p>最近一直在重度使用 Claude Code，也一直被各种新名词轰炸：vibe coding、spec coding、agent、openclaw、harness 等等。刚好看到一个介绍 Claude Code 工程原理的教程，对Agent Engneer有了一些认识，记录总结一下。</p>
<blockquote>
<p>教程地址：https://learn.shareai.run/en/<br>
项目仓库：https://github.com/shareAI-lab/learn-claude-code</p></blockquote>
<h2 id="课程介绍">课程介绍</h2>
<p>该课程包含12个递进式课程，从简单循环到隔离化的自治执行，每个课程添加一个 harness 机制，每个机制有一句格言，非常推荐大家去学习：</p>
<blockquote>
<p><strong>s01</strong>   <em>One loop &amp; Bash is all you need</em> — 一个工具 + 一个循环 = 一个 Agent</p>
<p><strong>s02</strong>   <em>加一个工具, 只加一个 handler</em> — 循环不用动, 新工具注册进 dispatch map 就行</p>
<p><strong>s03</strong>   <em>没有计划的 agent 走哪算哪</em> — 先列步骤再动手, 完成率翻倍</p>
<p><strong>s04</strong>   <em>大任务拆小, 每个小任务干净的上下文</em> — Subagent 用独立 messages[], 不污染主对话</p>
<p><strong>s05</strong>   <em>用到什么知识, 临时加载什么知识</em> — 通过 tool_result 注入, 不塞 system prompt</p>
<p><strong>s06</strong>   <em>上下文总会满, 要有办法腾地方</em> — 三层压缩策略, 换来无限会话</p>
<p><strong>s07</strong>   <em>大目标要拆成小任务, 排好序, 记在磁盘上</em> — 文件持久化的任务图, 为多 agent 协作打基础</p>
<p><strong>s08</strong>   <em>慢操作丢后台, agent 继续想下一步</em> — 后台线程跑命令, 完成后注入通知</p>
<p><strong>s09</strong>   <em>任务太大一个人干不完, 要能分给队友</em> — 持久化队友 + 异步邮箱</p>
<p><strong>s10</strong>   <em>队友之间要有统一的沟通规矩</em> — 一个 request-response 模式驱动所有协商</p>
<p><strong>s11</strong>   <em>队友自己看看板, 有活就认领</em> — 不需要领导逐个分配, 自组织</p>
<p><strong>s12</strong>   <em>各干各的目录, 互不干扰</em> — 任务管目标, worktree 管目录, 按 ID 绑定</p></blockquote>
<h2 id="什么是agentharness">什么是Agent/Harness</h2>
<h2 id="如何开发适用于自己工作流的agentharness">如何开发适用于自己工作流的Agent/Harness</h2>
<ol>
<li>流程是怎样的</li>
<li>需要哪些特定的知识</li>
<li>其中需要用到哪些工具，这些工具适用的场景和使用说明</li>
</ol>
<h2 id="总结">总结</h2>
<ol>
<li><strong>设计参考人类开发过程</strong> — 每个特性都是实际工作流会用的</li>
<li><strong>节约 Token，按需加载</strong> — skill 的两层 load 机制 + context 的压缩机制</li>
<li><strong>新名词殊途同归</strong> — prompt/harness/skill，皆是给 Agent 提供知识背景</li>
<li><strong>典范案例</strong> — Claude Code 是编码工作流与 AI 大模型结合的典范</li>
</ol>
<h3 id="claude-code-与-ai-模型的关系">Claude Code 与 AI 模型的关系</h3>
<ul>
<li><strong>Claude 模型</strong>：负责「思考」和「推理」，理解代码、分析任务、决定下一步</li>
<li><strong>Claude Code (agentic harness)</strong>：负责「赋能」和「执行」，提供工具接口、上下文管理、终端环境，让推理转化为实际操作</li>
</ul>
<blockquote>
<p>关系模式：Claude Code 相当于「外壳/操作系统」，Claude 模型是其中的「智能核心」。模型提出计划，Claude Code 通过工具和环境落实这些计划。</p></blockquote>
<hr>
<p>Agent 开发不过是将自身能力的一次实体化。如同那句话所说：大模型是放大器，自身能力决定了 Agent 的上限。这个时代对人的要求，反而更高了。只有人本身把工作流想清楚了，才有可以设计出高效合理的Agent流程。</p>
<p>当整个系统的短板是人的时候，再也没有借口可找。</p>
<p>参考：</p>
<ol>
<li><a href="https://github.com/shareAI-lab/learn-claude-code">github: learn-claude-code</a></li>
<li><a href="https://x.com/HiTw93/status/2032091246588518683">你不知道的 Claude Code：架构、治理与工程实践</a></li>
<li><a href="https://x.com/HiTw93/status/2034627967926825175">你不知道的 Agent：原理、架构与工程实践</a></li>
</ol>
]]></content:encoded>
    </item>
  </channel>
</rss>
