<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>Cheng®</name>
  </author>
  <generator uri="https://hexo.io/">Hexo</generator>
  <id>https://mark22013333.github.io/</id>
  <link href="https://mark22013333.github.io/" rel="alternate"/>
  <link href="https://mark22013333.github.io/atom.xml" rel="self"/>
  <rights>All rights reserved 2026, Cheng®</rights>
  <subtitle>─=≡Σ((( つ•̀ω•́)つ</subtitle>
  <title>
    <![CDATA[Cheng's Tech & Life]]>
  </title>
  <updated>2026-04-12T11:07:36.217Z</updated>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="Claude Code" scheme="https://mark22013333.github.io/categories/Claude-Code/"/>
    <category term="AI" scheme="https://mark22013333.github.io/tags/AI/"/>
    <category term="投資" scheme="https://mark22013333.github.io/tags/%E6%8A%95%E8%B3%87/"/>
    <category term="開源" scheme="https://mark22013333.github.io/tags/%E9%96%8B%E6%BA%90/"/>
    <category term="LangGraph" scheme="https://mark22013333.github.io/tags/LangGraph/"/>
    <category term="Multi-Agent" scheme="https://mark22013333.github.io/tags/Multi-Agent/"/>
    <content>
      <![CDATA[<p>凌晨三點，你盯著股市看盤軟體，想著「我到底是誰，為什麼在看這支股票」。如果有一群投資大師能幫你分析呢？不過不是去請他們本人，而是用 19 個 AI Agent 來模擬他們的思維方式——這就是 <strong>AI Hedge Fund</strong> 要幹的事。</p><h2 id="什麼是-AI-Hedge-Fund"><a href="#什麼是-AI-Hedge-Fund" class="headerlink" title="什麼是 AI Hedge Fund"></a>什麼是 AI Hedge Fund</h2><p>這是 GitHub 上一個有 50K+ 星星的開源專案，核心概念超狂：把華倫・巴菲特、彼得・林區、凱西・伍德這些傳奇投資家的投資理念寫成 AI Agent，讓他們獨立分析同一支股票，最後由一個「投資組合經理」整合所有意見，決定買還是賣。</p><p>聽起來像科幻小說，但實際上它展示了 LangGraph 這套框架有多扯。這不是什麼「自動賺錢機」——完全不會執行真實交易，純粹拿來學習投資哲學和回測的工具。</p><h2 id="19-個-Agent-的陣容"><a href="#19-個-Agent-的陣容" class="headerlink" title="19 個 Agent 的陣容"></a>19 個 Agent 的陣容</h2><p>架構分兩層：</p><p><strong>投資家智能體（13 個）</strong>：每個都用大語言模型來推理</p><ul><li>價值投資派：巴菲特、蒙格、葛拉漢、林區、費雪</li><li>特化派：麥可・貝瑞（看次級房貸的那位）、伍德（科技狂魔）、阿克曼（激進投資人）</li><li>宏觀派：德魯肯米勒、塔勒布、達摩德仁、帕布萊、君君</li></ul><p>每個代理人有自己的風格。巴菲特會問「這家公司有沒有競爭護城河」，伍德會追問「十年後的成長潛力在哪」。這真的有夠猛——系統自動把各家投資邏輯轉成提示詞，讓 AI 扮演這些角色。</p><p><strong>技術分析智能體（6 個）</strong>：用規則邏輯而不是 LLM</p><ul><li>基本面、技術、成長、估值、情緒分析，加上新聞情緒</li><li>這些不需要「思考」，算公式就行</li></ul><h2 id="架構：LangGraph-的經典模式"><a href="#架構：LangGraph-的經典模式" class="headerlink" title="架構：LangGraph 的經典模式"></a>架構：LangGraph 的經典模式</h2><p>這個專案用了 LangGraph 的 StateGraph——說白了就是一個狀態機。執行流程像這樣：</p><ol><li><strong>分散（Fan-out）</strong>：同時把股票資料丟給 19 個 Agent</li><li><strong>獨立分析</strong>：每個 Agent 跑自己的 LLM 推理或計算邏輯</li><li><strong>聚合（Fan-in）</strong>：Portfolio Manager 讀取所有意見</li><li><strong>決策</strong>：根據投票和推理，輸出最終的買賣建議</li></ol><p>這套模式在多 Agent 系統裡常見到，但 AI Hedge Fund 把它用在金融領域，展示得相當清楚。踩坑點少（如果你知道怎麼設置 LangGraph 的話）。</p><h2 id="怎麼跑起來"><a href="#怎麼跑起來" class="headerlink" title="怎麼跑起來"></a>怎麼跑起來</h2><p><strong>環境</strong>：需要 Python 3.11+ 和 Poetry</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">poetry install</span><br></pre></td></tr></table></figure><p><strong>LLM 支援</strong>：這裡真香——不只 OpenAI，還支援 Anthropic、DeepSeek、Google、Groq，甚至 Ollama 本機執行。想用什麼模型就用什麼，只要設定環境變數即可。</p><p><strong>介面</strong>：自帶 React + FastAPI 的網頁 UI，不用命令列操作也行。Docker 也支援，懶得裝依賴直接容器化。</p><h2 id="實際用途"><a href="#實際用途" class="headerlink" title="實際用途"></a>實際用途</h2><p>這東西不是要你丟三萬塊進去自動賺錢。真正有價值的地方：</p><ul><li><strong>學投資哲學</strong>：看看巴菲特派和伍德派對同一支股票怎麼吵架</li><li><strong>回測</strong>：有內建的回測引擎，可以看這套邏輯歷史上表現如何</li><li><strong>LangGraph 教學</strong>：想學多 Agent 系統怎麼搭建的，這是一個完整範例</li><li><strong>多模型對比</strong>：用不同的 LLM 跑分析，比較推理品質</li></ul><h2 id="為什麼值得看"><a href="#為什麼值得看" class="headerlink" title="為什麼值得看"></a>為什麼值得看</h2><p>坦白說，LLM 在金融領域的應用常常很虛。AI Hedge Fund 這個專案扯欸的地方在於：它沒有吹牛，直接展示了多 Agent 架構如何應用到實際問題，且代碼夠清晰讓你理解邏輯。</p><p>MIT 授權，代碼開放，有社群。無論你是想學 LangGraph、多 Agent 系統，或單純對 AI 投資感好奇，都值得 clone 下來試試。</p><hr><blockquote><p>原文來源：<a href="https://github.com/virattt/ai-hedge-fund">AI Hedge Fund - GitHub</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/12/AI-Hedge-Fund-%E7%94%A8-19-%E5%80%8B-AI-Agent-%E6%A8%A1%E6%93%AC%E6%8A%95%E8%B3%87%E5%A7%94%E5%93%A1%E6%9C%83/</id>
    <link href="https://mark22013333.github.io/2026/04/12/AI-Hedge-Fund-%E7%94%A8-19-%E5%80%8B-AI-Agent-%E6%A8%A1%E6%93%AC%E6%8A%95%E8%B3%87%E5%A7%94%E5%93%A1%E6%9C%83/"/>
    <published>2026-04-12T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>凌晨三點，你盯著股市看盤軟體，想著「我到底是誰，為什麼在看這支股票」。如果有一群投資大師能幫你分析呢？不過不是去請他們本人，而是用 19 個 AI Agent 來模擬他們的思維方式——這就是 <strong>AI Hedge Fund</strong> 要幹的事。</p>
<h2 id="什麼是-AI-Hedge-Fund"><a href="#什麼是-AI-Hedge-Fund" class="headerlink" title="什麼是 AI Hedge Fund"></a>什麼是 AI Hedge Fund</h2><p>這是 GitHub 上一個有 50K+ 星星的開源專案，核心]]>
    </summary>
    <title>AI Hedge Fund - 用 19 個 AI Agent 模擬投資委員會</title>
    <updated>2026-04-12T11:07:36.217Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="AI與科技新聞" scheme="https://mark22013333.github.io/categories/AI%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E/"/>
    <category term="AI 新聞" scheme="https://mark22013333.github.io/tags/AI-%E6%96%B0%E8%81%9E/"/>
    <category term="Cursor" scheme="https://mark22013333.github.io/tags/Cursor/"/>
    <category term="Gemini" scheme="https://mark22013333.github.io/tags/Gemini/"/>
    <category term="CVE" scheme="https://mark22013333.github.io/tags/CVE/"/>
    <category term="EU AI Act" scheme="https://mark22013333.github.io/tags/EU-AI-Act/"/>
    <category term="Meta" scheme="https://mark22013333.github.io/tags/Meta/"/>
    <content>
      <![CDATA[<p>最近 AI 跟科技圈的動靜挺多的。Google Gemini 在視覺化這塊有新突破、Cursor 的商業表現有夠猛、漏洞資料庫面臨 AI 報告暴增的挑戰、歐盟 AI 法案即將硬上，Meta 也在醞釀開源新模型。今天就來看看這些新聞各自在搞什麼。</p><h2 id="Google-Gemini-推出互動式-3D-模擬功能"><a href="#Google-Gemini-推出互動式-3D-模擬功能" class="headerlink" title="Google Gemini 推出互動式 3D 模擬功能"></a>Google Gemini 推出互動式 3D 模擬功能</h2><p>Google 在 4 月 10 號給 Gemini 加了新功能，現在可以生成互動式 3D 模擬和模型。使用者只要下個提示詞，像是「幫我視覺化看看」之類的，Gemini 就能把概念變成可以轉動、調整的 3D 模型。舉例來說，可以讓它模擬雙裂縫實驗的動畫版，還能即時調整各種變數。</p><p>這功能對教育和概念驗證來說真的蠻有用的。不用自己寫程式或摸其他工具，直接跟 AI 對話就能出來一個可視化的東西。當然，生成速度和準度還是會有起伏，但整個方向是對的。目前在 gemini.google.com 上可以用，需要 Pro 版本。</p><blockquote><p>原文來源：<a href="https://techbriefly.com/2026/04/10/google-launches-interactive-3d-simulations-for-gemini-chatbot/">Google launches interactive 3D simulations for Gemini chatbot</a></p></blockquote><h2 id="Cursor-AI-達到-2B-ARR，正洽談-50B-估值融資"><a href="#Cursor-AI-達到-2B-ARR，正洽談-50B-估值融資" class="headerlink" title="Cursor AI 達到 $2B ARR，正洽談 $50B 估值融資"></a>Cursor AI 達到 $2B ARR，正洽談 $50B 估值融資</h2><p>Cursor 這家公司到 3 月已經衝到年經常性收入 20 億美金，其中約 60% 來自企業客戶，包括 OpenAI 和 AB InBev 這些咖。現在還在洽談新一輪融資，估值大概砍到 500 億美金。</p><p>要確欸，從去年 11 月融資時的 293 億美金估值來看，這次會不會就是估值調整。不過看他們的技術表現，Copilot 在 SWE-Bench 拿到 56%，Cursor 是 51.7%，但 Cursor 快 30%，效率優勢還是滿明顯的。企業客戶願意給這麼多錢，代表他們確實看到 ROI。</p><blockquote><p>原文來源：Cursor AI 融資情報彙整</p></blockquote><h2 id="CVE-漏洞資料庫面臨-AI-驅動的報告暴增挑戰"><a href="#CVE-漏洞資料庫面臨-AI-驅動的報告暴增挑戰" class="headerlink" title="CVE 漏洞資料庫面臨 AI 驅動的報告暴增挑戰"></a>CVE 漏洞資料庫面臨 AI 驅動的報告暴增挑戰</h2><p>在 RSAC 2026 年會上，CVE 委員會成員開始認真討論一個問題：AI 生成的漏洞報告在過去三個月增加了 224%。這看起來爆量，但其實反映了一個更深層的問題——用什麼機制來篩選、驗證這些海量的 AI 產出報告。</p><p>CVE 程式已經 26 歲了，由 MITRE 管理，CISA 贊助，去年四月還經歷過一波資金危機，後來才被列入「above the line」預算。現在的困境是，整個系統的運轉還是很仰賴人工審核和驗證，AI 報告的暴增反而加重了「人力膠水」的負擔。長期怎麼改進流程、提升自動化驗證的比例，這才是真正的課題。</p><blockquote><p>原文來源：<a href="https://www.cybersecuritydive.com/news/cve-program-ai-vulnerability-reports-funding/815594/">CVE program faces AI-driven vulnerability report surge</a></p></blockquote><h2 id="EU-AI-Act-高風險-AI-系統規範八月全面執法"><a href="#EU-AI-Act-高風險-AI-系統規範八月全面執法" class="headerlink" title="EU AI Act 高風險 AI 系統規範八月全面執法"></a>EU AI Act 高風險 AI 系統規範八月全面執法</h2><p>歐盟 AI 法案在 8 月 2 號就要對高風險 AI 系統（Annex III）全面執法了。這涵蓋生物識別、就業、信用評分、教育、執法等敏感領域。到時候透明度規則和第 50 條的義務都會生效，違反禁止性規定的罰則是 3500 萬歐元或全球營收的 7%，擇其高者。</p><p>每個歐盟會員國還得建立 AI 監管沙盒。芬蘭是第一個去年 12 月就有完整執法權的國家。不過最新的 Digital Omnibus 提案可能會把期限條件性地延到 2027 年 12 月，看後續怎麼推進。對科技公司來說，合規的時鐘已經在跑了，不能再拖。</p><blockquote><p>原文來源：<a href="https://www.legalnodes.com/article/eu-ai-act-2026-updates-compliance-requirements-and-business-risks">EU AI Act 2026 updates: Compliance requirements and business risks</a></p></blockquote><h2 id="Meta-計劃開源下一代-AI-模型"><a href="#Meta-計劃開源下一代-AI-模型" class="headerlink" title="Meta 計劃開源下一代 AI 模型"></a>Meta 計劃開源下一代 AI 模型</h2><p>Axios 在 4 月 6 號挖到的獨家新聞：Meta 打算把下一代 AI 模型的版本開源釋出。這延續了 Meta 這幾年在開源 AI 上的策略。</p><p>最近幾個月開源陣營真的很猛，GLM-5.1（744B MoE、MIT License）、DeepSeek-V3.2、NVIDIA Nemotron&#x2F;Alpamayo 都陸續發佈，效能還一直霸佔排行榜。Meta 加入這波浪潮，等於是賭開源模型的未來。這策略對整個生態來說有利，但對專有模型廠商的壓力也不小。</p><blockquote><p>原文來源：<a href="https://www.axios.com/2026/04/06/meta-open-source-ai-models">Meta plans to open-source versions of its next AI models</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/12/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260412/</id>
    <link href="https://mark22013333.github.io/2026/04/12/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260412/"/>
    <published>2026-04-12T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>最近 AI 跟科技圈的動靜挺多的。Google Gemini 在視覺化這塊有新突破、Cursor 的商業表現有夠猛、漏洞資料庫面臨 AI 報告暴增的挑戰、歐盟 AI 法案即將硬上，Meta 也在醞釀開源新模型。今天就來看看這些新聞各自在搞什麼。</p>
<h2 id="Google-Gemini-推出互動式-3D-模擬功能"><a href="#Google-Gemini-推出互動式-3D-模擬功能" class="headerlink" title="Google Gemini 推出互動式 3D 模擬功能"></a>Google Gemini 推出互動式 3D 模擬功能</h2><p>]]>
    </summary>
    <title>AI 與科技新聞摘要 - 2026/04/12</title>
    <updated>2026-04-12T11:07:38.395Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="生活札記" scheme="https://mark22013333.github.io/categories/%E7%94%9F%E6%B4%BB%E6%9C%AD%E8%A8%98/"/>
    <category term="EU AI Act" scheme="https://mark22013333.github.io/tags/EU-AI-Act/"/>
    <category term="AI 法規" scheme="https://mark22013333.github.io/tags/AI-%E6%B3%95%E8%A6%8F/"/>
    <category term="台灣" scheme="https://mark22013333.github.io/tags/%E5%8F%B0%E7%81%A3/"/>
    <category term="科技政策" scheme="https://mark22013333.github.io/tags/%E7%A7%91%E6%8A%80%E6%94%BF%E7%AD%96/"/>
    <content>
      <![CDATA[<p>專案會議上，PM 丟出一個新的 AI 特徵需求，我下意識的問：「這個會不會違反 AI 基本法？」會議室安靜了三秒。一年前，沒人會這樣問。</p><p>台灣的《人工智慧基本法》在去年 12 月三讀通過，於今年正式上路。身為一個在科技圈摸爬滾打多年的工程師，我發現自己的日常工作開始被一個全新的東西主宰——不再只是演算法效率和系統架構，還要考慮「法規風險等級」。</p><h2 id="台灣終於有了自己的-AI-基本法"><a href="#台灣終於有了自己的-AI-基本法" class="headerlink" title="台灣終於有了自己的 AI 基本法"></a>台灣終於有了自己的 AI 基本法</h2><p>說真的，一開始聽到「基本法」這個詞有點 OO——感覺像是什麼憲法級的東西。但看下去才明白，這其實是台灣首部專門針對 AI 的立法，定義了七項核心原則：人權保障、隱私保護、問責性、透明可解釋性……等等。更實際的是，政府底下成立了「人工智慧策略委員會」，數位發展部（MODA）會負責建立 AI 風險分類框架。</p><p>這有多重要？簡單說，未來公司採購 AI 服務時，第一個問題可能就不是「效能夠不夠快」，而是「這個工具是第幾級風險」。</p><p>政府也跟著投錢——2026 年編了 180 億台幣預算，重點砸在五個「可信任產業」：半導體、AI、國防、資安、次世代通訊。這份清單有意思——台灣的優勢產業都被圈進去了。</p><h2 id="歐盟-AI-法-vs-台灣基本法：軟硬之別"><a href="#歐盟-AI-法-vs-台灣基本法：軟硬之別" class="headerlink" title="歐盟 AI 法 vs 台灣基本法：軟硬之別"></a>歐盟 AI 法 vs 台灣基本法：軟硬之別</h2><p>關鍵轉折點在於比較歐盟。</p><p>歐盟的 AI 法（EU AI Act）今年 8 月就要開始對「高風險」應用強制執法。人臉辨識、徵才演算法、信用評分、教育評量……這些全部都列為高風險。只要不符合歐盟規格？罰款 3500 萬歐元或全球營業額的 7%——哪個比較大就罰哪個。每個歐盟成員國還要建立 AI 監管沙盒，芬蘭早就在 2025 年 12 月率先啟動完整執法了。</p><p>台灣的策略完全不同。基本法採用「原則導向」框架，比較像是定義遊戲規則和精神，而不是逐項列舉「什麼東西絕對禁止」。簡單講，歐盟是處方簽，台灣是指南針。</p><p>這各有好壞。歐盟的好處是明確——開發者知道界線在哪，「不要碰」就行。但缺點是僵化，得等法律更新才能適應新的風險型態。台灣的原則導向比較靈活，但執行的時候就考驗監管機關和業界的默契了。說實話，我有點擔心這會不會最後淪為「紙上談兵」。</p><h2 id="工程師每天會面對的變化"><a href="#工程師每天會面對的變化" class="headerlink" title="工程師每天會面對的變化"></a>工程師每天會面對的變化</h2><p>讓我扯回實務層面。</p><p>首先，招聘會變得有趣。公司開始需要懂「法規 + 治理 + 技術」的混合型人才。不是只會寫 Python 的工程師，而是能夠評估自己寫的程式碼可能觸及哪些法規風險的人。這個市場缺口會慢慢浮現。</p><p>再者，AI 工具的選型會改變。目前我們採購 AI 服務或套件時，考量點大多是精準度、延遲和成本。未來多半要加上「風險分類級別」這一項。低風險工具可以大膽用，高風險工具可能得層層審批，甚至某些組織根本用不了。</p><p>第三，台灣在這個位置有點尷尬。我們是全球 AI 晶片和計算力的主要供應方（TSMC、台灣的 GPU 代工……），卻還在討論「應該怎麼管 AI」。這不是什麼高深的觀察，但確實諷刺——造硬體的人比用軟體的人更懂 AI，結果軟體政策反而更先進。</p><h2 id="「可信任」的定義，決定一切"><a href="#「可信任」的定義，決定一切" class="headerlink" title="「可信任」的定義，決定一切"></a>「可信任」的定義，決定一切</h2><p>政府標籤出五個「可信任產業」而不是「其他產業」，這本身就說了一個故事。意思是，如果你在做的東西不在這五個框框裡，AI 治理會有不同的標準。</p><p>這裡面還有個隱形的議題：資料中心電力。台灣的供電一直是個話題（缺電冬馬甲），AI 算力的爆炸成長需要龐大的電力支撐。這個基本法通過了，但電力配套有沒有跟上？這是另一個故事。</p><h2 id="最後想說的是"><a href="#最後想說的是" class="headerlink" title="最後想說的是"></a>最後想說的是</h2><p>我不會天真的認為一部基本法會立刻改變什麼。真正的轉折點是「執行」——監管機關、業界、學術界要好好溝通，確保這套框架是可運作的，而不是變成另一份沒人讀的政府文件。</p><p>但從好的角度想，台灣至少開始了對話。我們不再只是「科技跟進者」，而是在試著定義自己的遊戲規則。對一個靠科技吃飯的國家來說，這很重要。</p><p>下次開會時，如果 PM 又提新的 AI 特徵，我還是會問那一句話。但這一次，大概會有更多人思考背後的原因，而不是一片沉默。</p><hr><blockquote><p>參考來源：<a href="https://moda.gov.tw/press/press-releases/18316">立法院三讀通過《人工智慧基本法》 - 數位發展部</a><br>參考來源：<a href="https://aiacademy.tw/news-ai-fundamental-act-futurecity/">台灣AI治理新紀元 - 台灣人工智慧學校</a><br>參考來源：<a href="https://www.legalnodes.com/article/eu-ai-act-2026-updates-compliance-requirements-and-business-risks">EU AI Act 2026 Updates - Legal Nodes</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/12/%E5%8F%B0%E7%81%A3-AI-%E5%9F%BA%E6%9C%AC%E6%B3%95%E4%B8%8A%E8%B7%AF%E4%BA%86-%E4%B8%80%E5%80%8B%E5%B7%A5%E7%A8%8B%E5%B8%AB%E7%9A%84%E6%94%BF%E7%AD%96%E8%A7%80%E5%AF%9F/</id>
    <link href="https://mark22013333.github.io/2026/04/12/%E5%8F%B0%E7%81%A3-AI-%E5%9F%BA%E6%9C%AC%E6%B3%95%E4%B8%8A%E8%B7%AF%E4%BA%86-%E4%B8%80%E5%80%8B%E5%B7%A5%E7%A8%8B%E5%B8%AB%E7%9A%84%E6%94%BF%E7%AD%96%E8%A7%80%E5%AF%9F/"/>
    <published>2026-04-12T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>專案會議上，PM 丟出一個新的 AI 特徵需求，我下意識的問：「這個會不會違反 AI 基本法？」會議室安靜了三秒。一年前，沒人會這樣問。</p>
<p>台灣的《人工智慧基本法》在去年 12 月三讀通過，於今年正式上路。身為一個在科技圈摸爬滾打多年的工程師，我發現自己的日常工作開始被一個全新的東西主宰——不再只是演算法效率和系統架構，還要考慮「法規風險等級」。</p>
<h2 id="台灣終於有了自己的-AI-基本法"><a href="#台灣終於有了自己的-AI-基本法" class="headerlink" title="台灣終於有了自己的 AI 基本法"></a>台灣終於有了自己的]]>
    </summary>
    <title>台灣 AI 基本法上路了 — 一個工程師的政策觀察</title>
    <updated>2026-04-12T14:54:54.942Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="AI與科技新聞" scheme="https://mark22013333.github.io/categories/AI%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E/"/>
    <category term="MCP" scheme="https://mark22013333.github.io/tags/MCP/"/>
    <category term="AI 新聞" scheme="https://mark22013333.github.io/tags/AI-%E6%96%B0%E8%81%9E/"/>
    <category term="Copilot" scheme="https://mark22013333.github.io/tags/Copilot/"/>
    <category term="Microsoft" scheme="https://mark22013333.github.io/tags/Microsoft/"/>
    <category term="Kiro" scheme="https://mark22013333.github.io/tags/Kiro/"/>
    <category term="WordPress" scheme="https://mark22013333.github.io/tags/WordPress/"/>
    <category term="PraisonAI" scheme="https://mark22013333.github.io/tags/PraisonAI/"/>
    <content>
      <![CDATA[<p>AWS 在 IDE 工具上持續砸錢，微軟把 agent 框架搞成 production-ready，WordPress 官方終於出 MCP Server，而 PraisonAI 又爆出第二個高危漏洞，GitHub Copilot 則推出公開預覽版 SDK。這禮拜 agent 生態真的在加速，但安全議題也跟著浮出檯面。</p><h2 id="Kiro-CLI-v1-0-23：新增-agent-模式快速啟動"><a href="#Kiro-CLI-v1-0-23：新增-agent-模式快速啟動" class="headerlink" title="Kiro CLI v1.0.23：新增 agent 模式快速啟動"></a>Kiro CLI v1.0.23：新增 agent 模式快速啟動</h2><p>AWS 的 Kiro IDE 最近釋出了新的 CLI 版本，重點是加入了 <code>--autopilot</code>、<code>--mode</code> 和 <code>--plan</code> 這三個參數，讓使用者可以直接跳到特定的 agent 模式工作，不用每次都從零開始。以前的 <code>/agent generate</code> 流程現在也整合進 <code>/agent create</code>，預設就會開啟 AI 輔助模式。</p><p>Kiro 的策略很清楚：先寫 spec，再生成程式碼。跟 Cursor、Windsurf 這些編輯器比起來，Kiro 更強調規格驅動，這對團隊協作來說還滿實用的，尤其是當你需要在代碼生成之前確認需求的時候。新的 CLI 改動看起來不大，但減少了使用者的操作步數，這種 friction 的消除在日常工作中還是有差的。</p><blockquote><p>原文來源：<a href="https://kiro.dev/changelog/cli/">Kiro CLI v1.0.23 Changelog</a></p></blockquote><h2 id="Microsoft-Agent-Framework-1-0：MCP-和-A2A-進入正式版"><a href="#Microsoft-Agent-Framework-1-0：MCP-和-A2A-進入正式版" class="headerlink" title="Microsoft Agent Framework 1.0：MCP 和 A2A 進入正式版"></a>Microsoft Agent Framework 1.0：MCP 和 A2A 進入正式版</h2><p>微軟在 4 月 3 號發布了 Agent Framework 1.0，主要是把 MCP（Model Context Protocol）和 A2A（Agent-to-Agent）通訊都納入正式支援，.NET 和 Python 現在都能用。他們把 MCP 當作資源層來用，A2A 負責跨框架的 agent 協作，這個分層的設計還滿聰明的。</p><p>最有趣的是那個瀏覽器版的 DevUI debugger，可以即時看到 agent 的執行流程，這對除錯確實省事不少。而且 Linux Foundation 的 AAIF 現在管理 MCP 和 A2A，代表這些標準真的往產業化方向走。框架本身支援了一大堆模型和工具，只要 MCP 有定義，基本上都接得起來。</p><blockquote><p>原文來源：<a href="https://devblogs.microsoft.com/agent-framework/microsoft-agent-framework-version-1-0/">Microsoft Agent Framework 1.0 Release</a></p></blockquote><h2 id="WordPress-Playground-官方-MCP-Server：讓-AI-直接管理-WordPress-站點"><a href="#WordPress-Playground-官方-MCP-Server：讓-AI-直接管理-WordPress-站點" class="headerlink" title="WordPress Playground 官方 MCP Server：讓 AI 直接管理 WordPress 站點"></a>WordPress Playground 官方 MCP Server：讓 AI 直接管理 WordPress 站點</h2><p>WordPress 官方終於把 <code>@wp-playground/mcp</code> 套件推出來了，這下子 Claude Code 或 Gemini CLI 就能直接連上 Playground，透過 WebSocket 來管理 WordPress 站點。不用 SSH、不用複雜的設定，一行指令就能把 AI agent 接進去。</p><p>從裝外掛、建立內容到執行 PHP、管理用戶、跑 WP-CLI 指令，agent 都能做。連線是本地的，用 token 認證，資料都留在你的機器上，安全性這邊還滿放心的。這對想要自動化網站維護的人來說，根本是天選之物——想像一下，跟 Claude 說「幫我更新所有外掛」，然後它自己去跑，這效率才是真的。</p><blockquote><p>原文來源：<a href="https://make.wordpress.org/playground/2026/03/17/connect-ai-coding-agents-to-wordpress-playground-with-mcp/">WordPress Playground MCP Server</a></p></blockquote><h2 id="PraisonAI-爆第二個高危漏洞：YAML-反序列化-RCE"><a href="#PraisonAI-爆第二個高危漏洞：YAML-反序列化-RCE" class="headerlink" title="PraisonAI 爆第二個高危漏洞：YAML 反序列化 RCE"></a>PraisonAI 爆第二個高危漏洞：YAML 反序列化 RCE</h2><p>昨天才剛報了 CVE-2026-39888（沙箱逃逸），今天 PraisonAI 又被爆出 CVE-2026-39890，這次是 YAML 反序列化遠端程式碼執行，CVSS 評分直接 9.8。問題在於 AgentService.loadAgentFromFile 用的 js-yaml 沒有禁用 <code>!!js/function</code> 和 <code>!!js/undefined</code> 標籤，攻擊者只要上傳一個惡意的 agent 定義檔，YAML 解析時就會自動執行 JavaScript 程式碼。</p><p>這兩個漏洞接連爆發，說明 PraisonAI 的安全審查可能不夠嚴格，或者是快速開發時沒有把安全當一回事。已經修復在 4.5.115 版本了，但用舊版本的人得趕快升級，不然真的有風險。這也提醒我們 agent framework 既然要執行動態程式碼，安全邊界要畫得特別清楚。</p><blockquote><p>原文來源：<a href="https://www.thehackerwire.com/praisonai-critical-rce-via-malicious-yaml-parsing-cve-2026-39890/">PraisonAI CVE-2026-39890: Critical YAML RCE</a></p></blockquote><h2 id="GitHub-Copilot-SDK-公開預覽版：把-AI-能力嵌進你的應用"><a href="#GitHub-Copilot-SDK-公開預覽版：把-AI-能力嵌進你的應用" class="headerlink" title="GitHub Copilot SDK 公開預覽版：把 AI 能力嵌進你的應用"></a>GitHub Copilot SDK 公開預覽版：把 AI 能力嵌進你的應用</h2><p>GitHub 把 Copilot SDK 放進公開預覽階段，現在開發者可以把 Copilot 的 agentic 能力嵌進自己的應用裡。Cloud agent 也更新了安全機制，加了代理防火牆讓你控制網際網路存取權限。而且現在 agent 簽署的每一個 commit 都有簽名驗證（provenance tracking），這樣就能追蹤程式碼的來源。</p><p>GitHub 還順帶淘汰了一些模型，4 月 1 號開始整個 Copilot 體驗都不再支援那些舊模型。SDK 公開預覽代表他們想讓更多開發者進來玩，看能找出什麼問題，為正式版做準備。這對想要把 AI 整合進內部工具的團隊來說，終於有個官方的套件可以用。</p><blockquote><p>原文來源：<a href="https://github.blog/changelog/month/04-2026/">GitHub Copilot SDK and Cloud Agent Updates</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/11/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260411/</id>
    <link href="https://mark22013333.github.io/2026/04/11/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260411/"/>
    <published>2026-04-11T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>AWS 在 IDE 工具上持續砸錢，微軟把 agent 框架搞成 production-ready，WordPress 官方終於出 MCP Server，而 PraisonAI 又爆出第二個高危漏洞，GitHub Copilot 則推出公開預覽版 SDK。這禮拜 agent 生態真的在加速，但安全議題也跟著浮出檯面。</p>
<h2 id="Kiro-CLI-v1-0-23：新增-agent-模式快速啟動"><a href="#Kiro-CLI-v1-0-23：新增-agent-模式快速啟動" class="headerlink" title="Kiro CLI v1.0.23：新增 a]]>
    </summary>
    <title>AI 與科技新聞摘要 - 2026/04/11</title>
    <updated>2026-04-11T15:09:07.944Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="Claude Code" scheme="https://mark22013333.github.io/categories/Claude-Code/"/>
    <category term="AI Agent" scheme="https://mark22013333.github.io/tags/AI-Agent/"/>
    <category term="Hermes" scheme="https://mark22013333.github.io/tags/Hermes/"/>
    <category term="監控面板" scheme="https://mark22013333.github.io/tags/%E7%9B%A3%E6%8E%A7%E9%9D%A2%E6%9D%BF/"/>
    <category term="WebSocket" scheme="https://mark22013333.github.io/tags/WebSocket/"/>
    <category term="React" scheme="https://mark22013333.github.io/tags/React/"/>
    <content>
      <![CDATA[<p>你有沒有想過，你的 AI Agent 在幹什麼？它現在在想什麼？記得了哪些東西？花了多少錢？</p><p>Hermes Agent 跑在背景裡，靜靜地執行各種工作。但它的大腦到底存了什麼資料、記憶怎麼組織、成本怎麼算，這些都藏在 <code>~/.hermes/</code> 這個資料夾的各種檔案裡——SQLite、Markdown、YAML、JSON 一堆。要看懂這些原始資料，真香的辦法就是一個視覺化的監控面板。這就是 <strong>Hermes HUD Web UI</strong> 登場的時刻。</p><h2 id="瀏覽器裡的-Agent-意識監控"><a href="#瀏覽器裡的-Agent-意識監控" class="headerlink" title="瀏覽器裡的 Agent 意識監控"></a>瀏覽器裡的 Agent 意識監控</h2><p>Hermes HUD Web UI 是 Hermes HUD 的網頁版本。TUI 版本給你命令列的純粹感，Web 版本就更直覺、更適合長期監看。它用圖表、卡片、即時更新，把 Agent 的內部世界呈現出來。</p><p>這個面板不是簡單的可視化工具。設計上採用了 <strong>讀寫分離</strong> 的思路——你只能看，不能改。這聽起來像是限制，其實是保護。Agent 執行中如果面板能隨意修改狀態，那踩坑的機會太多了。只讀設計確保你的監控動作絕不會搞亂 Agent 的運作。</p><p>10 個監控面板包括：Dashboard（總覽）、Memory（記憶體系）、Skills（技能庫）、Sessions（工作階段）、Cron（排程任務）、Projects（專案）、Health（健康狀態）、Agents（Agent 列表）、Profiles（設定檔）、Token Costs（成本統計）。每一個都是從 <code>~/.hermes/</code> 直接讀取資料，串聯起來呈現 Agent 的完整樣貌。</p><h2 id="架構：React-前端遇上-FastAPI-後端"><a href="#架構：React-前端遇上-FastAPI-後端" class="headerlink" title="架構：React 前端遇上 FastAPI 後端"></a>架構：React 前端遇上 FastAPI 後端</h2><p>前端用的是 React 19，搭配 Vite 做打包、SWR 處理資料快取、WebSocket 吃即時更新。這套組合讓介面反應夠快，不會卡頓。後端是 FastAPI，負責讀取 <code>~/.hermes/</code> 裡的各種檔案，經過處理後透過 WebSocket 推送給前端。</p><p>有趣的是，整個系統的相依套件極簡。後端只需要 4 個套件，前端也只要 4 個。這在現代 Web 開發裡有夠難得，大多數專案早就被套件海淹沒。這也太香了吧，少依賴代表維護成本低、安全漏洞少、部署快速。</p><p>實時更新不是用傳統的輪詢（polling），而是靠 WebSocket 搭配檔案監看。後端監控 <code>~/.hermes/</code> 資料夾，一旦檔案有異動就透過 WebSocket 主動推送給前端。這樣既省資源，又能確保你看到的東西永遠是最新的。</p><h2 id="快取策略的細節"><a href="#快取策略的細節" class="headerlink" title="快取策略的細節"></a>快取策略的細節</h2><p>看起來簡單的實時更新，其實背後有套講究的快取機制。系統用 mtime 搭配 MD5 雜湊值，針對不同資料型別設定不同的快取生命週期（TTL）。Memory 資料可能快取 30 秒，Projects 資料可能快 60 秒。這樣既不會過度計算，也不會讓資料太舊。</p><p>這種漸進式的快取策略看似複雜，卻是 Web 應用必學的技巧。特別是當你要監控 Agent 這種常態執行、資料量龐大的東西，稍微設計不當就容易變成效能災難。</p><h2 id="視覺設計：四種主題讓監控變有趣"><a href="#視覺設計：四種主題讓監控變有趣" class="headerlink" title="視覺設計：四種主題讓監控變有趣"></a>視覺設計：四種主題讓監控變有趣</h2><p>介面提供四種視覺主題：Neural Awakening（神經覺醒）、Blade Runner（銀翼殺手）、fsociety（駭客軍團）、Anime（動漫風）。每一種都有自己的配色和氛圍。如果你長期盯著監控面板，至少讓眼睛不會被單調的灰色折磨。</p><p>最特別的是 CRT 掃描線效果，這是致敬老式陰極射線管螢幕的懷舊細節。扯欸，科技越來越現代，反而去模仿 30 年前的東西。但這種懷舊感確實有種魔力，讓人工智慧的監控面板多了份復古的科幻感。</p><p>鍵盤快捷鍵支援也很完整。按 Ctrl+K 喚出命令列（Command Palette），可以快速切換面板、篩選資料。習慣用鍵盤的人會很享受這種效率。</p><h2 id="數字背後的故事"><a href="#數字背後的故事" class="headerlink" title="數字背後的故事"></a>數字背後的故事</h2><p>Hermes HUD Web UI 在 GitHub 上有 464 顆星。這個數字代表了一個小而精的開源專案被夠多人看見。不是 10 萬顆星的爆款，但也不是無人問津的邊角工具。通常這種規模的專案社群反應最誠摯，也最聚焦。</p><p>MIT 授權意味著你可以自由使用、修改、甚至商用。這對想整合或延伸功能的開發者來說，最大化了靈活性。</p><h2 id="相關生態"><a href="#相關生態" class="headerlink" title="相關生態"></a>相關生態</h2><p>Hermes HUD Web UI 不是孤立的。它的孿生兄弟 hermes-hud 是 TUI 版本，適合純終端環境。而它們共同監控的 Hermes Agent，才是整個故事的主角。要充分利用這些工具，得先理解 Agent 在幹什麼。</p><p>這三者構成了一個完整的生態。Agent 做事，HUD 和 HUD Web 看監控，再根據監控結果調整 Agent 的行為。這種反饋迴圈對 Agent 系統至關重要。</p><h2 id="何時該用這個面板"><a href="#何時該用這個面板" class="headerlink" title="何時該用這個面板"></a>何時該用這個面板</h2><p>如果你在開發 Hermes Agent，Hermes HUD Web UI 基本上是必備工具。它能讓你快速掌握 Agent 的狀態、發現問題在哪裡、追蹤成本是否超支。特別是當 Agent 執行的工作越來越複雜，這種即時監控就越來越寶貴。</p><p>甚至在生產環境，把這個面板當成 Agent 健康狀態的儀表板，也是很合理的用法。讀寫分離的設計確保你監控的同時，不會不小心干擾 Agent 的運作。</p><p>最後，如果你在調試 Agent 的記憶體系統或成本計算，Web UI 的各個面板能讓你視覺化看到邏輯的結果，比起翻 JSON 檔案快一百倍。</p><blockquote><p>原文來源：<a href="https://github.com/joeynyc/hermes-hudui">Hermes HUD Web UI - GitHub</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/11/Hermes-HUD-Web-UI-AI-Agent-%E7%9A%84%E5%8D%B3%E6%99%82%E6%84%8F%E8%AD%98%E7%9B%A3%E6%8E%A7%E9%9D%A2%E6%9D%BF/</id>
    <link href="https://mark22013333.github.io/2026/04/11/Hermes-HUD-Web-UI-AI-Agent-%E7%9A%84%E5%8D%B3%E6%99%82%E6%84%8F%E8%AD%98%E7%9B%A3%E6%8E%A7%E9%9D%A2%E6%9D%BF/"/>
    <published>2026-04-11T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>你有沒有想過，你的 AI Agent 在幹什麼？它現在在想什麼？記得了哪些東西？花了多少錢？</p>
<p>Hermes Agent 跑在背景裡，靜靜地執行各種工作。但它的大腦到底存了什麼資料、記憶怎麼組織、成本怎麼算，這些都藏在 <code>~/.hermes/</code> 這個資料夾的各種檔案裡——SQLite、Markdown、YAML、JSON 一堆。要看懂這些原始資料，真香的辦法就是一個視覺化的監控面板。這就是 <strong>Hermes HUD Web UI</strong> 登場的時刻。</p>
<h2 id="瀏覽器裡的-Agent-意識監控"><a href="#瀏]]>
    </summary>
    <title>Hermes HUD Web UI - AI Agent 的即時意識監控面板</title>
    <updated>2026-04-11T15:09:10.853Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="生活札記" scheme="https://mark22013333.github.io/categories/%E7%94%9F%E6%B4%BB%E6%9C%AD%E8%A8%98/"/>
    <category term="工程師生活" scheme="https://mark22013333.github.io/tags/%E5%B7%A5%E7%A8%8B%E5%B8%AB%E7%94%9F%E6%B4%BB/"/>
    <category term="健康" scheme="https://mark22013333.github.io/tags/%E5%81%A5%E5%BA%B7/"/>
    <category term="久坐" scheme="https://mark22013333.github.io/tags/%E4%B9%85%E5%9D%90/"/>
    <category term="運動" scheme="https://mark22013333.github.io/tags/%E9%81%8B%E5%8B%95/"/>
    <category term="人體工學" scheme="https://mark22013333.github.io/tags/%E4%BA%BA%E9%AB%94%E5%B7%A5%E5%AD%B8/"/>
    <content>
      <![CDATA[<p>連續 sprint 三個禮拜，站起來的時候腰發出了一聲脆響。不是那種「咔」一聲很爽的感覺，是真的有點痛。那時我才發現，自己對著螢幕坐了十四個小時，中間只離開過一次，還是去廁所。</p><p>這個問題有多嚴重？某次 slack 裡同事分享了一篇研究，久坐超過 9 小時，死亡風險增加 22%。如果每天坐滿 10 小時以上，心血管死亡風險更直接升到 34%。我看著自己的工時紀錄，有點破防。</p><p>竹科現在已經不流行「爆肝」了。台積電蓋了兩座運動館、十六面球場，聯發科還有職籃等級的籃球場。這不是公司在做善事，是他們發現工程師坐死了比坐出 bug 更划不來。看看大廠都在轉型健身，我們這些每天和 code 黏在一起的人該認真了。</p><h2 id="為什麼坐著會這麼糟"><a href="#為什麼坐著會這麼糟" class="headerlink" title="為什麼坐著會這麼糟"></a>為什麼坐著會這麼糟</h2><p>有夠誇張的是，久坐不只是單純的腰痛。血液循環變差、肌肉萎縮、代謝下降，整個身體系統都在罷工。最絕的是，再怎麼健身房練習也補不回來。根據 <a href="https://www.sciencedirect.com/science/article/pii/S0003687021000478">Applied Ergonomics 2021 的研究</a>，他們比較了全坐、全站、交替三個方案：</p><ul><li>全坐：認知測試最差，大概就是一邊 debug 一邊變笨</li><li>全站：腿會廢掉，員工投訴聲不絕於耳</li><li><strong>交替模式：工作記憶、執行功能、創意思考全面勝出</strong></li></ul><p>交替才是王道。不是說一定要全天站著，那真的有夠累，而是要在坐和站之間切換。</p><h2 id="怎麼救自己"><a href="#怎麼救自己" class="headerlink" title="怎麼救自己"></a>怎麼救自己</h2><h3 id="20-8-2-循環法則"><a href="#20-8-2-循環法則" class="headerlink" title="20-8-2 循環法則"></a>20-8-2 循環法則</h3><p>最簡單的方法就是記住這個數字組合。每 30 分鐘一個循環：</p><ul><li><strong>坐 20 分鐘</strong> - 專心工作</li><li><strong>站 8 分鐘</strong> - 站著看代碼、回訊息</li><li><strong>走 2 分鐘</strong> - 走兩圈辦公室、喝口水</li></ul><p>根本不用花額外時間，只是改變工作姿勢。Reddit 上有一堆工程師推薦這招，尤其遠端工作的人更要做，因為沒有上下班的強迫走路，真的有可能從早坐到晚。</p><h3 id="不要靠站立桌這一招"><a href="#不要靠站立桌這一招" class="headerlink" title="不要靠站立桌這一招"></a>不要靠站立桌這一招</h3><p>我朋友花了八千塊買電動站立桌，用了一個月，現在當書架。這東西不是不行，但很多人的誤解就是「買了站立桌就可以健康」。實際上，站整天跟坐整天一樣爛，重點還是<strong>交替</strong>。如果你會忘記站起來，那再貴的桌子也沒用。</p><p>建議是設個鬧鐘，每 40 分鐘提醒自己一次。手機、電腦、smartwatch 都可以，別等到身體發出警訊才動。</p><h3 id="辦公室微運動"><a href="#辦公室微運動" class="headerlink" title="辦公室微運動"></a>辦公室微運動</h3><p>既然坐著最多，那就從座位上開始。Reddit 和健身社群推薦這幾個零成本的動作：</p><ol><li><strong>動腳板運動</strong> - 腳尖點地往上翹，很簡單但能活動小腿</li><li><strong>大腿夾筆</strong> - 坐著夾一支筆在大腿中間，用力，維持幾秒，真香</li><li><strong>原地踏步</strong> - 開會時站著踏步，邊講邊動</li></ol><p>還有一個笑死的研究：<strong>4 秒高強度運動</strong> - 就是全力衝刺，只要 4 秒，連續做幾個循環。結果是血脂下降 31%。有夠誇張對吧？</p><h2 id="遠端工作者更危險"><a href="#遠端工作者更危險" class="headerlink" title="遠端工作者更危險"></a>遠端工作者更危險</h2><p>疫情後遠端變常態。很多人以為在家工作比較健康，實際上是<strong>最容易久坐的陷阱</strong>。沒有通勤、沒有去會議室的走路、甚至廁所也裝得很近，整天可以真的不動。我認識的幾個遠端工程師，開會時才發現自己已經坐了 11 小時，褲子都勒進肉裡。</p><p>遠端工作更要強制自己動起來。不管是站立桌、鬧鐘提醒，還是乾脆把廁所裝在遠一點的地方（認真的），都要破壞這個坐著的舒服陷阱。</p><h2 id="竹科文化正在改變"><a href="#竹科文化正在改變" class="headerlink" title="竹科文化正在改變"></a>竹科文化正在改變</h2><p>五年前，竹科工程師的話題是「爆肝怎麼熬」、「颱風天還在 sprint」。現在的年輕工程師，題目變成「廠區健身房怎麼約」、「籃球場隊伍在徵人」。大廠主動投入資源做這件事，不是因為他們變善心，是因為<strong>會坐出病的工程師，工作效率比會爆肝的人更爛</strong>。</p><p>連高層都認可了，我們還有什麼理由不動？</p><h2 id="最後"><a href="#最後" class="headerlink" title="最後"></a>最後</h2><p>健康不會因為你 deadline 急就自動暫停。腰痛、血栓、代謝差，這些事一旦纏上身，修復的時間比你想像得長。與其等到身體報警才後悔，不如從現在開始改變。</p><p>設個鬧鐘，每 30 分鐘站起來。這不是廢話，是真的會改變。</p><p>而且，站著想 code，有時候靈感就自己跑出來了。試試看吧。</p><hr><p><strong>參考資源</strong>：</p><ul><li><a href="https://udn.com/news/story/7266/9350369">竹科大廠推健康轉型 - 台積電、聯發科運動設施</a></li><li><a href="https://www.sciencedirect.com/science/article/pii/S0003687021000478">Applied Ergonomics 2021 - 站坐交替與認知功能研究</a></li></ul>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/11/%E5%B7%A5%E7%A8%8B%E5%B8%AB%E4%B8%8D%E8%A6%81%E6%AD%BB%E5%9C%A8%E6%A4%85%E5%AD%90%E4%B8%8A-%E4%B9%85%E5%9D%90%E8%81%B7%E6%A5%AD%E7%97%85%E8%87%AA%E6%95%91%E6%8C%87%E5%8D%97-2026/</id>
    <link href="https://mark22013333.github.io/2026/04/11/%E5%B7%A5%E7%A8%8B%E5%B8%AB%E4%B8%8D%E8%A6%81%E6%AD%BB%E5%9C%A8%E6%A4%85%E5%AD%90%E4%B8%8A-%E4%B9%85%E5%9D%90%E8%81%B7%E6%A5%AD%E7%97%85%E8%87%AA%E6%95%91%E6%8C%87%E5%8D%97-2026/"/>
    <published>2026-04-11T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>連續 sprint 三個禮拜，站起來的時候腰發出了一聲脆響。不是那種「咔」一聲很爽的感覺，是真的有點痛。那時我才發現，自己對著螢幕坐了十四個小時，中間只離開過一次，還是去廁所。</p>
<p>這個問題有多嚴重？某次 slack 裡同事分享了一篇研究，久坐超過 9 小時，死亡風險增加 22%。如果每天坐滿 10 小時以上，心血管死亡風險更直接升到 34%。我看著自己的工時紀錄，有點破防。</p>
<p>竹科現在已經不流行「爆肝」了。台積電蓋了兩座運動館、十六面球場，聯發科還有職籃等級的籃球場。這不是公司在做善事，是他們發現工程師坐死了比坐出 bug 更划不來。看看大廠都在轉型健身，我們這些]]>
    </summary>
    <title>工程師不要死在椅子上 - 久坐職業病自救指南 2026</title>
    <updated>2026-04-11T15:09:09.594Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="Claude Code" scheme="https://mark22013333.github.io/categories/Claude-Code/"/>
    <category term="Claude" scheme="https://mark22013333.github.io/tags/Claude/"/>
    <category term="AI Agent" scheme="https://mark22013333.github.io/tags/AI-Agent/"/>
    <category term="Anthropic" scheme="https://mark22013333.github.io/tags/Anthropic/"/>
    <category term="Managed Agents" scheme="https://mark22013333.github.io/tags/Managed-Agents/"/>
    <category term="API" scheme="https://mark22013333.github.io/tags/API/"/>
    <content>
      <![CDATA[<p>自己搭 AI agent 的基礎設施有多痛？沙箱要做、狀態要管、retry 要寫、工具執行要安全隔離、觀測性要加、容器要維護。光這些就能吃掉幾週的開發時間，而且你真正想解決的業務問題一行 code 都還沒寫。</p><p>4&#x2F;8 Anthropic 推出 <strong>Claude Managed Agents</strong>，把上面這些全包了。你只要定義「agent 要做什麼」，基礎設施的部分 Anthropic 幫你扛。目前是公開測試版，所有 API 帳號都能用。</p><h2 id="四個核心概念"><a href="#四個核心概念" class="headerlink" title="四個核心概念"></a>四個核心概念</h2><p>在動手之前，先搞清楚四個東西的關係：</p><table><thead><tr><th>概念</th><th>是什麼</th><th>類比</th></tr></thead><tbody><tr><td><strong>Agent</strong></td><td>模型 + system prompt + 工具 + MCP servers</td><td>職位說明書</td></tr><tr><td><strong>Environment</strong></td><td>容器設定（套件、網路規則、檔案掛載）</td><td>辦公室環境</td></tr><tr><td><strong>Session</strong></td><td>一個正在跑的 agent 實例</td><td>一次工作任務</td></tr><tr><td><strong>Events</strong></td><td>你跟 agent 之間的訊息交換</td><td>對話和指令</td></tr></tbody></table><p>Agent 定義一次，可以跨多個 Session 重複使用。Environment 也是——配好一個環境，所有 Session 都能引用。Session 是實際跑任務的地方，每個 Session 有獨立的檔案系統和對話歷史。</p><h2 id="跟-Messages-API-有什麼不同"><a href="#跟-Messages-API-有什麼不同" class="headerlink" title="跟 Messages API 有什麼不同"></a>跟 Messages API 有什麼不同</h2><p>如果你已經在用 Claude API 的 Messages endpoint 搭配自己的 agent loop，可能會問：Managed Agents 跟我自己做的有什麼差？</p><table><thead><tr><th></th><th>Messages API</th><th>Managed Agents</th></tr></thead><tbody><tr><td>定位</td><td>直接存取模型</td><td>預建的 agent 執行環境</td></tr><tr><td>適合</td><td>需要細緻控制 agent loop</td><td>長時間執行、非同步任務</td></tr><tr><td>基礎設施</td><td>自己搭</td><td>Anthropic 代管</td></tr><tr><td>工具執行</td><td>自己實作</td><td>雲端沙箱自動執行</td></tr><tr><td>狀態管理</td><td>自己處理</td><td>內建 checkpointing</td></tr></tbody></table><p>簡單說：Messages API 給你最大的自由度，Managed Agents 給你最快的上線速度。如果你的 agent 需要跑幾分鐘到幾小時、需要安全的容器環境、而且不想自己管基礎設施——Managed Agents 就是為你設計的。</p><h2 id="前置準備"><a href="#前置準備" class="headerlink" title="前置準備"></a>前置準備</h2><p>需要三樣東西：</p><ol><li>Anthropic Console 帳號</li><li>API key</li><li>安裝 ant CLI 或 SDK</li></ol><h3 id="安裝-ant-CLI"><a href="#安裝-ant-CLI" class="headerlink" title="安裝 ant CLI"></a>安裝 ant CLI</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># macOS</span></span><br><span class="line">brew install anthropics/tap/ant</span><br><span class="line">xattr -d com.apple.quarantine <span class="string">&quot;<span class="subst">$(brew --prefix)</span>/bin/ant&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Linux</span></span><br><span class="line">VERSION=1.0.0</span><br><span class="line">OS=$(<span class="built_in">uname</span> -s | <span class="built_in">tr</span> <span class="string">&#x27;[:upper:]&#x27;</span> <span class="string">&#x27;[:lower:]&#x27;</span>)</span><br><span class="line">ARCH=$(<span class="built_in">uname</span> -m | sed -e <span class="string">&#x27;s/x86_64/amd64/&#x27;</span> -e <span class="string">&#x27;s/aarch64/arm64/&#x27;</span>)</span><br><span class="line">curl -fsSL <span class="string">&quot;https://github.com/anthropics/anthropic-cli/releases/download/v<span class="variable">$&#123;VERSION&#125;</span>/ant_<span class="variable">$&#123;VERSION&#125;</span>_<span class="variable">$&#123;OS&#125;</span>_<span class="variable">$&#123;ARCH&#125;</span>.tar.gz&quot;</span> \</span><br><span class="line">  | sudo tar -xz -C /usr/local/bin ant</span><br><span class="line"></span><br><span class="line"><span class="comment"># 或用 Go 安裝</span></span><br><span class="line">go install github.com/anthropics/anthropic-cli/cmd/ant@latest</span><br></pre></td></tr></table></figure><h3 id="安裝-SDK"><a href="#安裝-SDK" class="headerlink" title="安裝 SDK"></a>安裝 SDK</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Python</span></span><br><span class="line">pip install anthropic</span><br><span class="line"></span><br><span class="line"><span class="comment"># TypeScript</span></span><br><span class="line">npm install @anthropic-ai/sdk</span><br></pre></td></tr></table></figure><p>設定 API key：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">export</span> ANTHROPIC_API_KEY=<span class="string">&quot;your-api-key-here&quot;</span></span><br></pre></td></tr></table></figure><h2 id="Step-1：建立-Agent"><a href="#Step-1：建立-Agent" class="headerlink" title="Step 1：建立 Agent"></a>Step 1：建立 Agent</h2><p>Agent 就是一份「職位說明書」——定義用哪個模型、system prompt 寫什麼、可以用哪些工具。</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">from</span> anthropic <span class="keyword">import</span> Anthropic</span><br><span class="line"></span><br><span class="line">client = Anthropic()</span><br><span class="line"></span><br><span class="line">agent = client.beta.agents.create(</span><br><span class="line">    name=<span class="string">&quot;Coding Assistant&quot;</span>,</span><br><span class="line">    model=<span class="string">&quot;claude-sonnet-4-6&quot;</span>,</span><br><span class="line">    system=<span class="string">&quot;你是一個專業的程式碼助手。寫乾淨、有文件註解的程式碼。&quot;</span>,</span><br><span class="line">    tools=[</span><br><span class="line">        &#123;<span class="string">&quot;type&quot;</span>: <span class="string">&quot;agent_toolset_20260401&quot;</span>&#125;,</span><br><span class="line">    ],</span><br><span class="line">)</span><br><span class="line"></span><br><span class="line"><span class="built_in">print</span>(<span class="string">f&quot;Agent ID: <span class="subst">&#123;agent.<span class="built_in">id</span>&#125;</span>, version: <span class="subst">&#123;agent.version&#125;</span>&quot;</span>)</span><br></pre></td></tr></table></figure><p><code>agent_toolset_20260401</code> 是全套內建工具——bash、檔案操作、網頁搜尋等等。建立完會拿到一個 <code>agent.id</code>，後面每個 Session 都要用到。</p><p>用 ant CLI 也能做同樣的事：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">ant beta:agents create \</span><br><span class="line">  --name <span class="string">&quot;Coding Assistant&quot;</span> \</span><br><span class="line">  --model <span class="string">&#x27;&#123;id: claude-sonnet-4-6&#125;&#x27;</span> \</span><br><span class="line">  --system <span class="string">&quot;你是一個專業的程式碼助手。寫乾淨、有文件註解的程式碼。&quot;</span> \</span><br><span class="line">  --tool <span class="string">&#x27;&#123;type: agent_toolset_20260401&#125;&#x27;</span></span><br></pre></td></tr></table></figure><h2 id="Step-2：建立-Environment"><a href="#Step-2：建立-Environment" class="headerlink" title="Step 2：建立 Environment"></a>Step 2：建立 Environment</h2><p>Environment 定義容器的設定——裝什麼套件、網路怎麼開、要不要掛載檔案。</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">environment = client.beta.environments.create(</span><br><span class="line">    name=<span class="string">&quot;dev-env&quot;</span>,</span><br><span class="line">    config=&#123;</span><br><span class="line">        <span class="string">&quot;type&quot;</span>: <span class="string">&quot;cloud&quot;</span>,</span><br><span class="line">        <span class="string">&quot;networking&quot;</span>: &#123;<span class="string">&quot;type&quot;</span>: <span class="string">&quot;unrestricted&quot;</span>&#125;,</span><br><span class="line">    &#125;,</span><br><span class="line">)</span><br><span class="line"></span><br><span class="line"><span class="built_in">print</span>(<span class="string">f&quot;Environment ID: <span class="subst">&#123;environment.<span class="built_in">id</span>&#125;</span>&quot;</span>)</span><br></pre></td></tr></table></figure><p><code>unrestricted</code> 代表容器可以存取外部網路。如果你的 agent 不需要上網，可以設定限制來提高安全性。</p><h2 id="Step-3：啟動-Session"><a href="#Step-3：啟動-Session" class="headerlink" title="Step 3：啟動 Session"></a>Step 3：啟動 Session</h2><p>有了 Agent 和 Environment，就能啟動 Session 了：</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">session = client.beta.sessions.create(</span><br><span class="line">    agent=agent.<span class="built_in">id</span>,</span><br><span class="line">    environment_id=environment.<span class="built_in">id</span>,</span><br><span class="line">    title=<span class="string">&quot;第一個 Managed Agent&quot;</span>,</span><br><span class="line">)</span><br><span class="line"></span><br><span class="line"><span class="built_in">print</span>(<span class="string">f&quot;Session ID: <span class="subst">&#123;session.<span class="built_in">id</span>&#125;</span>&quot;</span>)</span><br></pre></td></tr></table></figure><p>Session 建立後，Anthropic 會在背景 provision 一個容器。</p><h2 id="Step-4：互動-送訊息、收串流"><a href="#Step-4：互動-送訊息、收串流" class="headerlink" title="Step 4：互動 - 送訊息、收串流"></a>Step 4：互動 - 送訊息、收串流</h2><p>重頭戲來了。開啟 SSE 串流，送出使用者訊息，然後即時收到 agent 的回應：</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">with</span> client.beta.sessions.events.stream(session.<span class="built_in">id</span>) <span class="keyword">as</span> stream:</span><br><span class="line">    <span class="comment"># 開串流後送出訊息</span></span><br><span class="line">    client.beta.sessions.events.send(</span><br><span class="line">        session.<span class="built_in">id</span>,</span><br><span class="line">        events=[</span><br><span class="line">            &#123;</span><br><span class="line">                <span class="string">&quot;type&quot;</span>: <span class="string">&quot;user.message&quot;</span>,</span><br><span class="line">                <span class="string">&quot;content&quot;</span>: [</span><br><span class="line">                    &#123;</span><br><span class="line">                        <span class="string">&quot;type&quot;</span>: <span class="string">&quot;text&quot;</span>,</span><br><span class="line">                        <span class="string">&quot;text&quot;</span>: <span class="string">&quot;寫一個 Python 腳本計算前 20 個費波那契數，存到 fibonacci.txt&quot;</span>,</span><br><span class="line">                    &#125;,</span><br><span class="line">                ],</span><br><span class="line">            &#125;,</span><br><span class="line">        ],</span><br><span class="line">    )</span><br><span class="line"></span><br><span class="line">    <span class="comment"># 處理串流事件</span></span><br><span class="line">    <span class="keyword">for</span> event <span class="keyword">in</span> stream:</span><br><span class="line">        <span class="keyword">match</span> event.<span class="built_in">type</span>:</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&quot;agent.message&quot;</span>:</span><br><span class="line">                <span class="keyword">for</span> block <span class="keyword">in</span> event.content:</span><br><span class="line">                    <span class="built_in">print</span>(block.text, end=<span class="string">&quot;&quot;</span>)</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&quot;agent.tool_use&quot;</span>:</span><br><span class="line">                <span class="built_in">print</span>(<span class="string">f&quot;\n[使用工具: <span class="subst">&#123;event.name&#125;</span>]&quot;</span>)</span><br><span class="line">            <span class="keyword">case</span> <span class="string">&quot;session.status_idle&quot;</span>:</span><br><span class="line">                <span class="built_in">print</span>(<span class="string">&quot;\n\nAgent 完成。&quot;</span>)</span><br><span class="line">                <span class="keyword">break</span></span><br></pre></td></tr></table></figure><p>跑起來大概長這樣：</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">我來寫一個 Python 腳本計算費波那契數列。</span><br><span class="line">[使用工具: write]</span><br><span class="line">[使用工具: bash]</span><br><span class="line">腳本執行成功，讓我確認輸出檔案。</span><br><span class="line">[使用工具: bash]</span><br><span class="line">fibonacci.txt 已包含前 20 個費波那契數（0 到 4181）。</span><br><span class="line"></span><br><span class="line">Agent 完成。</span><br></pre></td></tr></table></figure><p>整個過程中，Claude 自己決定要用什麼工具、自己寫程式碼、自己執行、自己驗證結果。你只要送訊息和收串流。</p><h2 id="背後發生了什麼"><a href="#背後發生了什麼" class="headerlink" title="背後發生了什麼"></a>背後發生了什麼</h2><p>當你送出 user event，Managed Agents 依序做了這些事：</p><ol><li><strong>Provision 容器</strong> — 根據 Environment 設定建置執行環境</li><li><strong>跑 agent loop</strong> — Claude 根據你的訊息決定用哪些工具</li><li><strong>執行工具</strong> — 檔案寫入、bash 指令等全在容器內執行</li><li><strong>串流事件</strong> — 即時推送更新到你的應用</li><li><strong>進入 idle</strong> — 沒事做了就發 <code>session.status_idle</code></li></ol><p>你也可以在 agent 執行途中送新的 user event 來引導方向，或者中斷它改做別的事。</p><h2 id="內建工具清單"><a href="#內建工具清單" class="headerlink" title="內建工具清單"></a>內建工具清單</h2><p><code>agent_toolset_20260401</code> 包含的工具：</p><ul><li><strong>Bash</strong> — 在容器內執行 shell 指令</li><li><strong>檔案操作</strong> — 讀取、寫入、編輯、glob、grep</li><li><strong>網頁搜尋與抓取</strong> — 搜尋網路、讀取網頁內容</li><li><strong>MCP servers</strong> — 連接外部工具提供者</li></ul><p>如果不想給全套工具，也可以只啟用特定工具。</p><h2 id="跟其他-AI-Agent-平台比一下"><a href="#跟其他-AI-Agent-平台比一下" class="headerlink" title="跟其他 AI Agent 平台比一下"></a>跟其他 AI Agent 平台比一下</h2><p>市面上做類似事情的不只 Anthropic。OpenAI 的 Codex 有自己的 sandbox 環境，但走的是 ChatGPT 整合路線而不是獨立 API。Google 的 Gemini API 支援 function calling 但沒有代管的 agent 執行環境。Kiro 和 Cursor 則專注在 IDE 端的 agent 體驗。</p><p>Managed Agents 的差異化在於：它是純 API 服務，不綁任何 UI。你可以用它建 Slack bot、內部工具、CI&#x2F;CD pipeline、自動化工作流——任何需要 AI agent 跑在雲端的場景都行。</p><h2 id="定價"><a href="#定價" class="headerlink" title="定價"></a>定價</h2><p>標準 Claude token 費 + <strong>$0.08&#x2F;session-hour</strong>。</p><p>session-hour 只算 active runtime。如果 agent 跑了 15 分鐘就完成，你付 $0.02 的基礎設施費加上 token 用量。跟自己維護一台 sandbox 伺服器的成本比，對大多數使用量來說便宜太多。</p><h2 id="注意事項"><a href="#注意事項" class="headerlink" title="注意事項"></a>注意事項</h2><p>幾個要留意的地方：</p><ul><li><strong>Beta 狀態</strong> — 所有 request 都需要加 <code>managed-agents-2026-04-01</code> beta header（SDK 會自動加）</li><li><strong>Rate limit</strong> — 建立類 endpoint 60 req&#x2F;min，讀取類 600 req&#x2F;min</li><li><strong>進階功能需申請</strong> — outcomes、multiagent、memory 目前是 research preview，要另外申請</li><li><strong>品牌規範</strong> — 如果你要在產品裡整合，不能用「Claude Code Agent」或「Claude Cowork Agent」的名稱，要用自己的品牌</li></ul><h2 id="實際使用情境"><a href="#實際使用情境" class="headerlink" title="實際使用情境"></a>實際使用情境</h2><p><strong>自動化程式碼審查</strong>：建一個 agent 接 GitHub webhook，每次有 PR 就自動跑 review，把結果寫回 PR comment。Managed Agents 的沙箱環境讓它能安全地 clone repo 和跑測試。</p><p><strong>資料處理 pipeline</strong>：讓 agent 定期抓取外部資料、做清洗和轉換、產出報告。長時間執行正是 Managed Agents 的強項。</p><p><strong>內部工具 bot</strong>：在 Slack 或 Teams 裡接一個 agent，讓團隊用自然語言操作內部系統。Managed Agents 處理 session 管理和工具執行，你只需要寫 Slack 整合的部分。</p><hr><p>從自己搭 agent loop 到用 Managed Agents，開發時間可以從幾週壓縮到幾天。$0.08&#x2F;hr 的代價換來的是不用管沙箱、不用管狀態、不用管重試邏輯。對大多數企業級 AI agent 的場景來說，這個取捨很划算。</p><blockquote><p>原文來源：<a href="https://platform.claude.com/docs/en/managed-agents/overview">Claude Managed Agents overview</a><br>原文來源：<a href="https://platform.claude.com/docs/en/managed-agents/quickstart">Get started with Claude Managed Agents</a><br>參考來源：<a href="https://anthropic.skilljar.com/">Claude Code in Action - Anthropic Academy</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/10/Claude-Managed-Agents-%E5%AE%8C%E6%95%B4%E6%95%99%E5%AD%B8-%E5%BE%9E%E9%9B%B6%E6%89%93%E9%80%A0%E9%9B%B2%E7%AB%AF-AI-Agent/</id>
    <link href="https://mark22013333.github.io/2026/04/10/Claude-Managed-Agents-%E5%AE%8C%E6%95%B4%E6%95%99%E5%AD%B8-%E5%BE%9E%E9%9B%B6%E6%89%93%E9%80%A0%E9%9B%B2%E7%AB%AF-AI-Agent/"/>
    <published>2026-04-10T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>自己搭 AI agent 的基礎設施有多痛？沙箱要做、狀態要管、retry 要寫、工具執行要安全隔離、觀測性要加、容器要維護。光這些就能吃掉幾週的開發時間，而且你真正想解決的業務問題一行 code 都還沒寫。</p>
<p>4&#x2F;8 Anthropic 推出 <strong>Claude Managed Agents</strong>，把上面這些全包了。你只要定義「agent 要做什麼」，基礎設施的部分 Anthropic 幫你扛。目前是公開測試版，所有 API 帳號都能用。</p>
<h2 id="四個核心概念"><a href="#四個核心概念" class="headerl]]>
    </summary>
    <title>Claude Managed Agents 完整教學 - 從零打造雲端 AI Agent</title>
    <updated>2026-04-10T11:09:27.988Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="AI與科技新聞" scheme="https://mark22013333.github.io/categories/AI%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E/"/>
    <category term="Claude" scheme="https://mark22013333.github.io/tags/Claude/"/>
    <category term="OpenAI" scheme="https://mark22013333.github.io/tags/OpenAI/"/>
    <category term="資安" scheme="https://mark22013333.github.io/tags/%E8%B3%87%E5%AE%89/"/>
    <category term="AI 新聞" scheme="https://mark22013333.github.io/tags/AI-%E6%96%B0%E8%81%9E/"/>
    <category term="Codex" scheme="https://mark22013333.github.io/tags/Codex/"/>
    <category term="Copilot" scheme="https://mark22013333.github.io/tags/Copilot/"/>
    <category term="Managed Agents" scheme="https://mark22013333.github.io/tags/Managed-Agents/"/>
    <content>
      <![CDATA[<p>Anthropic 把 AI agent 的基礎設施直接打包成代管服務、OpenAI 推出 $100 中間價位搶 Claude 的客群、GitHub Copilot 在 VS Code 加入全自主 Autopilot 模式、又一個 AI 框架被打穿 CVSS 9.9，然後 Cowork 終於從 research preview 畢業了。</p><h2 id="Claude-Managed-Agents：Anthropic-幫你跑-AI-Agent-的代管服務"><a href="#Claude-Managed-Agents：Anthropic-幫你跑-AI-Agent-的代管服務" class="headerlink" title="Claude Managed Agents：Anthropic 幫你跑 AI Agent 的代管服務"></a>Claude Managed Agents：Anthropic 幫你跑 AI Agent 的代管服務</h2><p>4&#x2F;8 Anthropic 推出 <strong>Claude Managed Agents</strong> 公開測試版。核心概念：你定義 agent 要做什麼（system prompt、工具、模型），Anthropic 負責跑起來——沙箱執行、狀態管理、agent loop、工具呼叫全部代管。</p><p>用法分四步：建立 Agent 定義 → 設定 Environment（預裝套件、網路規則、掛載檔案）→ 啟動 Session → 透過 SSE 串流互動。內建工具包含 bash、檔案操作、網頁搜尋、程式碼執行。整個流程可以用 Claude Console 操作，也可以用新推出的 <code>ant</code> CLI，或直接在 Claude Code 裡面用 claude-api Skill。</p><p>定價是標準 token 費 + <strong>$0.08&#x2F;session-hour</strong>。Notion、Rakuten、Sentry 已經在用了。Anthropic 自己的測試顯示，在結構化檔案生成任務上，Managed Agents 比標準 prompting loop 的成功率高出最多 10 個百分點，而且最難的任務改善幅度最大。</p><p>對開發者來說這解決了一個很現實的問題：自己搭 agent 基礎設施太花時間。sandboxing 要做、state 要管、retry 要寫、觀測性要加——Managed Agents 把這些全包了。$0.08&#x2F;hr 的代價換來的是「幾天上線」而不是「幾個月搭建」。</p><blockquote><p>原文來源：<a href="https://claude.com/blog/claude-managed-agents">Claude Managed Agents: get to production 10x faster</a></p></blockquote><h2 id="OpenAI-推出-100-月-Pro-方案：明擺著對標-Claude"><a href="#OpenAI-推出-100-月-Pro-方案：明擺著對標-Claude" class="headerlink" title="OpenAI 推出 $100&#x2F;月 Pro 方案：明擺著對標 Claude"></a>OpenAI 推出 $100&#x2F;月 Pro 方案：明擺著對標 Claude</h2><p>4&#x2F;9 OpenAI 宣布新的 <strong>$100&#x2F;月 ChatGPT Pro</strong> 訂閱方案，提供比 Plus（$20&#x2F;月）多 5 倍的 Codex 用量。五月底前訂閱還有限時加碼到 10 倍。</p><p>OpenAI 現在的訂閱階梯變成三層：Plus $20（基本）、Pro $100（5x 額度 + Pro 專屬模型 + 無限 Instant&#x2F;Thinking）、Pro $200（20x 額度，重度使用者）。同時 Business 年費從 $25 降到 $20&#x2F;seat，另外新增了 Codex seat——只付 Codex 用量不含 ChatGPT，按 credit 計費。</p><p>CNBC 的報導直接寫了：這個定價就是來對標 Anthropic 的。Claude 長期有 $100&#x2F;月的 Max 方案，OpenAI 終於補上了中間價位帶。Engadget 的評語更直白：「OpenAI has a new $100 ChatGPT Pro plan to better match up with Claude.」</p><p>AI coding 工具的價格戰升溫。對使用者來說好消息是選擇變多了。</p><blockquote><p>原文來源：<a href="https://www.macrumors.com/2026/04/09/openai-pro-subscription-tiers/">OpenAI Adds New $100&#x2F;Month ChatGPT Subscription Tier</a></p></blockquote><h2 id="GitHub-Copilot-VS-Code-更新：Autopilot-全自主模式上線"><a href="#GitHub-Copilot-VS-Code-更新：Autopilot-全自主模式上線" class="headerlink" title="GitHub Copilot VS Code 更新：Autopilot 全自主模式上線"></a>GitHub Copilot VS Code 更新：Autopilot 全自主模式上線</h2><p>GitHub Copilot 在 VS Code 的三月更新包（4&#x2F;8 公告）裡塞了幾個重要功能。最醒目的是 <strong>Autopilot</strong>——公開預覽的全自主 agent session。跟之前的 agent mode 不同，Autopilot 不需要你在旁邊一直 review，它會自己跑完整個工作流。</p><p>其他更新包括：整合瀏覽器除錯（agent 可以直接操作瀏覽器）、chat 支援圖片和影片輸入、新的統一編輯器管理 chat 客製化設定。CLI 那邊也有動作——現在可以接自己的模型 provider 或跑完全本地的模型，不一定要走 GitHub 的 routing。</p><p>另外一個實驗性功能叫 <strong>Rubber Duck</strong>，幫助改善 LLM 在 coding 時的表現。SDK 也進入公開預覽，讓開發者把 Copilot 的 agent 能力嵌入自己的應用。</p><p>Autopilot 的方向跟 Cursor 3 的 agent-first 設計、Claude Code 的 Auto Mode 是同一個趨勢——AI coding 工具正在從「輔助」走向「自主」。差別在於各家的安全護欄和品質控管機制。</p><blockquote><p>原文來源：<a href="https://github.blog/changelog/2026-04-08-github-copilot-in-visual-studio-code-march-releases/">GitHub Copilot in Visual Studio Code, March Releases</a></p></blockquote><h2 id="PraisonAI-CVE-2026-39888：CVSS-9-9-沙箱逃逸，又一個-AI-框架被打穿"><a href="#PraisonAI-CVE-2026-39888：CVSS-9-9-沙箱逃逸，又一個-AI-框架被打穿" class="headerlink" title="PraisonAI CVE-2026-39888：CVSS 9.9 沙箱逃逸，又一個 AI 框架被打穿"></a>PraisonAI CVE-2026-39888：CVSS 9.9 沙箱逃逸，又一個 AI 框架被打穿</h2><p>4&#x2F;8 揭露，PraisonAI（一個多 agent 協作框架）的 <code>execute_code()</code> 函數存在沙箱逃逸漏洞，CVSS <strong>9.9</strong>。攻擊者不需要認證就能遠端執行任意 Python 程式碼。</p><p>技術細節：AST-based 黑名單不完整。subprocess 路徑只擋了 11 個屬性名，但直接執行路徑擋了 30+。關鍵的 frame-traversal 屬性（<code>__traceback__</code>、<code>tb_frame</code>、<code>f_back</code>、<code>f_builtins</code>）在 subprocess 清單裡全部缺席。攻擊者提交一段觸發 caught exception 的程式碼，沿著沒被擋的 frame-traversal 屬性一路爬到真正的 builtins dict，拿到 <code>exec</code> 函數，沙箱就形同虛設了。</p><p>受影響版本是 1.5.115 之前的所有 PraisonAI，已修補。</p><p>加上之前的 Langflow（9.3）、Flowise（10.0）、n8n（10.0）、MLflow（10.0），AI 框架的資安紀錄繼續慘。這些工具為了讓 AI 方便執行程式碼，開了各種 exec&#x2F;eval 的口子，結果沙箱實作品質參差不齊。「AST 黑名單」這種防禦方式本質上就是在跟攻擊者玩貓抓老鼠——你漏一個屬性，整條防線就崩了。</p><blockquote><p>原文來源：<a href="https://www.thehackerwire.com/critical-praisonai-sandbox-escape-rce-cve-2026-39888/">Critical PraisonAI Sandbox Escape RCE (CVE-2026-39888)</a></p></blockquote><h2 id="Anthropic-ant-CLI-Cowork-GA：兩個容易被漏掉的公告"><a href="#Anthropic-ant-CLI-Cowork-GA：兩個容易被漏掉的公告" class="headerlink" title="Anthropic ant CLI + Cowork GA：兩個容易被漏掉的公告"></a>Anthropic ant CLI + Cowork GA：兩個容易被漏掉的公告</h2><p>夾在 Managed Agents 的大新聞裡，Anthropic 同時推出了 <strong>ant CLI</strong>——一個用 Go 寫的 Claude API 命令列工具。不是 Claude Code（那是 agentic coding），ant CLI 是純粹的 API 客戶端，讓你在終端機裡直接跟 Claude API 互動、用 YAML 管理 API 資源版本。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">go install <span class="string">&#x27;github.com/anthropics/anthropic-cli/cmd/ant@latest&#x27;</span></span><br><span class="line">ant messages create --model claude-sonnet-4-6 --message <span class="string">&quot;Hello&quot;</span></span><br></pre></td></tr></table></figure><p>另一個：<strong>Claude Cowork 正式 GA</strong>。macOS 和 Windows 版本對所有付費訂閱者開放，不再是 research preview。Cowork 是 Claude Desktop 裡讓 AI 直接操作你電腦檔案的模式——可以讀寫文件、跑 shell 指令、安排排程任務。從 preview 到 GA 代表 Anthropic 對穩定度有一定信心了。</p><blockquote><p>原文來源：<a href="https://9to5mac.com/2026/04/09/anthropic-scales-up-with-enterprise-features-for-claude-cowork-and-managed-agents/">Anthropic scales up with enterprise features for Claude Cowork and Managed Agents</a></p></blockquote><hr><p>Anthropic 這週的策略很清楚：往上走企業代管服務（Managed Agents），往下補開發者工具鏈（ant CLI），中間把 Cowork 推到 GA。OpenAI 用 $100 Pro 方案追上定價缺口，GitHub Copilot 加入全自主模式。AI 工具的競爭焦點已經從「誰的模型比較聰明」轉移到「誰的基礎設施比較完整」。資安那邊，AI 框架被打穿的故事每週都在上演——沙箱不是加了就好，得加對。</p>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/10/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260410/</id>
    <link href="https://mark22013333.github.io/2026/04/10/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260410/"/>
    <published>2026-04-10T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>Anthropic 把 AI agent 的基礎設施直接打包成代管服務、OpenAI 推出 $100 中間價位搶 Claude 的客群、GitHub Copilot 在 VS Code 加入全自主 Autopilot 模式、又一個 AI 框架被打穿 CVSS 9.9，然後 Cowork 終於從 research preview 畢業了。</p>
<h2 id="Claude-Managed-Agents：Anthropic-幫你跑-AI-Agent-的代管服務"><a href="#Claude-Managed-Agents：Anthropic-幫你跑-AI-Agent-的代管服務" c]]>
    </summary>
    <title>AI 與科技新聞摘要 - 2026/04/10</title>
    <updated>2026-04-10T11:08:04.081Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="Claude Code" scheme="https://mark22013333.github.io/categories/Claude-Code/"/>
    <category term="LLM" scheme="https://mark22013333.github.io/tags/LLM/"/>
    <category term="MCP" scheme="https://mark22013333.github.io/tags/MCP/"/>
    <category term="Microsoft" scheme="https://mark22013333.github.io/tags/Microsoft/"/>
    <category term="MarkItDown" scheme="https://mark22013333.github.io/tags/MarkItDown/"/>
    <category term="Markdown" scheme="https://mark22013333.github.io/tags/Markdown/"/>
    <category term="RAG" scheme="https://mark22013333.github.io/tags/RAG/"/>
    <content>
      <![CDATA[<p>PDF 丟進 LLM 前要先做什麼？轉文字。Word 呢？也是轉文字。PowerPoint？一樣。問題來了：轉成純文字會丟掉所有結構——標題層級沒了、表格扁平化了、清單變成一坨散文。LLM 拿到這種東西，理解力直接打折。</p><p>微軟的 <strong>MarkItDown</strong> 就是為了解決這個前處理痛點而生的。一行指令，把幾乎任何格式的檔案轉成 Markdown，保留標題、表格、清單的結構。97K+ stars，MIT 授權，三行 code 就能用。</p><h2 id="為什麼是-Markdown-而不是純文字"><a href="#為什麼是-Markdown-而不是純文字" class="headerlink" title="為什麼是 Markdown 而不是純文字"></a>為什麼是 Markdown 而不是純文字</h2><p>主流 LLM 的訓練資料裡大量包含 Markdown。對模型來說，收到一份有 <code>##</code> 標題和 <code>|</code> 表格的 Markdown，比收到一坨沒結構的純文字好懂太多，token 數也不會明顯增加。</p><p>MarkItDown 的定位很明確：不做高保真的文件格式互轉（那是 Pandoc 的事），專門為 LLM 管線設計的前處理工具。犧牲排版的視覺還原度，換取語意結構的完整保留。</p><h2 id="支援哪些格式"><a href="#支援哪些格式" class="headerlink" title="支援哪些格式"></a>支援哪些格式</h2><p>覆蓋面有夠廣：</p><ul><li><strong>文件類</strong>：PDF、Word（.docx）、PowerPoint（.pptx）、Excel（.xlsx &#x2F; .xls）</li><li><strong>網頁與資料</strong>：HTML、CSV、JSON、EPub</li><li><strong>多媒體</strong>：圖片（JPEG &#x2F; PNG，搭配 LLM 做圖片描述）、音訊（WAV &#x2F; MP3，語音轉文字）、YouTube（自動抓字幕）</li><li><strong>其他</strong>：ZIP（遞迴處理內部所有檔案）、Outlook MSG、Jupyter Notebook、Wikipedia URL</li></ul><p>另外還能接 Azure Document Intelligence 處理 OCR 和公式提取，共 9 種格式。</p><h2 id="三種使用方式"><a href="#三種使用方式" class="headerlink" title="三種使用方式"></a>三種使用方式</h2><h3 id="CLI：最直接"><a href="#CLI：最直接" class="headerlink" title="CLI：最直接"></a>CLI：最直接</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 一行搞定</span></span><br><span class="line">markitdown report.pdf &gt; report.md</span><br><span class="line"></span><br><span class="line"><span class="comment"># 指定輸出</span></span><br><span class="line">markitdown presentation.pptx -o slides.md</span><br><span class="line"></span><br><span class="line"><span class="comment"># 管道輸入也行</span></span><br><span class="line"><span class="built_in">cat</span> document.docx | markitdown</span><br></pre></td></tr></table></figure><h3 id="Python-API：三行就能用"><a href="#Python-API：三行就能用" class="headerlink" title="Python API：三行就能用"></a>Python API：三行就能用</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">from</span> markitdown <span class="keyword">import</span> MarkItDown</span><br><span class="line"></span><br><span class="line">md = MarkItDown()</span><br><span class="line">result = md.convert(<span class="string">&quot;report.pdf&quot;</span>)</span><br><span class="line"><span class="built_in">print</span>(result.text_content)</span><br></pre></td></tr></table></figure><p>沒有什麼設定要調，沒有什麼 config 要寫。裝完就是能用。</p><h3 id="MCP-Server：讓-Claude-直接讀各種檔案"><a href="#MCP-Server：讓-Claude-直接讀各種檔案" class="headerlink" title="MCP Server：讓 Claude 直接讀各種檔案"></a>MCP Server：讓 Claude 直接讀各種檔案</h3><p>這是跟 Claude Code &#x2F; Claude Desktop 搭配最方便的用法。裝完 MCP server 套件後，跟 Claude 說「幫我分析這份 PDF」，它會自動透過 MCP 把 PDF 轉成 Markdown 再處理。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip install markitdown-mcp</span><br></pre></td></tr></table></figure><p>提供一個 <code>convert_to_markdown(uri)</code> 工具，支援 STDIO、Streamable HTTP、SSE 三種模式。</p><h2 id="LLM-圖片描述整合"><a href="#LLM-圖片描述整合" class="headerlink" title="LLM 圖片描述整合"></a>LLM 圖片描述整合</h2><p>處理 PowerPoint 投影片時，裡面的截圖和圖表怎麼辦？MarkItDown 可以接一個 OpenAI 相容的 client，自動用 LLM 生成圖片描述：</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">from</span> markitdown <span class="keyword">import</span> MarkItDown</span><br><span class="line"><span class="keyword">from</span> openai <span class="keyword">import</span> OpenAI</span><br><span class="line"></span><br><span class="line">client = OpenAI()</span><br><span class="line">md = MarkItDown(</span><br><span class="line">    llm_client=client,</span><br><span class="line">    llm_model=<span class="string">&quot;gpt-4o&quot;</span>,</span><br><span class="line">    llm_prompt=<span class="string">&quot;用繁體中文描述這張圖片的內容&quot;</span></span><br><span class="line">)</span><br><span class="line"></span><br><span class="line"><span class="comment"># PPTX 裡的圖片也會被描述</span></span><br><span class="line">result = md.convert(<span class="string">&quot;quarterly-review.pptx&quot;</span>)</span><br></pre></td></tr></table></figure><p>不限定 OpenAI，任何符合 chat completion API 介面的 client 都能用——Ollama、vLLM、Azure OpenAI 都行。</p><h2 id="Plugin-機制"><a href="#Plugin-機制" class="headerlink" title="Plugin 機制"></a>Plugin 機制</h2><p>用 Python 標準的 <code>entry_points</code> 做 plugin 發現。想支援新格式？寫一個 converter 註冊就好。</p><p>官方已有的 plugin：</p><ul><li><strong>markitdown-ocr</strong> — 用 LLM Vision 做 OCR，能提取 PDF 和 PPTX 裡內嵌圖片的文字</li><li><strong>markitdown-sample-plugin</strong> — 開發範本</li></ul><p>Plugin 預設停用，需要明確啟用：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">markitdown --use-plugins document.pdf</span><br></pre></td></tr></table></figure><h2 id="架構設計"><a href="#架構設計" class="headerlink" title="架構設計"></a>架構設計</h2><p>整個轉換流程很直觀：輸入檔案 → StreamInfo 猜測格式（副檔名 + MIME + Magika AI）→ 按優先級遍歷 Converter → accepts() 回 true 就執行 convert() → 輸出 Markdown。</p><p>每個 converter 只要實作 <code>accepts()</code> 和 <code>convert()</code> 兩個方法。Plugin 可以用較低的優先級數字搶先內建 converter，比如 markitdown-ocr 就是這樣取代內建的 PDF converter。</p><h2 id="跟其他工具比一下"><a href="#跟其他工具比一下" class="headerlink" title="跟其他工具比一下"></a>跟其他工具比一下</h2><table><thead><tr><th>特性</th><th>MarkItDown</th><th>Pandoc</th><th>Docling</th></tr></thead><tbody><tr><td>定位</td><td>LLM 前處理</td><td>通用格式互轉</td><td>文件理解平台</td></tr><tr><td>輸出</td><td>僅 Markdown</td><td>數十種格式</td><td>Markdown &#x2F; JSON</td></tr><tr><td>LLM 整合</td><td>原生支援</td><td>無</td><td>有</td></tr><tr><td>MCP Server</td><td>有（官方套件）</td><td>無</td><td>無</td></tr><tr><td>重點</td><td>結構保留 + token 效率</td><td>高保真格式互轉</td><td>深度文件理解</td></tr></tbody></table><p>要高保真格式互轉選 Pandoc，要深度文件理解選 Docling，要快速把檔案餵給 LLM——MarkItDown 就對了。</p><h2 id="實際使用情境"><a href="#實際使用情境" class="headerlink" title="實際使用情境"></a>實際使用情境</h2><p><strong>RAG 前處理</strong>是最常見的場景。把各種格式的知識庫文件統一轉成 Markdown，再做 chunking 和 embedding。ZIP converter 可以遞迴處理整個壓縮檔，裡面混合 PDF、DOCX、PPTX 都沒問題。</p><p><strong>投影片內容提取</strong>也很實用。PPTX 轉 Markdown 時會保留投影片編號、標題、表格和圖表數據。搭配 LLM 圖片描述，連投影片裡的截圖都能「讀懂」。</p><p><strong>MCP 整合的 AI 助手</strong>——透過 markitdown-mcp，讓 Claude Desktop 或 Claude Code 直接讀取任何格式的檔案，你只要說「幫我分析這份報告」就行。</p><h2 id="安裝"><a href="#安裝" class="headerlink" title="安裝"></a>安裝</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 一次裝全部格式支援</span></span><br><span class="line">pip install <span class="string">&#x27;markitdown[all]&#x27;</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 或者只裝你需要的</span></span><br><span class="line">pip install <span class="string">&#x27;markitdown[pdf,docx,pptx,xlsx]&#x27;</span></span><br></pre></td></tr></table></figure><p>需要 Python &gt;&#x3D; 3.10。音訊轉寫另外裝 <code>ffmpeg</code>，EXIF 提取裝 <code>exiftool</code>。</p><h2 id="限制"><a href="#限制" class="headerlink" title="限制"></a>限制</h2><p>幾個要注意的地方。PDF 複雜排版（多欄、浮動圖片）可能丟失結構，最壞情況只能提取純文字。不支援舊版 .doc 格式，只吃 .docx。圖片僅 JPEG&#x2F;PNG，WebP 和 SVG 不行。數學公式支援不完整。目前沒有 async API，大量檔案處理得自己管併發。</p><p>不過對大多數「把文件餵給 LLM」的場景來說，這些限制幾乎碰不到。三行 code 就能解決 80% 的文件前處理需求，這個投入產出比很划算。</p><blockquote><p>原文來源：<a href="https://github.com/microsoft/markitdown">MarkItDown GitHub Repo</a><br>參考來源：<a href="https://pypi.org/project/markitdown-mcp/">MarkItDown MCP Server (PyPI)</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/10/MarkItDown-%E5%BE%AE%E8%BB%9F%E5%87%BA%E5%93%81%E7%9A%84%E4%BB%BB%E4%BD%95%E6%AA%94%E6%A1%88%E8%BD%89-Markdown-%E5%B7%A5%E5%85%B7/</id>
    <link href="https://mark22013333.github.io/2026/04/10/MarkItDown-%E5%BE%AE%E8%BB%9F%E5%87%BA%E5%93%81%E7%9A%84%E4%BB%BB%E4%BD%95%E6%AA%94%E6%A1%88%E8%BD%89-Markdown-%E5%B7%A5%E5%85%B7/"/>
    <published>2026-04-10T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>PDF 丟進 LLM 前要先做什麼？轉文字。Word 呢？也是轉文字。PowerPoint？一樣。問題來了：轉成純文字會丟掉所有結構——標題層級沒了、表格扁平化了、清單變成一坨散文。LLM 拿到這種東西，理解力直接打折。</p>
<p>微軟的 <strong>MarkItDown</strong> 就是為了解決這個前處理痛點而生的。一行指令，把幾乎任何格式的檔案轉成 Markdown，保留標題、表格、清單的結構。97K+ stars，MIT 授權，三行 code 就能用。</p>
<h2 id="為什麼是-Markdown-而不是純文字"><a href="#為什麼是-Markdown-]]>
    </summary>
    <title>MarkItDown - 微軟出品的「任何檔案轉 Markdown」工具</title>
    <updated>2026-04-10T11:06:49.547Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="AI與科技新聞" scheme="https://mark22013333.github.io/categories/AI%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E/"/>
    <category term="Claude Code" scheme="https://mark22013333.github.io/tags/Claude-Code/"/>
    <category term="AI 新聞" scheme="https://mark22013333.github.io/tags/AI-%E6%96%B0%E8%81%9E/"/>
    <category term="創投" scheme="https://mark22013333.github.io/tags/%E5%89%B5%E6%8A%95/"/>
    <category term="Stripe" scheme="https://mark22013333.github.io/tags/Stripe/"/>
    <category term="Gemini" scheme="https://mark22013333.github.io/tags/Gemini/"/>
    <category term="Eclipse" scheme="https://mark22013333.github.io/tags/Eclipse/"/>
    <content>
      <![CDATA[<p>Stripe 的 AI agent 一週吐出 1,300 個 PR、Anthropic 推出免費的 Claude Code Analytics API 讓企業追蹤 AI 開發者生產力、Google Gemini 正式拿到 MCP 和 Computer Use、Eclipse Ventures 砸 13 億美金押注 AI 基礎設施，然後中國的 Spirit AI 在 30 天內連拿兩輪共 4.2 億美金。</p><h2 id="Stripe-Minions：一週-1-300-個-PR-的自主-Coding-Agent"><a href="#Stripe-Minions：一週-1-300-個-PR-的自主-Coding-Agent" class="headerlink" title="Stripe Minions：一週 1,300 個 PR 的自主 Coding Agent"></a>Stripe Minions：一週 1,300 個 PR 的自主 Coding Agent</h2><p>Stripe 的工程團隊把內部的 AI coding agent 系統 <strong>Minions</strong> 正式搬上檯面。數字很嚇人：每週自動產出超過 1,300 個 pull request，所有程式碼都經過人類 review。</p><p>跟 Copilot 或 Cursor 不同，Minions 不是互動式的程式碼補全工具。它走的是 one-shot 模式——從 Slack thread、bug report 或 feature request 接收任務描述，自己從頭把程式碼、測試、文件全部生出來。背後用的是 <strong>Blueprint</strong> 架構：部分步驟是確定性的（跑 linter、推 code），部分步驟讓 AI 自由發揮。</p><p>實際表現呢？配置調整、依賴升級、小規模重構這類定義明確的任務，Minions 做得不錯。碰到測試失敗，agent 最多嘗試修兩次，修不好就交還人類——這個設計比讓 AI 無限 retry 要聰明得多。</p><p>1,300 PR&#x2F;week 聽起來很猛，但 Stripe 的 codebase 規模也是巨獸等級。真正值得觀察的不是數字本身，而是 Blueprint 這個「確定性 + 彈性」的混合架構——這可能是企業級 AI coding agent 的設計範本。</p><blockquote><p>原文來源：<a href="https://www.infoq.com/news/2026/03/stripe-autonomous-coding-agents/">How Stripe built Minions - AI coding agents that ship 1,300 PRs weekly</a></p></blockquote><h2 id="Claude-Code-Analytics-API：免費追蹤團隊-AI-生產力"><a href="#Claude-Code-Analytics-API：免費追蹤團隊-AI-生產力" class="headerlink" title="Claude Code Analytics API：免費追蹤團隊 AI 生產力"></a>Claude Code Analytics API：免費追蹤團隊 AI 生產力</h2><p>Anthropic 發布了 <strong>Claude Code Analytics API</strong>，讓企業組織可以程式化存取 Claude Code 的每日使用數據。endpoint 是 <code>/v1/organizations/usage_report/claude_code</code>，需要 Admin API key（以 <code>sk-ant-admin</code> 開頭）。</p><p>能追蹤的指標包括：開發者 session 數、透過 Claude Code 新增&#x2F;刪除的程式碼行數、commit 數、PR 數、各工具（Edit、Write、NotebookEdit）的接受率和拒絕率，還有成本分析。數據延遲約 1 小時，每筆記錄代表一個使用者一天的活動。</p><p>重點：<strong>完全免費</strong>，所有有 Admin API 存取權的組織都能用。</p><p>這個 API 解決的痛點很具體。導入 AI 工具後，管理層最常問的問題就是「到底有沒有提升生產力」。之前只能靠問卷和感覺，現在有量化數據了。當然，「AI 新增的程式碼行數」跟「實際生產力提升」之間的關係還是得打折扣看，但至少有了起點。</p><blockquote><p>原文來源：<a href="https://platform.claude.com/docs/en/build-with-claude/claude-code-analytics-api">Claude Code Analytics API</a></p></blockquote><h2 id="Gemini-API-正式支援-MCP-和-Computer-Use"><a href="#Gemini-API-正式支援-MCP-和-Computer-Use" class="headerlink" title="Gemini API 正式支援 MCP 和 Computer Use"></a>Gemini API 正式支援 MCP 和 Computer Use</h2><p>Google 在三月底到四月初把兩個大功能塞進了 Gemini API 和 SDK：<strong>MCP 工具支援</strong>和 <strong>Computer Use</strong>（Project Mariner）。</p><p>MCP 支援意味著 Gemini 現在可以跟 Anthropic、OpenAI 共用同一套工具生態——裝一個 MCP server，三家模型都能用。function calling 的可靠度也拉到了 90%（從 84% 上來），觸發外部工具時更穩定。</p><p>Computer Use 目前在 Gemini 3 Pro 和 3 Flash 上可用，讓 Gemini 能自主點擊、填表單、導航 UI。這跟 Anthropic 的 Computer Use 是同一個方向——AI 不只能寫程式，還能操作圖形介面。</p><p>另外一個容易被忽略的更新：Gemini 2.5 Pro、2.5 Flash-Lite、2.5 Flash 的退休日期推遲到 <strong>2026 年 10 月 16 日</strong>。如果你的 production 還在用這些模型，時間多了一些但也不算多。</p><p>MCP 的跨平台故事越來越完整了。現在 Anthropic、Google、OpenAI 三家都支援，97M+ 月下載量不是白來的。</p><blockquote><p>原文來源：<a href="https://ai.google.dev/gemini-api/docs/changelog">Gemini API Release Notes</a></p></blockquote><h2 id="Eclipse-Ventures-募資-13-億美金：押注-AI-基礎設施和機器人"><a href="#Eclipse-Ventures-募資-13-億美金：押注-AI-基礎設施和機器人" class="headerlink" title="Eclipse Ventures 募資 13 億美金：押注 AI 基礎設施和機器人"></a>Eclipse Ventures 募資 13 億美金：押注 AI 基礎設施和機器人</h2><p>Cerebras 的早期投資者 Eclipse Ventures 完成了 <strong>13 億美金</strong>的新基金募資，投資方向鎖定 AI 基礎設施、機器人和國防科技。</p><p>Eclipse 的投資邏輯很清楚：不投 AI 應用層，投 AI 跑起來需要的硬體和基礎設施。Cerebras（AI 晶片）、Hermeus（超音速無人機，剛拿到 3.5 億）、以及其他做製造和國防的新創都在他們的 portfolio 裡。</p><p>13 億的規模在 2026 年的創投市場不算最大——Q1 全球創投總額 3,000 億美金，AI 佔了 80%——但 Eclipse 的定位很特殊。大多數 AI 基金在搶應用層的 deal，Eclipse 往下挖一層去投基礎設施，賭的是「不管誰贏了 AI 應用的仗，底下的基礎設施都會賺」。</p><blockquote><p>原文來源：<a href="https://www.bloomberg.com/news/articles/2026-04-07/cerebras-backer-eclipse-raises-1-3-billion-for-robotics-ai-infrastructure">Eclipse Raises $1.3 Billion for Robotics, AI Infrastructure</a></p></blockquote><h2 id="Spirit-AI-30-天內拿到-4-2-億美金：雷軍和馬雲的基金都進場了"><a href="#Spirit-AI-30-天內拿到-4-2-億美金：雷軍和馬雲的基金都進場了" class="headerlink" title="Spirit AI 30 天內拿到 4.2 億美金：雷軍和馬雲的基金都進場了"></a>Spirit AI 30 天內拿到 4.2 億美金：雷軍和馬雲的基金都進場了</h2><p>中國 AI 新創 <strong>Spirit AI</strong> 在不到 30 天內完成了兩輪融資，累計 4.2 億美金。最新一輪 1.45 億美金由順為資本和雲鋒基金聯合領投——也就是雷軍和馬雲旗下的基金。</p><p>Spirit AI 的具體產品細節目前公開資訊不多，但從投資人陣容和融資速度來看，顯然有東西讓這些老手覺得值得押注。中國 AI 市場在 GLM-5.1（MIT 開源 754B）和 Qwen 3.6-Plus（1M context）之後，已經不再只是「追趕者」的角色了。</p><p>30 天內拿 4.2 億，融資速度本身就是新聞。</p><blockquote><p>原文來源：<a href="https://theaiinsider.tech/2026/04/07/report-spirit-ai-raises-420m-usd-in-funding-backed-by-lei-jun-and-jack-ma-funds/">Spirit AI Raises $420M USD in Funding</a></p></blockquote><h2 id="Anthropic-四月底終止舊模型-1M-Context-測試版"><a href="#Anthropic-四月底終止舊模型-1M-Context-測試版" class="headerlink" title="Anthropic 四月底終止舊模型 1M Context 測試版"></a>Anthropic 四月底終止舊模型 1M Context 測試版</h2><p>一個容易被漏掉的公告：Anthropic 將在 <strong>4 月 30 日</strong>終止 Claude Sonnet 4.5 和 Claude Sonnet 4 的 1M token context window beta。屆時 <code>context-1m-2025-08-07</code> beta header 會失效，超過標準 200K token 的 request 會直接報錯。</p><p>要繼續用 1M context，得遷移到 Claude Sonnet 4.6 或 Claude Opus 4.6——這兩個模型標準就支援 1M，不需要 beta header。</p><p>如果你的 production 還在用舊模型 + beta header 跑長 context，4&#x2F;30 之前得搞定遷移。三週的時間不算寬裕。</p><blockquote><p>原文來源：<a href="https://platform.claude.com/docs/en/release-notes/overview">Anthropic Release Notes</a></p></blockquote><hr><p>AI coding agent 從「輔助工具」進化成「自主產出」——Stripe 的 Minions 用 Blueprint 架構讓 1,300 個 PR 帶著品質保證出廠。Anthropic 和 Google 則在基礎設施層面繼續鋪路：Analytics API 給企業量化 ROI，MCP 跨平台支援讓工具生態不再碎片化。錢的部分更直接——Eclipse 13 億美金投 AI 基礎設施，Spirit AI 30 天拿 4.2 億。方向很清楚，速度很快。</p>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/09/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260409/</id>
    <link href="https://mark22013333.github.io/2026/04/09/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260409/"/>
    <published>2026-04-09T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>Stripe 的 AI agent 一週吐出 1,300 個 PR、Anthropic 推出免費的 Claude Code Analytics API 讓企業追蹤 AI 開發者生產力、Google Gemini 正式拿到 MCP 和 Computer Use、Eclipse Ventures 砸 13 億美金押注 AI 基礎設施，然後中國的 Spirit AI 在 30 天內連拿兩輪共 4.2 億美金。</p>
<h2 id="Stripe-Minions：一週-1-300-個-PR-的自主-Coding-Agent"><a href="#Stripe-Minions：一週-1-300-]]>
    </summary>
    <title>AI 與科技新聞摘要 - 2026/04/09</title>
    <updated>2026-04-09T11:08:28.333Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="Claude Code" scheme="https://mark22013333.github.io/categories/Claude-Code/"/>
    <category term="Claude Code" scheme="https://mark22013333.github.io/tags/Claude-Code/"/>
    <category term="教學" scheme="https://mark22013333.github.io/tags/%E6%95%99%E5%AD%B8/"/>
    <category term="平行開發" scheme="https://mark22013333.github.io/tags/%E5%B9%B3%E8%A1%8C%E9%96%8B%E7%99%BC/"/>
    <category term="Git Worktrees" scheme="https://mark22013333.github.io/tags/Git-Worktrees/"/>
    <category term="AI 工具" scheme="https://mark22013333.github.io/tags/AI-%E5%B7%A5%E5%85%B7/"/>
    <content>
      <![CDATA[<p>一個 Claude Code session 修 auth bug，另一個在寫新的 API endpoint，第三個在跑測試然後修 failing cases。三件事同時進行，互不干擾。</p><p>這不是什麼未來願景，是 Claude Code 的 <code>--worktree</code> flag 已經能做到的事。Boris Cherny（Claude Code 的創造者）自己的工作流是同時跑 10-15 個 session，每個 session 各自推進不同任務。聽起來很瘋狂？其實設定比你想的簡單得多。</p><h2 id="為什麼需要-Worktrees"><a href="#為什麼需要-Worktrees" class="headerlink" title="為什麼需要 Worktrees"></a>為什麼需要 Worktrees</h2><p>先講問題。你在一個 repo 裡開了 Claude Code session A 修 bug，修到一半想讓另一個 session B 同時去加新功能。結果 B 改了你正在 debug 的檔案，A 的 git status 瞬間爆炸——unstaged changes、merge conflicts、整個 context 亂掉。</p><p>Git worktree 解決這個問題。一個 worktree 就是同一個 repo 的一個獨立工作目錄，有自己的 branch、自己的檔案，但共享同一份 git history 和 remote。你可以把它想成「同一個 repo 的平行宇宙」——每個宇宙裡的 Claude 各做各的，完事後 merge 回來就好。</p><h2 id="一行指令開始"><a href="#一行指令開始" class="headerlink" title="一行指令開始"></a>一行指令開始</h2><p>Claude Code 內建了 worktree 支援，不需要自己手動 <code>git worktree add</code>：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 建立名為 feature-auth 的 worktree 並啟動 Claude</span></span><br><span class="line">claude --worktree feature-auth</span><br><span class="line"></span><br><span class="line"><span class="comment"># 建立另一個 worktree 修 bug</span></span><br><span class="line">claude --worktree bugfix-123</span><br><span class="line"></span><br><span class="line"><span class="comment"># 懶得取名？Claude 自動產生一個</span></span><br><span class="line">claude --worktree</span><br></pre></td></tr></table></figure><p>也可以用縮寫 <code>-w</code>：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">claude -w feature-auth</span><br></pre></td></tr></table></figure><p>Worktree 會建在 <code>&lt;repo&gt;/.claude/worktrees/&lt;name&gt;/</code>，branch 名稱是 <code>worktree-&lt;name&gt;</code>，base 分支預設是 <code>origin/HEAD</code> 指向的 branch。</p><h2 id="實戰：三個-Terminal-同時跑"><a href="#實戰：三個-Terminal-同時跑" class="headerlink" title="實戰：三個 Terminal 同時跑"></a>實戰：三個 Terminal 同時跑</h2><p>打開三個終端機視窗（iTerm2 的 split pane 或 tmux 都行）：</p><p><strong>Terminal 1 — 修 bug</strong></p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">claude -w fix-auth-race-condition</span><br><span class="line"><span class="comment"># 進去之後：</span></span><br><span class="line"><span class="comment"># &quot;auth.ts 的 race condition 導致偶發 401，幫我找到根因並修復，要附測試&quot;</span></span><br></pre></td></tr></table></figure><p><strong>Terminal 2 — 新功能</strong></p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">claude -w feature-user-preferences</span><br><span class="line"><span class="comment"># 進去之後：</span></span><br><span class="line"><span class="comment"># &quot;在 user service 加上 preferences CRUD，參考現有的 profile 模組風格&quot;</span></span><br></pre></td></tr></table></figure><p><strong>Terminal 3 — 重構</strong></p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">claude -w refactor-db-queries</span><br><span class="line"><span class="comment"># 進去之後：</span></span><br><span class="line"><span class="comment"># &quot;把 raw SQL queries 改成 ORM，從 user.ts 開始，每改一個檔案跑一次測試&quot;</span></span><br></pre></td></tr></table></figure><p>三個 Claude 各在各的 worktree 裡工作，不會互相踩到。</p><h2 id="worktreeinclude：自動複製-env"><a href="#worktreeinclude：自動複製-env" class="headerlink" title=".worktreeinclude：自動複製 .env"></a>.worktreeinclude：自動複製 .env</h2><p>新 worktree 是乾淨的 checkout，不會包含 <code>.env</code>、<code>config/secrets.json</code> 這些 gitignored 的檔案。第一次忘記這件事的時候你的 app 會直接 crash。</p><p>在 repo 根目錄建一個 <code>.worktreeinclude</code> 檔案：</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">.env</span><br><span class="line">.env.local</span><br><span class="line">config/secrets.json</span><br></pre></td></tr></table></figure><p>Claude 建 worktree 時會自動把這些檔案複製過去。只有同時符合「match pattern」且「被 gitignore」的檔案才會被複製，tracked 的檔案不會重複。</p><h2 id="Subagent-也能用-Worktrees"><a href="#Subagent-也能用-Worktrees" class="headerlink" title="Subagent 也能用 Worktrees"></a>Subagent 也能用 Worktrees</h2><p>不只是你手動開多個 terminal。Claude 的 subagent 也支援 worktree 隔離——在 <code>.claude/agents/</code> 的 agent 定義裡加一行 <code>isolation: worktree</code>，subagent 就會自己建 worktree 來工作：</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># .claude/agents/test-runner.md</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">description:</span> <span class="string">&quot;Run tests in isolation&quot;</span></span><br><span class="line"><span class="attr">isolation:</span> <span class="string">worktree</span></span><br><span class="line"><span class="attr">tools:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">Bash</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">Read</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="string">Run</span> <span class="string">all</span> <span class="string">tests</span> <span class="string">and</span> <span class="string">fix</span> <span class="string">any</span> <span class="string">failures.</span> <span class="string">Do</span> <span class="string">not</span> <span class="string">modify</span> <span class="string">source</span> <span class="string">files</span> </span><br><span class="line"><span class="string">outside</span> <span class="string">the</span> <span class="string">test</span> <span class="string">directory.</span></span><br></pre></td></tr></table></figure><p>或是在對話中直接說「use worktrees for your agents」，Claude 會自動替 subagent 分配獨立的 worktree。</p><p>Subagent 做完沒改東西？worktree 自動清掉。有改動？保留等你 review。</p><h2 id="跟-Cursor-和-Copilot-比"><a href="#跟-Cursor-和-Copilot-比" class="headerlink" title="跟 Cursor 和 Copilot 比"></a>跟 Cursor 和 Copilot 比</h2><p>Cursor 3 剛發布的 agent-first 架構也支援跑多個 agent，但它是在 IDE 內切換，不是真正的獨立工作目錄。如果兩個 Cursor agent 同時改同一個 repo 的不同檔案，還是有衝突風險。</p><p>GitHub Copilot 的多 agent 功能還在早期，主要靠 cloud-based workspace。你的 code 要傳到 GitHub 的 server 上跑。</p><p>Claude Code 的 worktree 方案是<strong>本地 + 獨立目錄</strong>，用 Git 原生機制做隔離。不依賴雲端、不需要特殊 IDE 支援、資料不離開你的機器。缺點是吃硬碟空間——每個 worktree 都是一份完整的 checkout（但共享 <code>.git</code> objects，所以不是完整 clone 那麼大）。</p><h2 id="清理與管理"><a href="#清理與管理" class="headerlink" title="清理與管理"></a>清理與管理</h2><p>退出 worktree session 時，Claude 會自動處理：</p><ul><li><strong>沒有任何修改</strong> → worktree 和 branch 自動刪除</li><li><strong>有修改或 commit</strong> → Claude 問你要保留還是移除</li></ul><p>如果你想手動管理：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 列出所有 worktree</span></span><br><span class="line">git worktree list</span><br><span class="line"></span><br><span class="line"><span class="comment"># 手動移除</span></span><br><span class="line">git worktree remove .claude/worktrees/feature-auth</span><br><span class="line"></span><br><span class="line"><span class="comment"># 清理過期的 worktree 參照</span></span><br><span class="line">git worktree prune</span><br></pre></td></tr></table></figure><p>記得在 <code>.gitignore</code> 加上 <code>.claude/worktrees/</code>，不然 main repo 的 <code>git status</code> 會顯示一堆 untracked files。</p><h2 id="Base-Branch-不對怎麼辦"><a href="#Base-Branch-不對怎麼辦" class="headerlink" title="Base Branch 不對怎麼辦"></a>Base Branch 不對怎麼辦</h2><p>Worktree 預設從 <code>origin/HEAD</code> branch 出去。如果你的 <code>origin/HEAD</code> 指向的不是你想要的 branch（例如 clone 很久了，remote 的 default branch 已經改了），手動同步一下：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 重新同步 origin/HEAD</span></span><br><span class="line">git remote set-head origin -a</span><br><span class="line"></span><br><span class="line"><span class="comment"># 或者指定特定 branch</span></span><br><span class="line">git remote set-head origin develop</span><br></pre></td></tr></table></figure><p>如果你需要每次都從不同 branch 分支，可以設定 <code>WorktreeCreate</code> Hook 來自定義 worktree 建立邏輯。</p><h2 id="給-3-5-個-Worktrees-同時跑的建議"><a href="#給-3-5-個-Worktrees-同時跑的建議" class="headerlink" title="給 3-5 個 Worktrees 同時跑的建議"></a>給 3-5 個 Worktrees 同時跑的建議</h2><p>Boris Cherny 的建議是 3-5 個 worktree 為一個 sweet spot。超過這個數量，context switching 的認知負擔（就算是看 Claude 的輸出也需要腦力）會開始抵消平行化的好處。</p><p>幾個實用建議：</p><p><strong>任務要清晰獨立</strong>。如果兩個 worktree 的任務會改到同一組核心檔案，merge 的時候會很痛苦。開始之前先想清楚任務邊界。</p><p><strong>用 session name 管理</strong>。每個 worktree session 取個好名字：<code>claude -w fix-auth -n &quot;修 auth race condition&quot;</code>，之後用 <code>claude --resume &quot;修 auth race condition&quot;</code> 就能快速回到上下文。</p><p><strong>每個 worktree 跑完記得 push</strong>。因為 worktree 是本地的，如果你的硬碟出問題，沒 push 的 commit 就沒了。</p><p><strong>定期清理</strong>。worktree 多了之後 <code>git worktree list</code> 看一下，完成的就 remove，不然佔硬碟空間。</p><p>平行跑 AI agent 聽起來很潮，但本質上就是多開幾個獨立工作目錄，用 Git 的原生機制做隔離。沒有什麼黑魔法，只是 Claude Code 把這個流程包裝成一個 <code>--worktree</code> flag 讓你一行指令搞定。試過一次就回不去了。</p><blockquote><p>原文來源：<a href="https://code.claude.com/docs/en/common-workflows">Claude Code Common Workflows - Git Worktrees</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/09/Claude-Code-Git-Worktrees-%E5%AE%8C%E6%95%B4%E6%95%99%E5%AD%B8-%E8%AE%93-AI-%E5%90%8C%E6%99%82%E5%B9%AB%E4%BD%A0%E5%81%9A%E4%BA%94%E4%BB%B6%E4%BA%8B/</id>
    <link href="https://mark22013333.github.io/2026/04/09/Claude-Code-Git-Worktrees-%E5%AE%8C%E6%95%B4%E6%95%99%E5%AD%B8-%E8%AE%93-AI-%E5%90%8C%E6%99%82%E5%B9%AB%E4%BD%A0%E5%81%9A%E4%BA%94%E4%BB%B6%E4%BA%8B/"/>
    <published>2026-04-09T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>一個 Claude Code session 修 auth bug，另一個在寫新的 API endpoint，第三個在跑測試然後修 failing cases。三件事同時進行，互不干擾。</p>
<p>這不是什麼未來願景，是 Claude Code 的 <code>--worktree</code> flag 已經能做到的事。Boris Cherny（Claude Code 的創造者）自己的工作流是同時跑 10-15 個 session，每個 session 各自推進不同任務。聽起來很瘋狂？其實設定比你想的簡單得多。</p>
<h2 id="為什麼需要-Worktrees"><a hre]]>
    </summary>
    <title>Claude Code Git Worktrees 完整教學 - 讓 AI 同時幫你做五件事</title>
    <updated>2026-04-09T11:09:42.217Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="Claude Code" scheme="https://mark22013333.github.io/categories/Claude-Code/"/>
    <category term="AI" scheme="https://mark22013333.github.io/tags/AI/"/>
    <category term="MCP" scheme="https://mark22013333.github.io/tags/MCP/"/>
    <category term="Claude Code" scheme="https://mark22013333.github.io/tags/Claude-Code/"/>
    <category term="認知架構" scheme="https://mark22013333.github.io/tags/%E8%AA%8D%E7%9F%A5%E6%9E%B6%E6%A7%8B/"/>
    <category term="記憶系統" scheme="https://mark22013333.github.io/tags/%E8%A8%98%E6%86%B6%E7%B3%BB%E7%B5%B1/"/>
    <content>
      <![CDATA[<p>每次開新的 ChatGPT 對話，它都不記得你昨天講了什麼。用 Claude Code 開新 session，前一輪的 debug 心得全部歸零。LLM 的記憶，基本上跟金魚差不多。</p><p><strong>OpenSoul</strong> 試圖改變這件事。它在 LLM 之上疊了一層認知架構，靈感來自人腦的神經結構——海馬迴管情節記憶、新皮質管語意記憶、基底核管程序記憶，甚至還有多巴胺和血清素的虛擬版本來調控 AI 的「情緒」。聽起來很科幻？確實，但它的設計文件讀起來比大多數「AI 認知」專案都嚴謹得多。</p><h2 id="三層記憶圖譜"><a href="#三層記憶圖譜" class="headerlink" title="三層記憶圖譜"></a>三層記憶圖譜</h2><p>OpenSoul 把記憶存在 FalkorDB（基於 Redis 的圖資料庫）裡，分成三層：</p><p><strong>情節記憶</strong>（Episodic Memory）對應海馬迴，記錄具體的對話片段。「你上次說你喜歡喝咖啡」——就是這一層在運作。</p><p><strong>語意記憶</strong>（Semantic Memory）對應新皮質，儲存從對話中提煉出來的通用知識。「Python 是程式語言」這種事實性資訊住在這裡。</p><p><strong>程序記憶</strong>（Procedural Memory）對應基底核，記住「這個使用者常犯的錯」之類的行為模式。</p><p>每次對話時，系統用 <strong>EcphoryRAG</strong> 做聯想檢索：先用向量搜尋找到種子節點，再從種子出發用多跳 BFS 展開圖譜，模擬人腦的聯想過程。邊緣權重公式 <code>W = alpha * Recency + beta * Frequency + gamma * Salience</code> 用指數遺忘曲線控制衰減——常用的記憶不容易忘，久沒用的慢慢淡化。跟人腦的遺忘機制蠻像的。</p><h2 id="神經化學狀態機"><a href="#神經化學狀態機" class="headerlink" title="神經化學狀態機"></a>神經化學狀態機</h2><p>這部分是整個專案最讓人眉毛挑起來的設計。OpenSoul 模擬了虛擬的多巴胺和血清素系統，會動態影響 LLM 的行為：</p><p>多巴胺高（興奮狀態）→ temperature 上升、記憶搜尋範圍變廣、回覆風格更活潑<br>血清素低（低落狀態）→ 回覆變保守、搜尋範圍收窄</p><p>這不是噱頭。temperature 和搜尋廣度的動態調控，確實會讓 AI 在不同情境下產出風格不同的回覆。你跟它聊開心的事，它的回覆會變得更發散；你丟一個嚴肅的技術問題，它會收斂回來。</p><h2 id="Dream-Engine：AI-的睡眠"><a href="#Dream-Engine：AI-的睡眠" class="headerlink" title="Dream Engine：AI 的睡眠"></a>Dream Engine：AI 的睡眠</h2><p>人腦在睡覺時會回放白天的經歷、整合知識、修剪不重要的記憶。Dream Engine 做一樣的事：</p><ol><li><strong>LiDER 經驗重播</strong>：回放最近的對話片段</li><li><strong>知識蒸餾</strong>：從具體對話提取通用規則（情節記憶 → 語意記憶）</li><li><strong>圖譜修剪</strong>：清理低權重的過期記憶</li><li><strong>跨域橋接</strong>：發現不同領域記憶之間的關聯，模擬「頓悟」</li></ol><p>預設閒置 5 分鐘就觸發一次。注意，這會持續消耗 LLM API 額度——Dream Engine 本質上是用 LLM 去整理記憶，所以每次「做夢」都在燒錢。</p><h2 id="安裝與整合-Claude-Code"><a href="#安裝與整合-Claude-Code" class="headerlink" title="安裝與整合 Claude Code"></a>安裝與整合 Claude Code</h2><p>需要 Python 3.11+ 和 Docker（FalkorDB 需要）：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/samttoo22-MewCat/OpenSoul.git</span><br><span class="line"><span class="built_in">cd</span> OpenSoul</span><br><span class="line">poetry install</span><br><span class="line"><span class="built_in">cp</span> .env.example .<span class="built_in">env</span>  <span class="comment"># 填入 LLM API Key</span></span><br><span class="line">python scripts/setup_env.py</span><br></pre></td></tr></table></figure><p>CLI 模式直接聊：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">poetry run soul chat</span><br><span class="line">poetry run soul memory stats    <span class="comment"># 查看記憶狀態</span></span><br><span class="line">poetry run soul dream           <span class="comment"># 手動觸發夢境</span></span><br></pre></td></tr></table></figure><p>掛載到 Claude Code 當 MCP Server：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">python scripts/setup_mcp.py --cc-enable</span><br></pre></td></tr></table></figure><p>掛上去之後，Claude Code 多了 <code>soul_chat_tool</code> 和 <code>soul_memory_retrieve_tool</code>，等於讓 Claude 擁有跨 Session 的持久記憶。這對長期專案來說蠻有意義的——不用每次開新 session 都重新解釋專案背景。</p><h2 id="59-個內建技能"><a href="#59-個內建技能" class="headerlink" title="59 個內建技能"></a>59 個內建技能</h2><p>OpenSoul 附帶了 OpenClaw 技能框架，59 個技能覆蓋瀏覽器自動化、Gmail 收發、Telegram&#x2F;Discord 操作、程式碼執行、Notion&#x2F;Trello&#x2F;GitHub 管理、TTS 語音合成。Judge Agent（對應大腦的眶額葉皮質）負責判斷要不要呼叫工具、選哪一個，用輕量模型（Gemini Flash Lite）做決策來降低成本。</p><p>不過 59 個技能大部分只有 SKILL.md 描述檔，少數才有實際 Python 腳本。品質參差不齊，別期待每個都能直接用。</p><h2 id="踩坑提醒"><a href="#踩坑提醒" class="headerlink" title="踩坑提醒"></a>踩坑提醒</h2><p>幾個要注意的地方：</p><p><strong>FalkorDB 用 SSPL v1 授權</strong>，不是 OSI 認證的開源授權。個人用沒問題，但如果你想把它包成 SaaS 提供給別人，可能要公開整個服務棧的原始碼。</p><p><strong>核心檔案偏長</strong>——<code>agent.py</code> 953 行、<code>api.py</code> 1,334 行。單人開發、13 stars、建立才一個月。概念和架構設計很有深度，但離生產等級還有一段距離。</p><p><strong>測試覆蓋率偏低</strong>，只有 7 個測試檔案，而且只測不需要資料庫連線的邏輯。</p><p><strong>沒有 PyPI 發布</strong>，只能 git clone + Poetry 安裝。</p><h2 id="值不值得關注"><a href="#值不值得關注" class="headerlink" title="值不值得關注"></a>值不值得關注</h2><p>star 數不多，但架構設計的深度超過了大多數類似專案。三層記憶圖譜、神經化學狀態機、Dream Engine 的設計都有神經科學的理論基礎，不是隨便取個「cognitive」名字就上架的東西。</p><p>如果你對「AI 怎麼擁有記憶」這個問題有興趣，OpenSoul 的原始碼和設計文件值得花時間讀。就算不直接用這個框架，EcphoryRAG 的聯想檢索和遺忘曲線的設計模式，也可以搬到自己的 RAG 系統裡。</p><p>至於能不能用在生產環境？現在還不行。但方向對了，剩下的是時間和社群投入的問題。</p><blockquote><p>原文來源：<a href="https://github.com/samttoo22-MewCat/OpenSoul">OpenSoul GitHub Repo</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/09/OpenSoul-%E4%BB%A5%E5%A4%A7%E8%85%A6%E7%A5%9E%E7%B6%93%E7%B5%90%E6%A7%8B%E7%82%BA%E9%9D%88%E6%84%9F%E7%9A%84%E8%AA%8D%E7%9F%A5-AI-%E6%A1%86%E6%9E%B6/</id>
    <link href="https://mark22013333.github.io/2026/04/09/OpenSoul-%E4%BB%A5%E5%A4%A7%E8%85%A6%E7%A5%9E%E7%B6%93%E7%B5%90%E6%A7%8B%E7%82%BA%E9%9D%88%E6%84%9F%E7%9A%84%E8%AA%8D%E7%9F%A5-AI-%E6%A1%86%E6%9E%B6/"/>
    <published>2026-04-09T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>每次開新的 ChatGPT 對話，它都不記得你昨天講了什麼。用 Claude Code 開新 session，前一輪的 debug 心得全部歸零。LLM 的記憶，基本上跟金魚差不多。</p>
<p><strong>OpenSoul</strong> 試圖改變這件事。它在 LLM 之上疊了一層認知架構，靈感來自人腦的神經結構——海馬迴管情節記憶、新皮質管語意記憶、基底核管程序記憶，甚至還有多巴胺和血清素的虛擬版本來調控 AI 的「情緒」。聽起來很科幻？確實，但它的設計文件讀起來比大多數「AI 認知」專案都嚴謹得多。</p>
<h2 id="三層記憶圖譜"><a href="#三層記憶圖譜"]]>
    </summary>
    <title>OpenSoul - 以大腦神經結構為靈感的認知 AI 框架</title>
    <updated>2026-04-09T11:06:46.903Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="Claude Code" scheme="https://mark22013333.github.io/categories/Claude-Code/"/>
    <category term="MCP" scheme="https://mark22013333.github.io/tags/MCP/"/>
    <category term="Claude Code" scheme="https://mark22013333.github.io/tags/Claude-Code/"/>
    <category term="教學" scheme="https://mark22013333.github.io/tags/%E6%95%99%E5%AD%B8/"/>
    <category term="powerup" scheme="https://mark22013333.github.io/tags/powerup/"/>
    <category term="Headless Mode" scheme="https://mark22013333.github.io/tags/Headless-Mode/"/>
    <content>
      <![CDATA[<p>打開 Claude Code 輸入 <code>/powerup</code>，終端機裡跑出一段互動式動畫教學。不用開瀏覽器、不用翻文件，在你寫程式的地方直接學怎麼用這個工具。這是 v2.1.89 加進來的新功能，搭配同一時期的 MCP 500K 上限、headless defer 機制和 &#x2F;cost 增強，四月的第一週就塞了四個版本更新。</p><h2 id="powerup：終端機裡的互動教學"><a href="#powerup：終端機裡的互動教學" class="headerlink" title="&#x2F;powerup：終端機裡的互動教學"></a>&#x2F;powerup：終端機裡的互動教學</h2><p><code>/powerup</code> 的設計哲學很明確——新手不需要離開終端機就能學會 Claude Code 的核心功能。每個 lesson 都有動畫示範，不是只給你看文字說明，而是實際在終端機裡播放操作過程。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 啟動 Claude Code 後直接打</span></span><br><span class="line">/powerup</span><br><span class="line"></span><br><span class="line"><span class="comment"># 會看到課程選單，選你想學的功能</span></span><br><span class="line"><span class="comment"># 每個課程有互動式的 step-by-step 引導</span></span><br></pre></td></tr></table></figure><p>跟一般文件的差別在哪？文件告訴你「你可以用 &#x2F;loop 設定排程」，&#x2F;powerup 則是在終端機裡示範整個設定流程，讓你跟著操作。學習曲線直接壓平一截。</p><p>對比一下其他 AI coding 工具的新手引導：Cursor 靠的是 GUI 裡的 tooltip 和官網教學影片，Kiro CLI 在 v1.25 加了 Help Agent 用對話方式解答問題，Copilot 則是內建在 IDE 的 inline suggestion。Claude Code 選擇在 CLI 裡做互動教學是很合理的——你的使用者本來就在終端機裡，幹嘛要他切到瀏覽器？</p><h2 id="MCP-500K：工具回傳上限大幅提升"><a href="#MCP-500K：工具回傳上限大幅提升" class="headerlink" title="MCP 500K：工具回傳上限大幅提升"></a>MCP 500K：工具回傳上限大幅提升</h2><p>之前 MCP tool result 的大小限制一直是個痛點。如果你的 MCP server 回傳的資料量比較大——例如資料庫查詢結果、長文件內容、API 批次回應——常常會被截斷。</p><p>v2.1.90 把這個上限拉到 <strong>500,000 字元</strong>，透過 <code>_meta</code> annotation 指定：</p><figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line">  <span class="attr">&quot;content&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span><span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;text&quot;</span><span class="punctuation">,</span> <span class="attr">&quot;text&quot;</span><span class="punctuation">:</span> <span class="string">&quot;...大量資料...&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line">  <span class="attr">&quot;_meta&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="attr">&quot;maxCharacters&quot;</span><span class="punctuation">:</span> <span class="number">500000</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure><p>500K 字元大概是什麼概念？一篇 5,000 字的中文文章大約 5,000 字元，所以 500K 大概可以塞 100 篇文章的量。對於資料庫查詢結果或 API 批次回應來說，這個空間相當充裕。</p><p>不過要注意，塞越多資料進 context 就吃越多 token。不是所有情境都適合開到最大，合理設定才是正途。</p><h2 id="Defer-Permission：Headless-模式的權限暫停機制"><a href="#Defer-Permission：Headless-模式的權限暫停機制" class="headerlink" title="Defer Permission：Headless 模式的權限暫停機制"></a>Defer Permission：Headless 模式的權限暫停機制</h2><p>這個功能改變了 headless 模式（<code>-p</code> flag）的權限處理邏輯。之前 headless session 碰到需要權限的工具呼叫時，要嘛自動允許要嘛直接拒絕，沒有中間地帶。</p><p>現在 PreToolUse hook 多了一個 <code>defer</code> 選項。當 hook 回傳 defer 時，headless session 會暫停在那個工具呼叫上，等你用 <code>-p --resume</code> 重新連上後再決定要不要放行。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 啟動 headless session</span></span><br><span class="line">claude -p <span class="string">&quot;幫我重構這個模組&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># session 碰到需要權限的操作時暫停</span></span><br><span class="line"><span class="comment"># 你可以之後再接回去</span></span><br><span class="line">claude -p --resume &lt;session-id&gt;</span><br></pre></td></tr></table></figure><p>搭配另一個新功能——PreToolUse hook 現在可以透過 <code>updatedInput</code> 回應 <code>AskUserQuestion</code>，讓 headless 整合自己的 UI 來收集使用者答案。如果你在做 Claude Code 的自動化管線（CI&#x2F;CD、排程任務等），這兩個功能讓你不用再在「全開放」和「全拒絕」之間二選一。</p><h2 id="cost-增強：看清楚錢花在哪裡"><a href="#cost-增強：看清楚錢花在哪裡" class="headerlink" title="&#x2F;cost 增強：看清楚錢花在哪裡"></a>&#x2F;cost 增強：看清楚錢花在哪裡</h2><p><code>/cost</code> 指令之前只顯示總花費，現在多了兩個維度：</p><p><strong>Per-model split</strong>——如果你的 session 用到多個模型（例如主模型 + sub-agent 用不同模型），現在可以看到每個模型各花了多少。</p><p><strong>Cache-hit split</strong>——顯示 prompt caching 幫你省了多少錢。如果你的工作流會重複送類似的 prompt（例如同一個 CLAUDE.md 被反覆載入），cache hit 率高的話省的錢不少。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">/cost</span><br><span class="line"><span class="comment"># 輸出範例：</span></span><br><span class="line"><span class="comment"># Total: $2.45</span></span><br><span class="line"><span class="comment"># ├─ claude-opus-4-6:  $2.10 (85.7%)</span></span><br><span class="line"><span class="comment"># ├─ claude-haiku-4-5: $0.35 (14.3%)</span></span><br><span class="line"><span class="comment"># └─ Cache savings:    $0.82 (25.1% hit rate)</span></span><br></pre></td></tr></table></figure><p>知道錢花在哪裡才能針對性優化。如果 Haiku 能處理的子任務卻用了 Opus，切一下模型就能省不少。</p><h2 id="其他值得注意的更新"><a href="#其他值得注意的更新" class="headerlink" title="其他值得注意的更新"></a>其他值得注意的更新</h2><p><strong>Bedrock 互動式設定精靈</strong>——從登入畫面選「3rd-party platform」就能進入，引導你完成 AWS 認證、region 設定、credential 驗證和 model pinning。之前這些全要手動改設定檔。</p><p><strong>Headless 啟動效能改善</strong>——<code>-p</code> 模式現在延遲載入 Yoga WASM 和 UI 元件，加上 <code>MCP_CONNECTION_NONBLOCKING=true</code> 可以跳過 MCP 連線等待。如果你的 MCP server 啟動很慢，headless session 不用再被拖著等。MCP server 連線也加了 5 秒上限，不會因為一個 server 卡住而影響整個 session。</p><p><strong>記憶體洩漏修復</strong>——修了好幾個：大 JSON 輸入被 LRU cache 留住的問題、Edit tool 操作超大檔案（&gt;1 GiB）可能 OOM 的問題、remote session 裡 tool use ID 無限累積的問題。長時間跑的 session 穩定性應該會好很多。</p><h2 id="四月第一週版本總覽"><a href="#四月第一週版本總覽" class="headerlink" title="四月第一週版本總覽"></a>四月第一週版本總覽</h2><table><thead><tr><th>版本</th><th>重點</th></tr></thead><tbody><tr><td>v2.1.89</td><td>&#x2F;powerup 互動式教學</td></tr><tr><td>v2.1.90</td><td>MCP 500K 上限、Defer permission</td></tr><tr><td>v2.1.91</td><td>&#x2F;cost per-model split、cache-hit 顯示</td></tr><tr><td>v2.1.92</td><td>Bedrock 設定精靈、記憶體修復、效能優化</td></tr></tbody></table><p>四個版本在一週內連發，節奏很快。如果你是 Claude Code 的重度使用者，建議更新到最新版再回來看看 &#x2F;powerup 裡的課程——說不定會發現一些你沒用過的功能。</p><blockquote><p>參考來源：<a href="https://code.claude.com/docs/en/changelog">Claude Code Changelog</a><br>參考來源：<a href="https://anthropic.skilljar.com/">Claude Code in Action - Anthropic Academy</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/08/Claude-Code-powerup-%E4%BA%92%E5%8B%95%E5%BC%8F%E6%95%99%E5%AD%B8%E8%88%87-April-2026-%E9%87%8D%E9%BB%9E%E6%9B%B4%E6%96%B0%E5%AE%8C%E6%95%B4%E6%8C%87%E5%8D%97/</id>
    <link href="https://mark22013333.github.io/2026/04/08/Claude-Code-powerup-%E4%BA%92%E5%8B%95%E5%BC%8F%E6%95%99%E5%AD%B8%E8%88%87-April-2026-%E9%87%8D%E9%BB%9E%E6%9B%B4%E6%96%B0%E5%AE%8C%E6%95%B4%E6%8C%87%E5%8D%97/"/>
    <published>2026-04-08T01:00:00.000Z</published>
    <summary>
      <![CDATA[<p>打開 Claude Code 輸入 <code>/powerup</code>，終端機裡跑出一段互動式動畫教學。不用開瀏覽器、不用翻文件，在你寫程式的地方直接學怎麼用這個工具。這是 v2.1.89 加進來的新功能，搭配同一時期的 MCP 500K 上限、headless defer 機制和 &#x2F;cost 增強，四月的第一週就塞了四個版本更新。</p>
<h2 id="powerup：終端機裡的互動教學"><a href="#powerup：終端機裡的互動教學" class="headerlink" title="&#x2F;powerup：終端機裡的互動教學"></a>&#x2F]]>
    </summary>
    <title>Claude Code /powerup 互動式教學與 April 2026 重點更新完整指南</title>
    <updated>2026-04-08T11:09:58.201Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="Claude Code" scheme="https://mark22013333.github.io/categories/Claude-Code/"/>
    <category term="Claude Code" scheme="https://mark22013333.github.io/tags/Claude-Code/"/>
    <category term="Shell Script" scheme="https://mark22013333.github.io/tags/Shell-Script/"/>
    <category term="Configuration" scheme="https://mark22013333.github.io/tags/Configuration/"/>
    <category term="彩蛋" scheme="https://mark22013333.github.io/tags/%E5%BD%A9%E8%9B%8B/"/>
    <content>
      <![CDATA[<p><code>/buddy</code> 敲下去，跳出一隻 common 的 snail。你盯著那隻蝸牛三秒鐘，心想：我想要的是 legendary shiny dragon，不是這個。</p><p>問題是，官方沒有給重新 Roll 的入口。寵物的外觀、物種、稀有度全部由 <code>hash(userID + SALT)</code> 確定性生成——同一個 userID 永遠會得到同一隻寵物。想換？得從底層動手。</p><p>這篇把整個寵物系統的原理拆給你看，然後教你怎麼用腳本暴力搜尋到你想要的組合，最後寫進設定檔完成替換。手動派和懶人派的方法都有。</p><h2 id="寵物系統長什麼樣"><a href="#寵物系統長什麼樣" class="headerlink" title="寵物系統長什麼樣"></a>寵物系統長什麼樣</h2><h3 id="兩層架構：骨架跟靈魂"><a href="#兩層架構：骨架跟靈魂" class="headerlink" title="兩層架構：骨架跟靈魂"></a>兩層架構：骨架跟靈魂</h3><p>寵物分成兩層，儲存方式完全不同：</p><p><strong>Bones（骨架）</strong>——外觀、物種、稀有度、屬性值。不存在任何檔案裡，每次都是由 <code>hash(userID + SALT)</code> 即時計算出來的。換句話說，只要 userID 一樣，骨架就永遠一樣。</p><p><strong>Soul（靈魂）</strong>——名字和性格。存在 <code>~/.claude.json</code> 的 <code>companion</code> 欄位裡。這部分可以隨便改。</p><figure class="highlight typescript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// src/buddy/companion.ts</span></span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">SALT</span> = <span class="string">&#x27;friend-2026-401&#x27;</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">export</span> <span class="keyword">function</span> <span class="title function_">companionUserId</span>(<span class="params"></span>): <span class="built_in">string</span> &#123;</span><br><span class="line">  <span class="keyword">const</span> config = <span class="title function_">getGlobalConfig</span>()</span><br><span class="line">  <span class="keyword">return</span> config.<span class="property">oauthAccount</span>?.<span class="property">accountUuid</span> ?? config.<span class="property">userID</span> ?? <span class="string">&#x27;anon&#x27;</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>注意優先順序：<code>accountUuid</code> 優先於 <code>userID</code>。如果你是 OAuth 登入的使用者，buddy 預設會拿 <code>accountUuid</code> 當種子，不是 <code>userID</code>。這個細節後面會很重要。</p><h3 id="userID-到底是啥"><a href="#userID-到底是啥" class="headerlink" title="userID 到底是啥"></a>userID 到底是啥</h3><p>首次啟動 Claude Code 時隨機生成的 32 位元組 hex 字串。用途只有三個：遙測分析、A&#x2F;B 分桶、buddy 種子。跟你的對話歷史、API key、本地設定完全無關。換掉它，什麼功能都不會受影響。</p><h2 id="18-種物種-x-5-稀有度"><a href="#18-種物種-x-5-稀有度" class="headerlink" title="18 種物種 x 5 稀有度"></a>18 種物種 x 5 稀有度</h2><h3 id="物種清單"><a href="#物種清單" class="headerlink" title="物種清單"></a>物種清單</h3><p>duck、goose、blob、cat、dragon、octopus、owl、penguin、turtle、snail、ghost、axolotl、capybara、cactus、robot、rabbit、mushroom、chonk——總共 18 種。</p><h3 id="稀有度與機率"><a href="#稀有度與機率" class="headerlink" title="稀有度與機率"></a>稀有度與機率</h3><table><thead><tr><th>稀有度</th><th>權重</th><th>機率</th></tr></thead><tbody><tr><td>common</td><td>60</td><td>60%</td></tr><tr><td>uncommon</td><td>25</td><td>25%</td></tr><tr><td>rare</td><td>10</td><td>10%</td></tr><tr><td>epic</td><td>4</td><td>4%</td></tr><tr><td>legendary</td><td>1</td><td>1%</td></tr></tbody></table><h3 id="其他可變屬性"><a href="#其他可變屬性" class="headerlink" title="其他可變屬性"></a>其他可變屬性</h3><p><strong>眼睛</strong>有 6 種：<code>·</code> <code>✦</code> <code>×</code> <code>◉</code> <code>@</code> <code>°</code></p><p><strong>帽子</strong>有 8 種：none、crown、tophat、propeller、halo、wizard、beanie、tinyduck</p><p><strong>屬性值</strong>有 5 項：DEBUGGING &#x2F; PATIENCE &#x2F; CHAOS &#x2F; WISDOM &#x2F; SNARK，各自 0-100 隨機。</p><p><strong>Shiny 閃光版</strong>：1% 機率。疊上 legendary 的 1%，想拿到一隻 legendary shiny 特定物種的機率大概是十萬分之五——不靠腳本基本上沒戲。</p><h2 id="Hash-演算法的坑：必須用-Bun"><a href="#Hash-演算法的坑：必須用-Bun" class="headerlink" title="Hash 演算法的坑：必須用 Bun"></a>Hash 演算法的坑：必須用 Bun</h2><p>Claude Code 的二進位檔是 Bun 打包的，hash 用的是 <code>Bun.hash()</code>。你可能想用 Node.js 跑搜尋腳本省事，但 Node.js 的 FNV-1a fallback 跟 <code>Bun.hash()</code> 的結果<strong>完全不同</strong>。</p><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">function</span> <span class="title function_">hashString</span>(<span class="params">s</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="title class_">Bun</span> !== <span class="string">&#x27;undefined&#x27;</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title class_">Number</span>(<span class="title class_">BigInt</span>(<span class="title class_">Bun</span>.<span class="title function_">hash</span>(s)) &amp; <span class="number">0xffffffffn</span>)  <span class="comment">// Bun（正確）</span></span><br><span class="line">  &#125;</span><br><span class="line">  <span class="comment">// FNV-1a fallback（Node.js，結果不對）</span></span><br><span class="line">  <span class="keyword">let</span> h = <span class="number">2166136261</span></span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; s.<span class="property">length</span>; i++) &#123;</span><br><span class="line">    h ^= s.<span class="title function_">charCodeAt</span>(i)</span><br><span class="line">    h = <span class="title class_">Math</span>.<span class="title function_">imul</span>(h, <span class="number">16777619</span>)</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="keyword">return</span> h &gt;&gt;&gt; <span class="number">0</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>用 Node.js 跑出來的 userID 寫進設定，領養到的寵物會跟你預期的完全不同。踩這個坑會浪費你一整個下午，別問我怎麼知道的。</p><p><strong>結論：搜尋腳本必須用 <code>bun</code> 執行。</strong></p><h2 id="手動方法：完整操作流程"><a href="#手動方法：完整操作流程" class="headerlink" title="手動方法：完整操作流程"></a>手動方法：完整操作流程</h2><p>適合想完全理解原理、不依賴第三方工具的人。</p><h3 id="Step-1：建立搜尋腳本"><a href="#Step-1：建立搜尋腳本" class="headerlink" title="Step 1：建立搜尋腳本"></a>Step 1：建立搜尋腳本</h3><p>建立 <code>~/buddy-reroll.js</code>：</p><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br></pre></td><td class="code"><pre><span class="line">#!<span class="regexp">/usr/</span>bin/env bun</span><br><span class="line"><span class="keyword">const</span> crypto = <span class="built_in">require</span>(<span class="string">&#x27;crypto&#x27;</span>)</span><br><span class="line"></span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">SALT</span> = <span class="string">&#x27;friend-2026-401&#x27;</span></span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">SPECIES</span> = [<span class="string">&#x27;duck&#x27;</span>,<span class="string">&#x27;goose&#x27;</span>,<span class="string">&#x27;blob&#x27;</span>,<span class="string">&#x27;cat&#x27;</span>,<span class="string">&#x27;dragon&#x27;</span>,<span class="string">&#x27;octopus&#x27;</span>,<span class="string">&#x27;owl&#x27;</span>,</span><br><span class="line">    <span class="string">&#x27;penguin&#x27;</span>,<span class="string">&#x27;turtle&#x27;</span>,<span class="string">&#x27;snail&#x27;</span>,<span class="string">&#x27;ghost&#x27;</span>,<span class="string">&#x27;axolotl&#x27;</span>,<span class="string">&#x27;capybara&#x27;</span>,<span class="string">&#x27;cactus&#x27;</span>,</span><br><span class="line">    <span class="string">&#x27;robot&#x27;</span>,<span class="string">&#x27;rabbit&#x27;</span>,<span class="string">&#x27;mushroom&#x27;</span>,<span class="string">&#x27;chonk&#x27;</span>]</span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">RARITIES</span> = [<span class="string">&#x27;common&#x27;</span>,<span class="string">&#x27;uncommon&#x27;</span>,<span class="string">&#x27;rare&#x27;</span>,<span class="string">&#x27;epic&#x27;</span>,<span class="string">&#x27;legendary&#x27;</span>]</span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">RARITY_WEIGHTS</span> = &#123; <span class="attr">common</span>:<span class="number">60</span>, <span class="attr">uncommon</span>:<span class="number">25</span>, <span class="attr">rare</span>:<span class="number">10</span>, <span class="attr">epic</span>:<span class="number">4</span>, <span class="attr">legendary</span>:<span class="number">1</span> &#125;</span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">EYES</span> = [<span class="string">&#x27;·&#x27;</span>, <span class="string">&#x27;✦&#x27;</span>, <span class="string">&#x27;×&#x27;</span>, <span class="string">&#x27;◉&#x27;</span>, <span class="string">&#x27;@&#x27;</span>, <span class="string">&#x27;°&#x27;</span>]</span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">HATS</span> = [<span class="string">&#x27;none&#x27;</span>,<span class="string">&#x27;crown&#x27;</span>,<span class="string">&#x27;tophat&#x27;</span>,<span class="string">&#x27;propeller&#x27;</span>,<span class="string">&#x27;halo&#x27;</span>,<span class="string">&#x27;wizard&#x27;</span>,<span class="string">&#x27;beanie&#x27;</span>,<span class="string">&#x27;tinyduck&#x27;</span>]</span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">STAT_NAMES</span> = [<span class="string">&#x27;DEBUGGING&#x27;</span>,<span class="string">&#x27;PATIENCE&#x27;</span>,<span class="string">&#x27;CHAOS&#x27;</span>,<span class="string">&#x27;WISDOM&#x27;</span>,<span class="string">&#x27;SNARK&#x27;</span>]</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">mulberry32</span>(<span class="params">seed</span>) &#123;</span><br><span class="line">    <span class="keyword">let</span> a = seed &gt;&gt;&gt; <span class="number">0</span></span><br><span class="line">    <span class="keyword">return</span> <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">        a |= <span class="number">0</span>; a = (a + <span class="number">0x6d2b79f5</span>) | <span class="number">0</span></span><br><span class="line">        <span class="keyword">let</span> t = <span class="title class_">Math</span>.<span class="title function_">imul</span>(a ^ (a &gt;&gt;&gt; <span class="number">15</span>), <span class="number">1</span> | a)</span><br><span class="line">        t = (t + <span class="title class_">Math</span>.<span class="title function_">imul</span>(t ^ (t &gt;&gt;&gt; <span class="number">7</span>), <span class="number">61</span> | t)) ^ t</span><br><span class="line">        <span class="keyword">return</span> ((t ^ (t &gt;&gt;&gt; <span class="number">14</span>)) &gt;&gt;&gt; <span class="number">0</span>) / <span class="number">4294967296</span></span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">hashString</span>(<span class="params">s</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title class_">Number</span>(<span class="title class_">BigInt</span>(<span class="title class_">Bun</span>.<span class="title function_">hash</span>(s)) &amp; <span class="number">0xffffffffn</span>)</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">pick</span>(<span class="params">rng, arr</span>) &#123; <span class="keyword">return</span> arr[<span class="title class_">Math</span>.<span class="title function_">floor</span>(<span class="title function_">rng</span>() * arr.<span class="property">length</span>)] &#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">rollRarity</span>(<span class="params">rng</span>) &#123;</span><br><span class="line">    <span class="keyword">let</span> roll = <span class="title function_">rng</span>() * <span class="number">100</span></span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">const</span> r <span class="keyword">of</span> <span class="variable constant_">RARITIES</span>) &#123; roll -= <span class="variable constant_">RARITY_WEIGHTS</span>[r]; <span class="keyword">if</span> (roll &lt; <span class="number">0</span>) <span class="keyword">return</span> r &#125;</span><br><span class="line">    <span class="keyword">return</span> <span class="string">&#x27;common&#x27;</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">generateBuddy</span>(<span class="params">uid</span>) &#123;</span><br><span class="line">    <span class="keyword">const</span> rng = <span class="title function_">mulberry32</span>(<span class="title function_">hashString</span>(uid + <span class="variable constant_">SALT</span>))</span><br><span class="line">    <span class="keyword">const</span> rarity = <span class="title function_">rollRarity</span>(rng)</span><br><span class="line">    <span class="keyword">const</span> species = <span class="title function_">pick</span>(rng, <span class="variable constant_">SPECIES</span>)</span><br><span class="line">    <span class="keyword">const</span> eye = <span class="title function_">pick</span>(rng, <span class="variable constant_">EYES</span>)</span><br><span class="line">    <span class="keyword">const</span> hat = <span class="title function_">pick</span>(rng, <span class="variable constant_">HATS</span>)</span><br><span class="line">    <span class="keyword">const</span> shiny = <span class="title function_">rng</span>() &lt; <span class="number">0.01</span></span><br><span class="line">    <span class="keyword">const</span> stats = &#123;&#125;</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">const</span> s <span class="keyword">of</span> <span class="variable constant_">STAT_NAMES</span>) stats[s] = <span class="title class_">Math</span>.<span class="title function_">floor</span>(<span class="title function_">rng</span>() * <span class="number">101</span>)</span><br><span class="line">    <span class="keyword">return</span> &#123; rarity, species, eye, hat, shiny, stats &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// === 搜尋條件（改成你要的）===</span></span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">TARGET_SPECIES</span> = <span class="string">&#x27;capybara&#x27;</span></span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">TARGET_RARITY</span> = <span class="string">&#x27;legendary&#x27;</span></span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">REQUIRE_SHINY</span> = <span class="literal">true</span></span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">MAX</span> = <span class="number">80_000_000</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; <span class="variable constant_">MAX</span>; i++) &#123;</span><br><span class="line">    <span class="keyword">const</span> uid = crypto.<span class="title function_">randomBytes</span>(<span class="number">32</span>).<span class="title function_">toString</span>(<span class="string">&#x27;hex&#x27;</span>)</span><br><span class="line">    <span class="keyword">const</span> b = <span class="title function_">generateBuddy</span>(uid)</span><br><span class="line">    <span class="keyword">if</span> (b.<span class="property">species</span> === <span class="variable constant_">TARGET_SPECIES</span> &amp;&amp; b.<span class="property">rarity</span> === <span class="variable constant_">TARGET_RARITY</span> &amp;&amp; b.<span class="property">shiny</span>) &#123;</span><br><span class="line">        <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">`<span class="subst">$&#123;b.rarity&#125;</span> shiny <span class="subst">$&#123;b.species&#125;</span> | Eye: <span class="subst">$&#123;b.eye&#125;</span> | Hat: <span class="subst">$&#123;b.hat&#125;</span>`</span>)</span><br><span class="line">        <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">`Stats: <span class="subst">$&#123;<span class="built_in">JSON</span>.stringify(b.stats)&#125;</span>`</span>)</span><br><span class="line">        <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">`UID: <span class="subst">$&#123;uid&#125;</span>`</span>)</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>把 <code>TARGET_SPECIES</code>、<code>TARGET_RARITY</code>、<code>REQUIRE_SHINY</code> 改成你要的組合。不要求 shiny 的話把條件拿掉，速度會快很多。</p><h3 id="Step-2：用-Bun-跑搜尋"><a href="#Step-2：用-Bun-跑搜尋" class="headerlink" title="Step 2：用 Bun 跑搜尋"></a>Step 2：用 Bun 跑搜尋</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">bun ~/buddy-reroll.js</span><br></pre></td></tr></table></figure><p>Legendary 通常 50 萬次迭代內就能找到，幾秒鐘的事。Legendary + Shiny 則需要幾千萬次，跑個幾分鐘。找到後記下 UID。</p><h3 id="Step-3-9：寫入設定檔"><a href="#Step-3-9：寫入設定檔" class="headerlink" title="Step 3-9：寫入設定檔"></a>Step 3-9：寫入設定檔</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Step 3：備份</span></span><br><span class="line"><span class="built_in">cp</span> ~/.claude.json ~/.claude.json.backup</span><br><span class="line"></span><br><span class="line"><span class="comment"># Step 4：取得 OAuth Token</span></span><br><span class="line">claude setup-token</span><br><span class="line"><span class="comment"># 複製輸出的 token</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Step 5：重設設定檔</span></span><br><span class="line"><span class="built_in">echo</span> <span class="string">&#x27;&#123;&quot;hasCompletedOnboarding&quot;:true,&quot;theme&quot;:&quot;dark&quot;&#125;&#x27;</span> &gt; ~/.claude.json</span><br><span class="line"></span><br><span class="line"><span class="comment"># Step 6：用 Token 初始化（不寫入 accountUuid）</span></span><br><span class="line">CLAUDE_CODE_OAUTH_TOKEN=<span class="string">&quot;&lt;你的Token&gt;&quot;</span> claude -p <span class="string">&quot;exit&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Step 7：寫入目標 userID</span></span><br><span class="line">bun -e <span class="string">&quot;</span></span><br><span class="line"><span class="string">const fs = require(&#x27;fs&#x27;);</span></span><br><span class="line"><span class="string">const config = JSON.parse(fs.readFileSync(process.env.HOME + &#x27;/.claude.json&#x27;, &#x27;utf8&#x27;));</span></span><br><span class="line"><span class="string">config.userID = &#x27;&lt;你搜尋到的UID&gt;&#x27;;</span></span><br><span class="line"><span class="string">delete config.companion;</span></span><br><span class="line"><span class="string">if (config.oauthAccount) delete config.oauthAccount.accountUuid;</span></span><br><span class="line"><span class="string">fs.writeFileSync(process.env.HOME + &#x27;/.claude.json&#x27;, JSON.stringify(config, null, 2));</span></span><br><span class="line"><span class="string">&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Step 8：領養！</span></span><br><span class="line">CLAUDE_CODE_OAUTH_TOKEN=<span class="string">&quot;&lt;你的Token&gt;&quot;</span> claude</span><br><span class="line"><span class="comment"># 輸入 /buddy</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Step 9：永久設定</span></span><br><span class="line"><span class="built_in">echo</span> <span class="string">&#x27;export CLAUDE_CODE_OAUTH_TOKEN=&quot;&lt;你的Token&gt;&quot;&#x27;</span> &gt;&gt; ~/.zshrc</span><br></pre></td></tr></table></figure><p>為什麼 Step 6 要用環境變數而不是正常登入？因為正常 OAuth 登入會把 <code>accountUuid</code> 寫進設定檔，而 <code>companionUserId()</code> 會優先用 <code>accountUuid</code>，你辛苦搜來的 <code>userID</code> 就被忽略了。用環境變數登入不會寫 <code>accountUuid</code>，<code>/buddy</code> 才會改用 <code>userID</code> 當種子。</p><h2 id="番外：社群-CLI-工具"><a href="#番外：社群-CLI-工具" class="headerlink" title="番外：社群 CLI 工具"></a>番外：社群 CLI 工具</h2><p>不想自己寫腳本？社群已經有幾款開源工具把整個流程包好了。<strong>這是給一般使用者最簡單的路線</strong>——一行指令就能換到你想要的寵物，連 OAuth Token 都不用碰。</p><h3 id="為什麼會有現成工具？"><a href="#為什麼會有現成工具？" class="headerlink" title="為什麼會有現成工具？"></a>為什麼會有現成工具？</h3><p>手動方法的核心是「換 <code>userID</code> 種子」，但需要繞開 <code>accountUuid</code> 優先權，所以要操作環境變數和重設設定檔。社群工具走的是另一條路：<strong>不換 <code>userID</code>，改去暴力搜尋一個替代的 salt 字串</strong>，讓 <code>hash(原 accountUuid + 新 salt)</code> 符合你的目標，然後直接修補 Claude Code 的 binary。使用者不用碰 <code>~/.claude.json</code>，也不用設環境變數。</p><h3 id="三大工具一覽"><a href="#三大工具一覽" class="headerlink" title="三大工具一覽"></a>三大工具一覽</h3><table><thead><tr><th>工具</th><th>風格</th><th>特色</th></tr></thead><tbody><tr><td><strong>any-buddy</strong></td><td>互動式 TUI</td><td>23 個預設組合、即時 ASCII 預覽、支援多寵物切換</td></tr><tr><td><strong>buddy-reroll</strong></td><td>CLI 為主</td><td>輕量直接、Bun 加速、<code>--doctor</code> 系統檢查</td></tr><tr><td><strong>cc-buddy</strong></td><td>雙模式</td><td>EN&#x2F;中文 UI、物種圖鑑、自我測試</td></tr></tbody></table><h3 id="方法-A：any-buddy（推薦初心者）"><a href="#方法-A：any-buddy（推薦初心者）" class="headerlink" title="方法 A：any-buddy（推薦初心者）"></a>方法 A：any-buddy（推薦初心者）</h3><p>互動式 TUI，會引導你一步步完成所有步驟，每步都有即時 ASCII 預覽，適合喜歡視覺化操作的人。</p><h4 id="安裝與啟動"><a href="#安裝與啟動" class="headerlink" title="安裝與啟動"></a>安裝與啟動</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npx any-buddy@latest</span><br></pre></td></tr></table></figure><p>第一次執行會自動下載，無需手動安裝。也可以全域安裝：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install -g any-buddy</span><br></pre></td></tr></table></figure><h4 id="互動模式"><a href="#互動模式" class="headerlink" title="互動模式"></a>互動模式</h4><p>直接執行 <code>any-buddy</code> 進入 TUI，會讓你選擇：</p><ol><li><strong>Build</strong> — 自己挑物種、稀有度、眼睛、帽子</li><li><strong>Browse presets</strong> — 從 23 個預設組合挑選（如 “Arcane Dragon”）</li><li><strong>Switch buddies</strong> — 切換已儲存的寵物</li></ol><p>選完後工具會自動執行 salt 搜尋、修補 binary、設定 hook，全程在 TUI 內完成。</p><h4 id="一行指令模式"><a href="#一行指令模式" class="headerlink" title="一行指令模式"></a>一行指令模式</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 傳說級閃光龍，戴巫師帽，自訂名字 Draco</span></span><br><span class="line">any-buddy -s dragon -r legendary -e <span class="string">&#x27;✦&#x27;</span> -t wizard --shiny --name Draco -y</span><br><span class="line"></span><br><span class="line"><span class="comment"># 史詩級貓</span></span><br><span class="line">any-buddy -s <span class="built_in">cat</span> -r epic -y</span><br><span class="line"></span><br><span class="line"><span class="comment"># 用預設組合</span></span><br><span class="line">any-buddy --preset <span class="string">&quot;Arcane Dragon&quot;</span> -y</span><br></pre></td></tr></table></figure><p><code>-y</code> 旗標跳過所有確認，適合寫進 script。</p><h4 id="常用指令速查"><a href="#常用指令速查" class="headerlink" title="常用指令速查"></a>常用指令速查</h4><table><thead><tr><th>動作</th><th>指令</th></tr></thead><tbody><tr><td>看目前寵物</td><td><code>any-buddy current</code></td></tr><tr><td>預覽不套用</td><td><code>any-buddy preview</code></td></tr><tr><td>還原原始寵物</td><td><code>any-buddy restore</code></td></tr><tr><td>更新後重新套用</td><td><code>any-buddy apply</code></td></tr><tr><td>切換已存寵物</td><td><code>any-buddy buddies</code></td></tr><tr><td>重新孵化</td><td><code>any-buddy rehatch</code></td></tr></tbody></table><h4 id="CLI-旗標完整列表"><a href="#CLI-旗標完整列表" class="headerlink" title="CLI 旗標完整列表"></a>CLI 旗標完整列表</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">-s, --species &lt;name&gt;   物種（duck, cat, dragon, ...，共 18 種）</span><br><span class="line">-r, --rarity &lt;level&gt;   稀有度（common ~ legendary）</span><br><span class="line">-e, --eye &lt;char&gt;       眼睛（· ✦ × ◉ @ °）</span><br><span class="line">-t, --hat &lt;name&gt;       帽子（crown, tophat, propeller, halo, wizard, beanie, tinyduck）</span><br><span class="line">-n, --name &lt;name&gt;      自訂寵物名字</span><br><span class="line">-p, --personality      自訂性格（影響對話氣泡）</span><br><span class="line">--preset &lt;name&gt;        使用預設組合</span><br><span class="line">--shiny                強制要求 shiny 變體（搜尋時間 ~100x）</span><br><span class="line">--peak &lt;stat&gt;          指定最高數值</span><br><span class="line">--dump &lt;stat&gt;          指定最低數值</span><br><span class="line">-y, --yes              跳過所有確認</span><br><span class="line">--no-hook              不安裝自動 patch hook</span><br><span class="line">--silent               靜默模式（適合 hook）</span><br></pre></td></tr></table></figure><h3 id="方法-B：buddy-reroll（輕量派）"><a href="#方法-B：buddy-reroll（輕量派）" class="headerlink" title="方法 B：buddy-reroll（輕量派）"></a>方法 B：buddy-reroll（輕量派）</h3><p>沒有 TUI，純 CLI，適合喜歡一行指令搞定、寫進 dotfile 的人。底層使用 wyhash，跟 <code>/buddy</code> 的 hash 演算法完全一致。</p><h4 id="安裝與啟動-1"><a href="#安裝與啟動-1" class="headerlink" title="安裝與啟動"></a>安裝與啟動</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Bun（推薦，原生 hash 較快）</span></span><br><span class="line">bunx buddy-reroll</span><br><span class="line"></span><br><span class="line"><span class="comment"># 或使用 Node.js（&gt;= 20）</span></span><br><span class="line">npx buddy-reroll</span><br></pre></td></tr></table></figure><h4 id="直接指定屬性"><a href="#直接指定屬性" class="headerlink" title="直接指定屬性"></a>直接指定屬性</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 全部指定</span></span><br><span class="line">buddy-reroll --species dragon --rarity legendary --eye ✦ --hat propeller --shiny</span><br><span class="line"></span><br><span class="line"><span class="comment"># 部分指定，其餘隨機</span></span><br><span class="line">buddy-reroll --species <span class="built_in">cat</span> --rarity epic</span><br><span class="line"></span><br><span class="line"><span class="comment"># 優化數值：最高 WISDOM、最低 CHAOS</span></span><br><span class="line">buddy-reroll --peak WISDOM --dump CHAOS</span><br></pre></td></tr></table></figure><h4 id="Hook-持久化（重要）"><a href="#Hook-持久化（重要）" class="headerlink" title="Hook 持久化（重要）"></a>Hook 持久化（重要）</h4><p>Claude Code 自動更新會重設寵物，啟用 hook 自動恢復：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">buddy-reroll --hook       <span class="comment"># 啟用持久化（執行一次即可）</span></span><br><span class="line">buddy-reroll --unhook     <span class="comment"># 停用</span></span><br></pre></td></tr></table></figure><p>啟用後，每次 Claude 啟動都會自動套用你選的寵物。</p><h4 id="系統檢查與還原"><a href="#系統檢查與還原" class="headerlink" title="系統檢查與還原"></a>系統檢查與還原</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">buddy-reroll --doctor     <span class="comment"># 檢查安裝路徑、寫入權限、設定狀態</span></span><br><span class="line">buddy-reroll --current    <span class="comment"># 顯示目前的寵物設定</span></span><br><span class="line">buddy-reroll --list       <span class="comment"># 列出所有可用選項</span></span><br><span class="line">buddy-reroll --restore    <span class="comment"># 還原成原始寵物</span></span><br></pre></td></tr></table></figure><h3 id="方法選擇建議"><a href="#方法選擇建議" class="headerlink" title="方法選擇建議"></a>方法選擇建議</h3><table><thead><tr><th>你的情況</th><th>推薦方法</th></tr></thead><tbody><tr><td>只想快速換一隻寵物，喜歡視覺操作</td><td><strong>any-buddy</strong>（互動式預覽最直觀）</td></tr><tr><td>喜歡 CLI、想寫進 dotfile</td><td><strong>buddy-reroll</strong>（一行搞定）</td></tr><tr><td>想完全掌握原理、不依賴第三方</td><td><strong>手動腳本</strong>（見上方「完整操作流程」）</td></tr><tr><td>Team &#x2F; Pro 帳號</td><td>any-buddy 或 buddy-reroll（已內建 <code>accountUuid</code> trap fix）</td></tr></tbody></table><h2 id="注意事項"><a href="#注意事項" class="headerlink" title="注意事項"></a>注意事項</h2><p>這篇基於 Claude Code <strong>2.1.89+</strong> 版本分析。如果後續版本更改 SALT 值或 hash 演算法，腳本需要對應調整。</p><p>Claude Code 自動更新會覆蓋 binary，社群工具改的東西就沒了。務必啟用 <code>--hook</code> 持久化。手動腳本的使用者因為是改 <code>userID</code> 而不是改 binary，不受自動更新影響。</p><p>社群工具都是 MIT 授權、公開原始碼，但<strong>會修改 Claude Code 的 binary</strong>。介意的人請用手動腳本方法，只改設定檔不碰 binary。</p><p>macOS 上修改 binary 後需要 re-sign，社群工具都會自動處理。環境需求：Node.js &gt;&#x3D; 20，或安裝 Bun runtime。</p><p>Shiny 搜尋很慢——1% 機率疊上 legendary 的 1% 再疊上特定物種的 1&#x2F;18，期望搜尋次數大約是 18 萬次。耐心等幾分鐘就好，Bun 的速度夠快。</p><hr><p>一隻 legendary shiny capybara 戴著巫師帽，WISDOM 95 分。值得花五分鐘搞定嗎？值得。</p>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/08/Claude-Code-buddy-%E5%AF%B5%E7%89%A9%E9%87%8D-Roll-%E5%AE%8C%E6%95%B4%E6%94%BB%E7%95%A5-%E5%88%B7%E5%88%B0%E4%BD%A0%E7%9A%84%E5%A4%A2%E5%B9%BB-Legendary-Shiny/</id>
    <link href="https://mark22013333.github.io/2026/04/08/Claude-Code-buddy-%E5%AF%B5%E7%89%A9%E9%87%8D-Roll-%E5%AE%8C%E6%95%B4%E6%94%BB%E7%95%A5-%E5%88%B7%E5%88%B0%E4%BD%A0%E7%9A%84%E5%A4%A2%E5%B9%BB-Legendary-Shiny/"/>
    <published>2026-04-08T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p><code>/buddy</code> 敲下去，跳出一隻 common 的 snail。你盯著那隻蝸牛三秒鐘，心想：我想要的是 legendary shiny dragon，不是這個。</p>
<p>問題是，官方沒有給重新 Roll 的入口。寵物的外觀、物種、稀有度全部由 <code>hash(userID + SALT)</code> 確定性生成——同一個 userID 永遠會得到同一隻寵物。想換？得從底層動手。</p>
<p>這篇把整個寵物系統的原理拆給你看，然後教你怎麼用腳本暴力搜尋到你想要的組合，最後寫進設定檔完成替換。手動派和懶人派的方法都有。</p>
<h2 id="寵物系統]]>
    </summary>
    <title>Claude Code /buddy 寵物重 Roll 完整攻略 - 刷到你的夢幻 Legendary Shiny</title>
    <updated>2026-04-08T03:22:15.181Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="AI與科技新聞" scheme="https://mark22013333.github.io/categories/AI%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E/"/>
    <category term="資安" scheme="https://mark22013333.github.io/tags/%E8%B3%87%E5%AE%89/"/>
    <category term="AI 新聞" scheme="https://mark22013333.github.io/tags/AI-%E6%96%B0%E8%81%9E/"/>
    <category term="Copilot" scheme="https://mark22013333.github.io/tags/Copilot/"/>
    <category term="GLM-5.1" scheme="https://mark22013333.github.io/tags/GLM-5-1/"/>
    <category term="Claude Mythos" scheme="https://mark22013333.github.io/tags/Claude-Mythos/"/>
    <category term="n8n" scheme="https://mark22013333.github.io/tags/n8n/"/>
    <category term="Microsoft" scheme="https://mark22013333.github.io/tags/Microsoft/"/>
    <content>
      <![CDATA[<p>754 億參數、MIT 授權、跑八小時不斷線——中國智譜 AI 的 GLM-5.1 直接在 SWE-Bench Pro 上壓過 Claude Opus 4.6 和 GPT-5.4。同一天 Anthropic 把「太危險不能公開」的 Mythos 模型丟上 Vertex AI 給特定客戶用，微軟開源了 AI agent 的治理工具包，n8n 又爆一個 CVSS 10.0 滿分，然後 GitHub Copilot 悄悄改了資料政策。</p><h2 id="GLM-5-1-開源：MIT-授權的-754B-參數模型，八小時自主編碼"><a href="#GLM-5-1-開源：MIT-授權的-754B-參數模型，八小時自主編碼" class="headerlink" title="GLM-5.1 開源：MIT 授權的 754B 參數模型，八小時自主編碼"></a>GLM-5.1 開源：MIT 授權的 754B 參數模型，八小時自主編碼</h2><p>智譜 AI（Z.ai）在 4&#x2F;7 正式發布 GLM-5.1，用的是 MIT License——不是什麼「非商業研究限定」，是真的可以下載、客製化、商用的 MIT。754 億參數，202,752 token context window，在 SWE-Bench Pro 上拿到的分數超過 Claude Opus 4.6 和 GPT-5.4。</p><p>但真正讓這個模型跟其他開源模型拉開差距的，是它的「八小時自主任務」能力。Scenario 3 測試裡，GLM-5.1 花八小時從零建出一個 Linux 風格桌面環境——檔案瀏覽器、終端機、文字編輯器、系統監控、甚至還有能玩的遊戲。之前的模型通常做個工具列加一個空視窗就宣告完成了。</p><p>API 定價 $1.40&#x2F;M input tokens、$4.40&#x2F;M output tokens。北京時間 14:00-18:00 尖峰時段消耗 3x quota，不過四月底前離峰時段都是 1x 標準費率。Hugging Face 上可以直接載。</p><p>開源陣營又多了一張真正能打的牌。</p><blockquote><p>原文來源：<a href="https://venturebeat.com/technology/ai-joins-the-8-hour-work-day-as-glm-ships-5-1-open-source-llm-beating-opus-4">AI joins the 8-hour work day as GLM ships 5.1 open source LLM</a></p></blockquote><h2 id="Claude-Mythos-Preview-Project-Glasswing：太危險所以不公開的模型"><a href="#Claude-Mythos-Preview-Project-Glasswing：太危險所以不公開的模型" class="headerlink" title="Claude Mythos Preview + Project Glasswing：太危險所以不公開的模型"></a>Claude Mythos Preview + Project Glasswing：太危險所以不公開的模型</h2><p>4&#x2F;7 公告，Anthropic 最新最強的模型 Claude Mythos Preview 以 Private Preview 形式上線 Vertex AI，但你不能直接註冊來用——只有加入 Project Glasswing 計畫的特定客戶才有存取權限。</p><p>為什麼限定存取？因為 Mythos 在資安領域的能力太強了。Anthropic 的說法是：「這個模型已經在 OpenBSD、FFmpeg、Linux 等主流軟體中發現了數千個之前沒人知道的零日漏洞。」不是用它來掃描，是它自己找到的。</p><p>Project Glasswing 是 Anthropic 和 Google Cloud、微軟等合作的資安聯防計畫。研究預覽期間 Anthropic 承諾用 $1 億的免費額度支撐大部分用量。正式定價是 $25&#x2F;M input、$125&#x2F;M output——目前市面上最貴的模型。</p><p>Anthropic 明確表示不打算把 Mythos 公開給一般用戶。這倒是 AI 產業第一次有公司說「我們的模型太強了所以不賣」，而不是反過來。</p><blockquote><p>原文來源：<a href="https://cloud.google.com/blog/products/ai-machine-learning/claude-mythos-preview-on-vertex-ai">Claude Mythos Preview on Vertex AI</a></p></blockquote><h2 id="n8n-CVE-2026-21858：CVSS-10-0-滿分，Ni8mare-不是隨便取的"><a href="#n8n-CVE-2026-21858：CVSS-10-0-滿分，Ni8mare-不是隨便取的" class="headerlink" title="n8n CVE-2026-21858：CVSS 10.0 滿分，Ni8mare 不是隨便取的"></a>n8n CVE-2026-21858：CVSS 10.0 滿分，Ni8mare 不是隨便取的</h2><p>又一個 AI 工作流平台中獎。n8n 被爆出 CVE-2026-21858，CVSS 10.0 滿分，研究者取名叫「Ni8mare」——n8n + nightmare 的諧音，名副其實。</p><p>技術上是 Content-Type 混淆漏洞。攻擊者送特製的 HTTP request 到 webhook endpoint，利用 Content-Type header 的錯誤處理覆寫內部解析狀態，一路打到讀取認證密鑰、偽造管理員 session、最終 RCE。整條攻擊鏈不需要任何認證。</p><p>受影響版本是 1.121.0 以前的所有 n8n，已修補。主要衝擊自架實例——managed 環境因為本地檔案和密鑰的存取方式不同，最嚴重的攻擊路徑用不了。</p><p>加上之前的 Langflow（CVSS 9.3）、Flowise（CVSS 10.0）、MLflow（CVSS 10.0），AI workflow 平台的資安紀錄真的慘不忍睹。這些工具為了讓 AI 方便操作開了太多權限，攻擊者同樣方便。自架 n8n 的團隊現在該去確認一下版本號了。</p><blockquote><p>原文來源：<a href="https://www.aikido.dev/blog/n8n-rce-vulnerability-cve-2026-21858">Critical n8n Vulnerability (CVE-2026-21858)</a></p></blockquote><h2 id="微軟開源-Agent-Governance-Toolkit：第一個覆蓋-OWASP-十大-AI-Agent-風險的治理框架"><a href="#微軟開源-Agent-Governance-Toolkit：第一個覆蓋-OWASP-十大-AI-Agent-風險的治理框架" class="headerlink" title="微軟開源 Agent Governance Toolkit：第一個覆蓋 OWASP 十大 AI Agent 風險的治理框架"></a>微軟開源 Agent Governance Toolkit：第一個覆蓋 OWASP 十大 AI Agent 風險的治理框架</h2><p>AI agent 越來越多人用，但治理工具幾乎不存在。微軟在 4&#x2F;2 開源了 Agent Governance Toolkit（MIT License），宣稱是第一個覆蓋全部 OWASP Agentic AI 十大風險的治理方案。</p><p>核心賣點是「確定性的亞毫秒策略執行」——不是用另一個 AI 去監控 AI（那樣延遲和準確度都是問題），而是用預定義的規則引擎做 runtime 攔截。支援 Python、Rust、TypeScript、Go、.NET 五種語言的 SDK。</p><p>對企業來說這個工具解決了一個很現實的問題：你讓 AI agent 去操作生產環境的 API，怎麼確保它不會做出格的事？之前大家都在用 prompt engineering 來「拜託」AI 別亂來，現在有了硬性的 policy enforcement 層。</p><p>不過「覆蓋十大風險」這種宣稱得打個折扣。工具剛出來，社群驗證還不夠，實際部署的案例也有限。方向對，但成熟度還需要時間。</p><blockquote><p>原文來源：<a href="https://opensource.microsoft.com/blog/2026/04/02/introducing-the-agent-governance-toolkit-open-source-runtime-security-for-ai-agents/">Introducing the Agent Governance Toolkit</a></p></blockquote><h2 id="GitHub-Copilot-靜悄悄改資料政策：4-24-起預設用你的互動資料訓練模型"><a href="#GitHub-Copilot-靜悄悄改資料政策：4-24-起預設用你的互動資料訓練模型" class="headerlink" title="GitHub Copilot 靜悄悄改資料政策：4&#x2F;24 起預設用你的互動資料訓練模型"></a>GitHub Copilot 靜悄悄改資料政策：4&#x2F;24 起預設用你的互動資料訓練模型</h2><p>這則消息被前面幾個大新聞蓋過去了，但其實蠻重要的。GitHub 在四月初通知用戶：從 4&#x2F;24 開始，Copilot Free、Pro、Pro+ 的用戶互動資料——包括輸入、輸出、程式碼片段和相關上下文——<strong>預設會被用來訓練和改進 AI 模型</strong>。</p><p>關鍵字：預設。不是 opt-in，是 opt-out。你要自己到設定裡關掉。</p><p>三月才出過 Copilot 在 150 萬個 PR 裡塞入宣傳「tips」的事件，現在又來這個。用戶信任度本來就在下滑——多份調查顯示開發者對 Copilot 建議品質的滿意度從 2025 年底開始持續走低，延遲變高、上下文感知變差是最常見的抱怨。</p><p>Enterprise 和 Business 方案目前不受影響。如果你用的是個人方案，4&#x2F;24 之前去 Settings 裡面確認一下資料分享選項。</p><blockquote><p>原文來源：<a href="https://www.nxcode.io/resources/news/github-copilot-getting-worse-2026-developers-switching">Is GitHub Copilot Getting Worse in 2026?</a></p></blockquote><hr><p>開源模型跟閉源的差距在快速縮小——GLM-5.1 用 MIT 授權直接挑戰 Opus 和 GPT-5.4，同一時間 Anthropic 卻選擇把最強模型鎖起來不賣。AI 工作流平台的資安債繼續爆，微軟試圖用治理工具包補上這個缺口。GitHub Copilot 的資料政策調整提醒我們：免費的東西，你就是產品。</p>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/08/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260408/</id>
    <link href="https://mark22013333.github.io/2026/04/08/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260408/"/>
    <published>2026-04-08T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>754 億參數、MIT 授權、跑八小時不斷線——中國智譜 AI 的 GLM-5.1 直接在 SWE-Bench Pro 上壓過 Claude Opus 4.6 和 GPT-5.4。同一天 Anthropic 把「太危險不能公開」的 Mythos 模型丟上 Vertex AI 給特定客戶用，微軟開源了 AI agent 的治理工具包，n8n 又爆一個 CVSS 10.0 滿分，然後 GitHub Copilot 悄悄改了資料政策。</p>
<h2 id="GLM-5-1-開源：MIT-授權的-754B-參數模型，八小時自主編碼"><a href="#GLM-5-1-開源：MIT-授權的-7]]>
    </summary>
    <title>AI 與科技新聞摘要 - 2026/04/08</title>
    <updated>2026-04-08T11:09:58.190Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="Claude Code" scheme="https://mark22013333.github.io/categories/Claude-Code/"/>
    <category term="Claude Code" scheme="https://mark22013333.github.io/tags/Claude-Code/"/>
    <category term="自動化" scheme="https://mark22013333.github.io/tags/%E8%87%AA%E5%8B%95%E5%8C%96/"/>
    <category term="AI 求職" scheme="https://mark22013333.github.io/tags/AI-%E6%B1%82%E8%81%B7/"/>
    <category term="Prompt-as-Code" scheme="https://mark22013333.github.io/tags/Prompt-as-Code/"/>
    <category term="Career-Ops" scheme="https://mark22013333.github.io/tags/Career-Ops/"/>
    <content>
      <![CDATA[<p>740 個職缺，四天之內全部評估完畢，最後拿到 Head of Applied AI 的 offer。這不是什麼招募平台的廣告詞，而是一個工程師用 Claude Code 搭出來的求職自動化管線——Career-Ops。</p><h2 id="不是投遞工具，是篩選器"><a href="#不是投遞工具，是篩選器" class="headerlink" title="不是投遞工具，是篩選器"></a>不是投遞工具，是篩選器</h2><p>先釐清一件事：Career-Ops 不會幫你自動投履歷。它的定位比較像是求職版的 CI&#x2F;CD pipeline——你丟一個職缺 URL 進去，它幫你跑完評估、產生客製化 CV、登錄追蹤器，所有產出都要經過你人工審查才送出。</p><p>整個系統建構在 Claude Code CLI 上面，但有趣的地方在於它的邏輯不是寫在程式碼裡，而是寫在 Markdown 檔案中。<code>CLAUDE.md</code> 加上 14 個 <code>modes/*.md</code> 定義了所有行為——評估框架、評分公式、PDF 格式、外聯訊息模板。如果你想客製化，改 Markdown 就好，不用動程式碼。</p><p>作者把這個設計叫做「<strong>Prompt-as-Code</strong>」。類比的話，傳統軟體是「用程式碼寫邏輯」，Career-Ops 是「用 Markdown 寫邏輯，讓 AI 當執行引擎」。</p><h2 id="評估系統：六個區塊，十個維度"><a href="#評估系統：六個區塊，十個維度" class="headerlink" title="評估系統：六個區塊，十個維度"></a>評估系統：六個區塊，十個維度</h2><p>每個職缺進來會跑完六個區塊的完整評估：角色摘要（解構 JD）、CV 匹配度（跟你的 <code>cv.md</code> 比對）、層級策略（這個職位適不適合你的職涯階段）、薪資研究（用 WebSearch 查市場行情）、個人化申請計畫、面試準備（STAR+Reflection 格式的故事）。</p><p>最後用十個維度加權算分，1 到 5 分，包含匹配度、職涯目標對齊、薪資、文化訊號、Red Flags。系統建議 4.0 以下的就別投了——這個門檻聽起來很嚴格，但回過頭看，把時間花在真正值得的職缺上才是效率最大化。</p><h2 id="兩個值得學的設計"><a href="#兩個值得學的設計" class="headerlink" title="兩個值得學的設計"></a>兩個值得學的設計</h2><p><strong>ATS 優化的 PDF CV</strong>——Career-Ops 用 Playwright + Chromium 把 HTML 模板轉成 PDF，但不是隨便轉。單欄佈局讓 ATS 好解析，自動正規化 em-dash 和 smart quotes（這些字元在 ATS 解析時超容易出問題），還會從評估報告中提取關鍵字注入 CV。不是瞎掰經歷，是把你真的有的經驗用 JD 的語言重新包裝。</p><p><strong>批次評估</strong>——收集了幾十個職缺 URL 之後，batch 模式用 <code>claude -p</code> 啟動多個 headless worker 平行處理。每個 worker 有獨立的 200K token 上下文。評估結果先寫入 TSV，最後由 <code>merge-tracker.mjs</code> 統一合併。避免並行寫入衝突的設計蠻聰明的。</p><h2 id="System-User-雙層資料契約"><a href="#System-User-雙層資料契約" class="headerlink" title="System&#x2F;User 雙層資料契約"></a>System&#x2F;User 雙層資料契約</h2><p>這個模式值得偷。Career-Ops 把檔案分成「系統層」（modes&#x2F;、templates&#x2F;、*.mjs）和「用戶層」（config&#x2F;profile.yml、cv.md、data&#x2F;、reports&#x2F;）。系統層可以安全自動更新，用戶層永遠不會被碰。<code>update-system.mjs</code> 拉新版本時不會破壞你的個人資料。</p><p>如果你在做任何「需要更新但又不能弄壞使用者設定」的工具，這個模式很值得參考。</p><h2 id="14-個模式速覽"><a href="#14-個模式速覽" class="headerlink" title="14 個模式速覽"></a>14 個模式速覽</h2><table><thead><tr><th>模式</th><th>功能</th></tr></thead><tbody><tr><td><code>oferta</code></td><td>單一職缺完整評估</td></tr><tr><td><code>ofertas</code></td><td>多職缺並排比較</td></tr><tr><td><code>pdf</code></td><td>ATS 優化 CV PDF</td></tr><tr><td><code>scan</code></td><td>入口網站掃描新職缺</td></tr><tr><td><code>batch</code></td><td>平行批次評估</td></tr><tr><td><code>auto-pipeline</code></td><td>URL 到追蹤器一站完成</td></tr><tr><td><code>tracker</code></td><td>投遞狀態管理</td></tr><tr><td><code>apply</code></td><td>表單填寫助手</td></tr><tr><td><code>contacto</code></td><td>LinkedIn 外聯訊息</td></tr><tr><td><code>deep</code></td><td>公司深度研究</td></tr></tbody></table><p>預設介面名稱用西班牙語（作者是阿根廷人），但 Claude 會用你指定的語言回應。</p><h2 id="技術棧"><a href="#技術棧" class="headerlink" title="技術棧"></a>技術棧</h2><p>後端用 Node.js（dependency 只有一個：playwright），Dashboard 用 Go + Bubble Tea + Lipgloss 做終端 UI。資料層沒有資料庫，全部是 Markdown 表格 + YAML + TSV。整個專案大約 6,000 行 mjs&#x2F;Go&#x2F;Bash 加上 1,300 行 Markdown modes。</p><p>建立四天就衝到 ~20,000 stars，已經合併了超過十個社群 PR。文件品質極高——<code>CLAUDE.md</code> 就寫了 16.7KB，加上完整的 DATA_CONTRACT。</p><h2 id="踩坑提醒"><a href="#踩坑提醒" class="headerlink" title="踩坑提醒"></a>踩坑提醒</h2><p>需要 Claude Code CLI 訂閱，batch 模式吃 token 很兇，建議用 Claude Max 方案。首次使用品質有限，系統需要先「認識」你——讓它讀過夠多的 CV 和職涯故事之後才會準。AI 產出的薪資數據和公司資訊可能不精確，所有東西都要人工審查。</p><p>Batch 模式下 headless worker 沒辦法用 Playwright，所以 JD 驗證會標記為 <code>unconfirmed</code>。入口網站的 URL 會因為公司換 ATS 系統而過期，需要定期維護。</p><h2 id="給想學的人"><a href="#給想學的人" class="headerlink" title="給想學的人"></a>給想學的人</h2><p>如果你對「怎麼用 Markdown 建構完整 AI Agent 工作流」有興趣，Career-Ops 是目前最好的參考案例之一。14 個模式的設計、雙層資料契約、批次處理架構，每個都是可以直接套用到其他場景的 pattern。</p><p>不一定要拿來求職——把 <code>oferta</code> 模式改成「供應商評估」、把 <code>scan</code> 改成「競品監控」，骨架是完全通用的。</p><blockquote><p>相關連結：<a href="https://github.com/santifer/career-ops">Career-Ops GitHub Repo</a><br>需要搭配：<a href="https://docs.anthropic.com/en/docs/claude-code">Claude Code CLI</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/08/Career-Ops-%E7%94%A8-Claude-Code-%E6%89%93%E9%80%A0%E7%9A%84-AI-%E6%B1%82%E8%81%B7%E7%AE%A1%E7%B7%9A%E7%B3%BB%E7%B5%B1/</id>
    <link href="https://mark22013333.github.io/2026/04/08/Career-Ops-%E7%94%A8-Claude-Code-%E6%89%93%E9%80%A0%E7%9A%84-AI-%E6%B1%82%E8%81%B7%E7%AE%A1%E7%B7%9A%E7%B3%BB%E7%B5%B1/"/>
    <published>2026-04-08T00:00:00.000Z</published>
    <summary>
      <![CDATA[<p>740 個職缺，四天之內全部評估完畢，最後拿到 Head of Applied AI 的 offer。這不是什麼招募平台的廣告詞，而是一個工程師用 Claude Code 搭出來的求職自動化管線——Career-Ops。</p>
<h2 id="不是投遞工具，是篩選器"><a href="#不是投遞工具，是篩選器" class="headerlink" title="不是投遞工具，是篩選器"></a>不是投遞工具，是篩選器</h2><p>先釐清一件事：Career-Ops 不會幫你自動投履歷。它的定位比較像是求職版的 CI&#x2F;CD pipeline——你丟一個職缺 URL 進去，]]>
    </summary>
    <title>Career-Ops - 用 Claude Code 打造的 AI 求職管線系統</title>
    <updated>2026-04-08T11:07:53.094Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="Claude Code" scheme="https://mark22013333.github.io/categories/Claude-Code/"/>
    <category term="Claude Code" scheme="https://mark22013333.github.io/tags/Claude-Code/"/>
    <category term="自動化" scheme="https://mark22013333.github.io/tags/%E8%87%AA%E5%8B%95%E5%8C%96/"/>
    <category term="CI/CD" scheme="https://mark22013333.github.io/tags/CI-CD/"/>
    <category term="Code Review" scheme="https://mark22013333.github.io/tags/Code-Review/"/>
    <category term="GitHub Actions" scheme="https://mark22013333.github.io/tags/GitHub-Actions/"/>
    <content>
      <![CDATA[<p>凌晨兩點，手機跳了通知：有人在 PR 留言 <code>@claude fix the TypeError in the dashboard component</code>。你翻了個身繼續睡。早上起來打開 GitHub，Claude 已經改好了、推了 commit、還在 comment 裡解釋了根本原因。</p><p>這不是科幻。Claude Code GitHub Actions 就是在做這件事——把 Claude 塞進你的 CI&#x2F;CD pipeline，讓它在 GitHub 上自動回應 PR、修 bug、寫測試、甚至從 issue 直接生出整個 PR。</p><h2 id="它能幹嘛？"><a href="#它能幹嘛？" class="headerlink" title="它能幹嘛？"></a>它能幹嘛？</h2><p>一句話：在 GitHub 的 issue 或 PR 裡 <code>@claude</code> 就能觸發 AI 幫你做事。</p><p>具體來說：</p><ul><li><strong>從 issue 自動建 PR</strong>：描述需求，Claude 分析 codebase 後產出完整的 PR</li><li><strong>自動 code review</strong>：PR 開出來或更新時，Claude 自動分析 diff 並留下 review comments</li><li><strong>回應 @claude 指令</strong>：在任何 comment 裡 @claude，它會根據上下文回應</li><li><strong>修 bug</strong>：貼上錯誤訊息，Claude 定位問題並推送修復 commit</li><li><strong>寫測試</strong>：看到新 code，自動補上對應的測試案例</li><li><strong>排程任務</strong>：每天早上自動整理昨天的 commit 和 open issues</li></ul><p>而且它會讀你 repo 根目錄的 <code>CLAUDE.md</code>，遵守你定義的 coding standards。不是那種亂槍打鳥的通用建議，是真的看過你的 codebase 之後給的。</p><h2 id="五分鐘設定完成"><a href="#五分鐘設定完成" class="headerlink" title="五分鐘設定完成"></a>五分鐘設定完成</h2><h3 id="方法一：自動安裝（推薦）"><a href="#方法一：自動安裝（推薦）" class="headerlink" title="方法一：自動安裝（推薦）"></a>方法一：自動安裝（推薦）</h3><p>打開終端機，在 Claude Code 裡跑一行指令：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">/install-github-app</span><br></pre></td></tr></table></figure><p>它會引導你完成 GitHub App 安裝和 secret 設定。前提是你得是 repo admin。</p><h3 id="方法二：手動設定"><a href="#方法二：手動設定" class="headerlink" title="方法二：手動設定"></a>方法二：手動設定</h3><p>三個步驟：</p><p><strong>1. 安裝 Claude GitHub App</strong></p><p>到 <a href="https://github.com/apps/claude">github.com&#x2F;apps&#x2F;claude</a> 安裝，給它 Contents、Issues、Pull requests 的讀寫權限。</p><p><strong>2. 設定 API Key</strong></p><p>到你的 repo Settings → Secrets and variables → Actions，新增一個叫 <code>ANTHROPIC_API_KEY</code> 的 secret，貼上你的 API key。</p><p><strong>3. 加入 Workflow 檔案</strong></p><p>在 <code>.github/workflows/</code> 建立 <code>claude.yml</code>：</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">name:</span> <span class="string">Claude</span> <span class="string">Code</span></span><br><span class="line"><span class="attr">on:</span></span><br><span class="line">  <span class="attr">issue_comment:</span></span><br><span class="line">    <span class="attr">types:</span> [<span class="string">created</span>]</span><br><span class="line">  <span class="attr">pull_request_review_comment:</span></span><br><span class="line">    <span class="attr">types:</span> [<span class="string">created</span>]</span><br><span class="line"><span class="attr">jobs:</span></span><br><span class="line">  <span class="attr">claude:</span></span><br><span class="line">    <span class="attr">runs-on:</span> <span class="string">ubuntu-latest</span></span><br><span class="line">    <span class="attr">steps:</span></span><br><span class="line">      <span class="bullet">-</span> <span class="attr">uses:</span> <span class="string">anthropics/claude-code-action@v1</span></span><br><span class="line">        <span class="attr">with:</span></span><br><span class="line">          <span class="attr">anthropic_api_key:</span> <span class="string">$&#123;&#123;</span> <span class="string">secrets.ANTHROPIC_API_KEY</span> <span class="string">&#125;&#125;</span></span><br></pre></td></tr></table></figure><p>就這樣。現在去你的 PR 裡留言 <code>@claude review this</code> 試試看。</p><h2 id="實戰-Workflow-範例"><a href="#實戰-Workflow-範例" class="headerlink" title="實戰 Workflow 範例"></a>實戰 Workflow 範例</h2><h3 id="自動-Code-Review"><a href="#自動-Code-Review" class="headerlink" title="自動 Code Review"></a>自動 Code Review</h3><p>每次有人開 PR 或 push 新 commit，Claude 自動跑一輪 review：</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">name:</span> <span class="string">Code</span> <span class="string">Review</span></span><br><span class="line"><span class="attr">on:</span></span><br><span class="line">  <span class="attr">pull_request:</span></span><br><span class="line">    <span class="attr">types:</span> [<span class="string">opened</span>, <span class="string">synchronize</span>]</span><br><span class="line"><span class="attr">jobs:</span></span><br><span class="line">  <span class="attr">review:</span></span><br><span class="line">    <span class="attr">runs-on:</span> <span class="string">ubuntu-latest</span></span><br><span class="line">    <span class="attr">steps:</span></span><br><span class="line">      <span class="bullet">-</span> <span class="attr">uses:</span> <span class="string">anthropics/claude-code-action@v1</span></span><br><span class="line">        <span class="attr">with:</span></span><br><span class="line">          <span class="attr">anthropic_api_key:</span> <span class="string">$&#123;&#123;</span> <span class="string">secrets.ANTHROPIC_API_KEY</span> <span class="string">&#125;&#125;</span></span><br><span class="line">          <span class="attr">prompt:</span> <span class="string">&quot;Review this pull request for code quality, correctness, and security. Analyze the diff, then post your findings as review comments.&quot;</span></span><br><span class="line">          <span class="attr">claude_args:</span> <span class="string">&quot;--max-turns 5&quot;</span></span><br></pre></td></tr></table></figure><h3 id="每日摘要報告"><a href="#每日摘要報告" class="headerlink" title="每日摘要報告"></a>每日摘要報告</h3><p>用 cron schedule 每天早上九點產出昨天的開發摘要：</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">name:</span> <span class="string">Daily</span> <span class="string">Report</span></span><br><span class="line"><span class="attr">on:</span></span><br><span class="line">  <span class="attr">schedule:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">cron:</span> <span class="string">&quot;0 9 * * *&quot;</span></span><br><span class="line"><span class="attr">jobs:</span></span><br><span class="line">  <span class="attr">report:</span></span><br><span class="line">    <span class="attr">runs-on:</span> <span class="string">ubuntu-latest</span></span><br><span class="line">    <span class="attr">steps:</span></span><br><span class="line">      <span class="bullet">-</span> <span class="attr">uses:</span> <span class="string">anthropics/claude-code-action@v1</span></span><br><span class="line">        <span class="attr">with:</span></span><br><span class="line">          <span class="attr">anthropic_api_key:</span> <span class="string">$&#123;&#123;</span> <span class="string">secrets.ANTHROPIC_API_KEY</span> <span class="string">&#125;&#125;</span></span><br><span class="line">          <span class="attr">prompt:</span> <span class="string">&quot;Generate a summary of yesterday&#x27;s commits and open issues&quot;</span></span><br><span class="line">          <span class="attr">claude_args:</span> <span class="string">&quot;--model claude-opus-4-6&quot;</span></span><br></pre></td></tr></table></figure><h3 id="用-Opus-跑複雜任務"><a href="#用-Opus-跑複雜任務" class="headerlink" title="用 Opus 跑複雜任務"></a>用 Opus 跑複雜任務</h3><p>預設是 Sonnet，但你可以透過 <code>claude_args</code> 切換模型：</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">claude_args:</span> <span class="string">&quot;--model claude-opus-4-6 --max-turns 10&quot;</span></span><br></pre></td></tr></table></figure><p>Opus 適合需要深度理解 codebase 的複雜任務——大型重構建議、跨模組 bug 追蹤、架構決策分析。Sonnet 則適合日常的 review 和簡單修改，速度快、成本低。</p><h2 id="CLAUDE-md：教-Claude-你的規矩"><a href="#CLAUDE-md：教-Claude-你的規矩" class="headerlink" title="CLAUDE.md：教 Claude 你的規矩"></a>CLAUDE.md：教 Claude 你的規矩</h2><p>在 repo 根目錄放一個 <code>CLAUDE.md</code>，Claude 在 CI&#x2F;CD 裡也會讀。內容建議包含：</p><ul><li><strong>Coding style</strong>：命名慣例、縮排規則、import 排序</li><li><strong>Review 標準</strong>：什麼程度的問題要 block、什麼可以 nit</li><li><strong>專案架構</strong>：核心模組在哪、utility 函數在哪</li><li><strong>測試慣例</strong>：用什麼 framework、覆蓋率目標、mock 策略</li></ul><p>這東西的效果比你想像的大。沒有 CLAUDE.md 的時候，Claude 給的建議是通用的「你應該加 error handling」；有了之後，它會說「這裡應該用 AppError 而不是原生 Error，參考 src&#x2F;utils&#x2F;errors.ts 的模式」。</p><h2 id="企業環境：AWS-Bedrock-和-Google-Vertex-AI"><a href="#企業環境：AWS-Bedrock-和-Google-Vertex-AI" class="headerlink" title="企業環境：AWS Bedrock 和 Google Vertex AI"></a>企業環境：AWS Bedrock 和 Google Vertex AI</h2><p>直接用 Anthropic API 不是唯一選項。如果你的公司有資料駐留或計費需求，可以走 AWS Bedrock 或 Google Vertex AI：</p><h3 id="AWS-Bedrock-範例"><a href="#AWS-Bedrock-範例" class="headerlink" title="AWS Bedrock 範例"></a>AWS Bedrock 範例</h3><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">steps:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">Configure</span> <span class="string">AWS</span> <span class="string">Credentials</span> <span class="string">(OIDC)</span></span><br><span class="line">    <span class="attr">uses:</span> <span class="string">aws-actions/configure-aws-credentials@v4</span></span><br><span class="line">    <span class="attr">with:</span></span><br><span class="line">      <span class="attr">role-to-assume:</span> <span class="string">$&#123;&#123;</span> <span class="string">secrets.AWS_ROLE_TO_ASSUME</span> <span class="string">&#125;&#125;</span></span><br><span class="line">      <span class="attr">aws-region:</span> <span class="string">us-west-2</span></span><br><span class="line"></span><br><span class="line">  <span class="bullet">-</span> <span class="attr">uses:</span> <span class="string">anthropics/claude-code-action@v1</span></span><br><span class="line">    <span class="attr">with:</span></span><br><span class="line">      <span class="attr">github_token:</span> <span class="string">$&#123;&#123;</span> <span class="string">steps.app-token.outputs.token</span> <span class="string">&#125;&#125;</span></span><br><span class="line">      <span class="attr">use_bedrock:</span> <span class="string">&quot;true&quot;</span></span><br><span class="line">      <span class="attr">claude_args:</span> <span class="string">&#x27;--model us.anthropic.claude-sonnet-4-6 --max-turns 10&#x27;</span></span><br></pre></td></tr></table></figure><p>用 OIDC 做認證，不需要存 AWS access key 到 GitHub secret 裡——credential 是臨時的、自動輪換的，比 static key 安全很多。</p><h3 id="Google-Vertex-AI-範例"><a href="#Google-Vertex-AI-範例" class="headerlink" title="Google Vertex AI 範例"></a>Google Vertex AI 範例</h3><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">steps:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">Authenticate</span> <span class="string">to</span> <span class="string">Google</span> <span class="string">Cloud</span></span><br><span class="line">    <span class="attr">uses:</span> <span class="string">google-github-actions/auth@v2</span></span><br><span class="line">    <span class="attr">with:</span></span><br><span class="line">      <span class="attr">workload_identity_provider:</span> <span class="string">$&#123;&#123;</span> <span class="string">secrets.GCP_WORKLOAD_IDENTITY_PROVIDER</span> <span class="string">&#125;&#125;</span></span><br><span class="line">      <span class="attr">service_account:</span> <span class="string">$&#123;&#123;</span> <span class="string">secrets.GCP_SERVICE_ACCOUNT</span> <span class="string">&#125;&#125;</span></span><br><span class="line"></span><br><span class="line">  <span class="bullet">-</span> <span class="attr">uses:</span> <span class="string">anthropics/claude-code-action@v1</span></span><br><span class="line">    <span class="attr">with:</span></span><br><span class="line">      <span class="attr">github_token:</span> <span class="string">$&#123;&#123;</span> <span class="string">steps.app-token.outputs.token</span> <span class="string">&#125;&#125;</span></span><br><span class="line">      <span class="attr">use_vertex:</span> <span class="string">&quot;true&quot;</span></span><br><span class="line">      <span class="attr">claude_args:</span> <span class="string">&#x27;--model claude-sonnet-4-5@20250929 --max-turns 10&#x27;</span></span><br></pre></td></tr></table></figure><p>兩種雲端方案都需要先建立自己的 GitHub App（而不是用 Anthropic 官方的），因為認證流程不同。設定稍微複雜一點，但拿到的是完整的資料控制權。</p><h2 id="跟其他工具比一下"><a href="#跟其他工具比一下" class="headerlink" title="跟其他工具比一下"></a>跟其他工具比一下</h2><p>Copilot CLI 上週剛加了 Critic agent，Cursor 3 可以從 GitHub 觸發 agent session。Claude Code GitHub Actions 的差異化在哪？</p><p><strong>跟 Copilot 比</strong>：Copilot 的 CI 整合是 GitHub 原生的，設定更無腦，但模型選擇受限於 GitHub 提供的選項。Claude 這邊你可以用 Opus、Sonnet，透過 MCP 串接外部工具，自由度更高。</p><p><strong>跟 Cursor 比</strong>：Cursor 3 的 agent 可以從 GitHub 觸發，但本質上是在 Cursor 的雲端跑，不是 GitHub runner 原生環境。Claude Code Action 跑在 GitHub 的 runner 上，repo 的 CI 環境一致，debug 更方便。</p><p><strong>共通點</strong>：三家都在往「AI 不只是建議，是直接動手改」的方向走。差別在執行環境、模型選擇、和生態系整合。</p><h2 id="成本要注意"><a href="#成本要注意" class="headerlink" title="成本要注意"></a>成本要注意</h2><p>兩筆帳要算：</p><p><strong>GitHub Actions 費用</strong>：跑在 GitHub-hosted runner 上，吃你的 Actions minutes。免費額度用完後按 GitHub 的計費標準走。</p><p><strong>API 費用</strong>：每次 Claude 互動都消耗 token。複雜任務（分析大 PR、跨模組修 bug）的 token 用量會顯著高於簡單 review。</p><p><strong>省錢技巧</strong>：</p><ul><li>用 <code>--max-turns</code> 限制對話輪次，避免 Agent 陷入迴圈</li><li>日常 review 用 Sonnet，只有複雜任務才切 Opus</li><li>設 workflow 層級的 timeout，防止 runaway job</li><li>用 GitHub 的 concurrency 控制限制平行執行數</li></ul><h2 id="常見問題排解"><a href="#常見問題排解" class="headerlink" title="常見問題排解"></a>常見問題排解</h2><p><strong>Claude 不回應 @claude</strong>：確認 GitHub App 有裝、workflow 有 enable、API key 有設對。注意是 <code>@claude</code> 不是 <code>/claude</code>。</p><p><strong>Claude 的 commit 不會觸發 CI</strong>：確認你用的是 GitHub App 或自建 App，不是 Actions 的預設 user。預設 user 的 commit 不會觸發後續 workflow。</p><p><strong>認證失敗</strong>：API key 是否有效？Bedrock&#x2F;Vertex 的 credential 設定是否正確？Secret 命名是否完全吻合？</p><hr><p>Claude Code GitHub Actions 的核心價值不是「讓 AI 幫你寫 code」——那個 Claude Code CLI 就能做。它的價值是把 AI 嵌入團隊的 GitHub 工作流，讓每個 PR、每個 issue 都有一個不會下班的 reviewer 和 implementer 待命。設定五分鐘，之後每天省的時間遠超過這五分鐘。</p><blockquote><p>原文來源：<a href="https://code.claude.com/docs/en/github-actions">Claude Code GitHub Actions - Official Docs</a><br>參考來源：<a href="https://anthropic.skilljar.com/">Claude Code in Action - Anthropic Academy</a><br>GitHub Repo：<a href="https://github.com/anthropics/claude-code-action">anthropics&#x2F;claude-code-action</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/07/Claude-Code-GitHub-Actions-%E5%AE%8C%E6%95%B4%E6%95%99%E5%AD%B8-%E8%AE%93-AI-%E8%87%AA%E5%8B%95%E5%B9%AB%E4%BD%A0-Review-PR-%E4%BF%AE-Bug-%E5%AF%AB%E6%B8%AC%E8%A9%A6/</id>
    <link href="https://mark22013333.github.io/2026/04/07/Claude-Code-GitHub-Actions-%E5%AE%8C%E6%95%B4%E6%95%99%E5%AD%B8-%E8%AE%93-AI-%E8%87%AA%E5%8B%95%E5%B9%AB%E4%BD%A0-Review-PR-%E4%BF%AE-Bug-%E5%AF%AB%E6%B8%AC%E8%A9%A6/"/>
    <published>2026-04-07T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>凌晨兩點，手機跳了通知：有人在 PR 留言 <code>@claude fix the TypeError in the dashboard component</code>。你翻了個身繼續睡。早上起來打開 GitHub，Claude 已經改好了、推了 commit、還在 comment 裡解釋了根本原因。</p>
<p>這不是科幻。Claude Code GitHub Actions 就是在做這件事——把 Claude 塞進你的 CI&#x2F;CD pipeline，讓它在 GitHub 上自動回應 PR、修 bug、寫測試、甚至從 issue 直接生出整個 PR。</p>
<h2]]>
    </summary>
    <title>Claude Code GitHub Actions 完整教學 - 讓 AI 自動幫你 Review PR、修 Bug、寫測試</title>
    <updated>2026-04-07T11:07:50.712Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="Claude Code" scheme="https://mark22013333.github.io/categories/Claude-Code/"/>
    <category term="AI" scheme="https://mark22013333.github.io/tags/AI/"/>
    <category term="Claude Code" scheme="https://mark22013333.github.io/tags/Claude-Code/"/>
    <category term="Best Practice" scheme="https://mark22013333.github.io/tags/Best-Practice/"/>
    <category term="Code Quality" scheme="https://mark22013333.github.io/tags/Code-Quality/"/>
    <category term="Agent" scheme="https://mark22013333.github.io/tags/Agent/"/>
    <content>
      <![CDATA[<p>打開 PR review，看到 800 行 AI 產出的變更。你盯著螢幕三十秒，腦袋浮出那個每次都會出現的問題：這東西能信嗎？</p><p>Thoughtworks 的 Distinguished Engineer Birgitta Bockeler 在 Martin Fowler 網站上丟出了一篇重量級文章（2026-04-02 發表），直接正面回答這個問題。她的答案不是「可以」或「不可以」，而是：<strong>你需要建構一套系統化的控制機制，叫做 Harness。</strong></p><h2 id="Harness-是什麼？一句話講完"><a href="#Harness-是什麼？一句話講完" class="headerlink" title="Harness 是什麼？一句話講完"></a>Harness 是什麼？一句話講完</h2><p>Harness &#x3D; AI Agent 中除了模型本身以外的所有東西。</p><p>人類工程師寫 code 的時候，其實自帶一套「隱性 harness」——多年累積的編碼慣例、對複雜度的直覺痛感、「這段寫太爛了我自己看不下去」的美學標準。Agent 沒有這些。它能吐出幾乎任何程式碼，但沒有品味判斷、沒有組織記憶、沒有那種「雖然能跑但三個月後一定出事」的第六感。</p><p>所以你得把這些隱性知識<strong>外顯化</strong>成可執行的控制系統。人類的角色從「寫程式碼」變成「迭代改進 harness」——harness 的品質直接決定你能對 Agent 輸出建立多少信任。</p><h2 id="雙向控制：事前引導-事後檢查"><a href="#雙向控制：事前引導-事後檢查" class="headerlink" title="雙向控制：事前引導 + 事後檢查"></a>雙向控制：事前引導 + 事後檢查</h2><p>Harness 由兩個方向組成，缺一不可：</p><p><strong>Guides（Feedforward）</strong>：Agent 動手之前先給它教材。像是 AGENTS.md、Skills、編碼慣例文件、OpenRewrite recipes。</p><p><strong>Sensors（Feedback）</strong>：Agent 交出成果之後拿去考試。像是 tests、linters、type checkers、AI code review 指令。</p><p>Bockeler 講了一句蠻精準的話：</p><blockquote><p>「只有 feedback 的 Agent 會不斷重複同樣的錯誤；只有 feedforward 的 Agent 則編碼了規則卻永遠不知道它們是否有效。」</p></blockquote><p>每個方向又分兩種執行類型：<strong>Inferential</strong>（語義分析，靠 AI 判斷，較慢）和 <strong>Computational</strong>（確定性計算，毫秒級，像 linter 和 type checker）。四個象限交叉出來，就是完整的控制矩陣。</p><h2 id="The-Steering-Loop：核心工作流"><a href="#The-Steering-Loop：核心工作流" class="headerlink" title="The Steering Loop：核心工作流"></a>The Steering Loop：核心工作流</h2><p>整篇文章最值錢的概念在這裡——轉向迴圈（Steering Loop）：</p><ol><li>Agent 產出程式碼</li><li>Sensors 檢測到問題</li><li>人類分析問題模式</li><li>改進 feedforward 或 feedback 控制</li><li>同類問題未來不再（或較少）發生</li></ol><p>關鍵洞察是：<strong>Agent 本身也能協助建構這些控制</strong>。讓它寫 structural tests、從重複模式中產生規則草稿、建立 how-to 指南。工程師不再是逐行寫 code 的人，而是不斷調校 harness 的系統設計師。</p><h2 id="三個調控維度"><a href="#三個調控維度" class="headerlink" title="三個調控維度"></a>三個調控維度</h2><p>文章把 harness 比喻為 cybernetic governor（控制論調節器），定義三個維度：</p><p><strong>Maintainability Harness（可維護性）</strong>——最容易做，因為工具成熟。重複程式碼偵測、cyclomatic complexity、缺少測試覆蓋率、architecture drift，這些都有現成的 computational sensors 可以接。inferential 層面則是偵測語義重複、冗餘測試、暴力修復、過度設計。</p><p><strong>Architecture Fitness Harness（架構適應度）</strong>——基於 Fitness Functions 概念。用 Skills 提供效能需求（feedforward），再用 performance tests 提供回饋（feedback）。這層需要你對系統架構有清晰定義才做得起來。</p><p><strong>Behaviour Harness（行為正確性）</strong>——目前最不成熟的維度。Bockeler 很坦白地承認：</p><blockquote><p>「這種方法過度信任 AI 產生的測試，這還不夠好。在行為正確性的 harness 方面，我們還有很多工作要做。」</p></blockquote><p>這段話值得記下來。很多人在吹 AI 能自己寫測試自己驗證，但如果測試本身也是 AI 寫的，你只是在用一個你不完全信任的東西去驗證另一個你不完全信任的東西。</p><h2 id="Keep-Quality-Left：越早擋越便宜"><a href="#Keep-Quality-Left：越早擋越便宜" class="headerlink" title="Keep Quality Left：越早擋越便宜"></a>Keep Quality Left：越早擋越便宜</h2><p>源自 CI&#x2F;CD 的經典概念——品質左移。</p><p><strong>Pre-commit</strong>：快速檢查。Linter、基本測試、code review agent，在 commit 之前就擋掉低級錯誤。</p><p><strong>Post-integration pipeline</strong>：昂貴檢查。Mutation testing、大範圍 code review，放在 CI pipeline 裡跑。</p><p><strong>持續漂移偵測</strong>：dead code detection、test coverage 品質、dependency scanning。不是一次性的，是持續在背景跑的。</p><p>對 AI 產出的 code 來說，左移策略特別重要。Agent 可以在幾分鐘內產出幾百行，如果等到 PR review 才發現方向不對，浪費的不只是 token 費用，還有 reviewer 的腦力。</p><h2 id="真實案例：OpenAI-和-Stripe-怎麼做"><a href="#真實案例：OpenAI-和-Stripe-怎麼做" class="headerlink" title="真實案例：OpenAI 和 Stripe 怎麼做"></a>真實案例：OpenAI 和 Stripe 怎麼做</h2><p>文章引用了兩個大公司的做法：</p><p><strong>OpenAI 團隊</strong>用分層架構，透過 custom linters 和 structural tests 強制執行。定期做「garbage collection」掃描偵測 drift。他們的結論很有意思：「我們現在最困難的挑戰集中在設計環境、反饋迴路和控制系統。」注意，不是模型本身，是 harness。</p><p><strong>Stripe 的 “Minions”</strong> 則是用 pre-push hooks 執行 heuristic-selected linters，強調 shift feedback left。他們用 “Blueprints” 把 feedback sensors 整合到 Agent workflows 裡。</p><p>兩間公司殊途同歸：問題不在 Agent 夠不夠聰明，在於你的控制機制夠不夠完整。</p><h2 id="Harnessability：你的-codebase-準備好了嗎？"><a href="#Harnessability：你的-codebase-準備好了嗎？" class="headerlink" title="Harnessability：你的 codebase 準備好了嗎？"></a>Harnessability：你的 codebase 準備好了嗎？</h2><p>有個容易被忽略的概念是 <strong>Harnessability</strong>——codebase 適合被 harness 控制的程度。</p><p>Strong typing 能啟用 type-checking sensors、清晰的模組邊界能啟用架構約束規則、Framework 的使用能抽象化 Agent 不需要處理的細節。反過來說，一堆 any type、沒有模組邊界、到處都是 magic string 的 codebase，harness 根本建不起來。</p><p>弔詭的是：<strong>Harness 最被需要的地方（legacy codebase），恰恰是最難建構的地方。</strong> 這大概是整篇文章最讓人無奈的洞察。</p><h2 id="Ashby’s-Law-與策略建議"><a href="#Ashby’s-Law-與策略建議" class="headerlink" title="Ashby’s Law 與策略建議"></a>Ashby’s Law 與策略建議</h2><p>Bockeler 引用了 Ashby’s Law——一個調節器必須擁有至少與其管理的系統同等多的多樣性。LLM Agent 能產出幾乎任何東西，所以理論上你的 harness 也需要無限多樣性。</p><p>實務上不可能做到，但有個聰明的折衷：定義明確的服務拓撲（API 服務、Event processing、Data dashboard），針對每種拓撲建立 <strong>Harness Templates</strong>，涵蓋 80% 的使用場景。剩下 20% 再逐案處理。</p><h2 id="五個未解問題"><a href="#五個未解問題" class="headerlink" title="五個未解問題"></a>五個未解問題</h2><p>文章最後坦誠列出五個開放問題，也是接下來整個產業要面對的：</p><ol><li><strong>Coherence</strong>：harness 越長越大，guides 和 sensors 之間怎麼保持同步？</li><li><strong>Trade-offs</strong>：指令跟 feedback 信號衝突的時候，Agent 能做出合理取捨嗎？</li><li><strong>Sensor adequacy</strong>：如果 sensors 從來沒觸發，是品質很高還是偵測根本不夠？</li><li><strong>Evaluation</strong>：需要類似 code coverage 的方法來評估 harness 本身的品質</li><li><strong>Behavioural testing</strong>：目前最大的缺口，過度依賴 AI 產生的測試</li></ol><p>這些問題沒有簡單答案。但至少 Bockeler 把框架立起來了——接下來是整個社群一起填坑的時間。</p><hr><p>如果你正在用 Claude Code、Cursor 或任何 AI coding agent，這篇文章值得從頭讀到尾。它不是在告訴你「AI 很棒趕快用」或「AI 很危險小心」，而是在說：<strong>信任不是開關，是工程。</strong> 你願意在 harness 上投入多少，就能建立多少信任。</p><blockquote><p>原文來源：<a href="https://martinfowler.com/articles/harness-engineering.html">Harness Engineering - Martin Fowler</a><br>參考來源：<a href="https://anthropic.skilljar.com/">Claude Code in Action - Anthropic Academy</a></p></blockquote>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/07/Harness-Engineering-%E5%A6%82%E4%BD%95%E5%B0%8D-Coding-Agent-%E7%9A%84%E7%A8%8B%E5%BC%8F%E7%A2%BC%E5%BB%BA%E7%AB%8B%E4%BF%A1%E4%BB%BB/</id>
    <link href="https://mark22013333.github.io/2026/04/07/Harness-Engineering-%E5%A6%82%E4%BD%95%E5%B0%8D-Coding-Agent-%E7%9A%84%E7%A8%8B%E5%BC%8F%E7%A2%BC%E5%BB%BA%E7%AB%8B%E4%BF%A1%E4%BB%BB/"/>
    <published>2026-04-07T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>打開 PR review，看到 800 行 AI 產出的變更。你盯著螢幕三十秒，腦袋浮出那個每次都會出現的問題：這東西能信嗎？</p>
<p>Thoughtworks 的 Distinguished Engineer Birgitta Bockeler 在 Martin Fowler 網站上丟出了一篇重量級文章（2026-04-02 發表），直接正面回答這個問題。她的答案不是「可以」或「不可以」，而是：<strong>你需要建構一套系統化的控制機制，叫做 Harness。</strong></p>
<h2 id="Harness-是什麼？一句話講完"><a href="#Harness-]]>
    </summary>
    <title>Harness Engineering - 如何對 Coding Agent 的程式碼建立信任</title>
    <updated>2026-04-07T11:05:34.397Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="AI與科技新聞" scheme="https://mark22013333.github.io/categories/AI%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E/"/>
    <category term="資安" scheme="https://mark22013333.github.io/tags/%E8%B3%87%E5%AE%89/"/>
    <category term="AI 新聞" scheme="https://mark22013333.github.io/tags/AI-%E6%96%B0%E8%81%9E/"/>
    <category term="Cursor" scheme="https://mark22013333.github.io/tags/Cursor/"/>
    <category term="Copilot" scheme="https://mark22013333.github.io/tags/Copilot/"/>
    <category term="Fortinet" scheme="https://mark22013333.github.io/tags/Fortinet/"/>
    <category term="Block Goose" scheme="https://mark22013333.github.io/tags/Block-Goose/"/>
    <content>
      <![CDATA[<p>Cursor 把編輯器砍掉重練、GitHub Copilot CLI 多了個會自動抓 bug 的 Critic agent、Jack Dorsey 的 Block 丟出開源 AI agent「Goose」、Fortinet 又爆一個被打到進 CISA 黑名單的零日漏洞，然後 Flowise 那邊直接 CVSS 滿分 10.0。AI 工具越來越強的同時，攻擊面也在同步擴大。</p><h2 id="Cursor-3-發布：編輯器不見了，Agent-才是主角"><a href="#Cursor-3-發布：編輯器不見了，Agent-才是主角" class="headerlink" title="Cursor 3 發布：編輯器不見了，Agent 才是主角"></a>Cursor 3 發布：編輯器不見了，Agent 才是主角</h2><p>4 月 2 日，Cursor 團隊做了一件很大膽的事——把整個 IDE 介面砍掉重寫，從零打造一個「agent-first」的開發環境。傳統的檔案樹、tab 列、編輯區？還在，但已經不是視覺中心了。</p><p>新介面的核心是一個 Agent 面板。你可以同時跑多個 agent 跨不同 repo，本地和雲端無縫切換，甚至從手機、Slack、GitHub、Linear 啟動 agent session。內建 Git 操作（staging、commit、PR 管理），不用再切到終端機。</p><p>背後更有趣的是技術：Cursor 導入了 real-time RL for Composer，用真實使用者互動來訓練模型，最快每五小時就部署一個新 checkpoint。年營收已經突破 20 億美金，Money Forward 的 1,000 多名工程師每天在用，平均每人每週省 15-20 小時。</p><p>這個方向跟 Claude Code 的 terminal-first 和 Codex 的 cloud-first 完全不同。三家各押不同賭注，看誰的路線最後勝出會是今年最精彩的戲碼。</p><blockquote><p>原文來源：<a href="https://cursor.com/blog/cursor-3">Meet the new Cursor</a></p></blockquote><h2 id="GitHub-Copilot-CLI-v1-0-18：Critic-Agent-上線，AI-自己抓自己的-Bug"><a href="#GitHub-Copilot-CLI-v1-0-18：Critic-Agent-上線，AI-自己抓自己的-Bug" class="headerlink" title="GitHub Copilot CLI v1.0.18：Critic Agent 上線，AI 自己抓自己的 Bug"></a>GitHub Copilot CLI v1.0.18：Critic Agent 上線，AI 自己抓自己的 Bug</h2><p>Copilot CLI 在 4 月 4 日的 v1.0.18 更新中加入了一個叫 <strong>Critic</strong> 的新 agent。它的工作很單純：自動審查 Copilot 產出的計畫和複雜實作，找出潛在問題。</p><p>聽起來很像之前講的 Harness Engineering 的概念對吧？讓 AI 自己建構 feedback sensor，在交付之前先自我檢查一輪。v1.0.19（4&#x2F;6 發布）還加了 MCP 設定跨 session 持久化和 OpenTelemetry 監控改善。</p><p>這個更新的意義在於：AI coding 工具正在從「生成程式碼」進化到「生成 + 自我審查」的閉環。如果 Critic 的品質夠好，等於 Copilot 自帶了一個免費的 code reviewer。當然，品質到底夠不夠好，得用了才知道。</p><blockquote><p>原文來源：<a href="https://havoptic.com/tools/github-copilot">GitHub Copilot CLI Changelog</a></p></blockquote><h2 id="Block-推出-Goose：Jack-Dorsey-的開源-AI-Agent"><a href="#Block-推出-Goose：Jack-Dorsey-的開源-AI-Agent" class="headerlink" title="Block 推出 Goose：Jack Dorsey 的開源 AI Agent"></a>Block 推出 Goose：Jack Dorsey 的開源 AI Agent</h2><p>Block（就是 Jack Dorsey 的公司）正式發布 <strong>Goose</strong>——一個開源的 AI agent 框架，定位是「你機器上的本地 AI agent」。不綁定特定 LLM，支援多模型配置，整合 MCP server，有桌面 App 也有 CLI。</p><p>Goose 能做的事包括從零建立專案、寫程式碼並執行、除錯、編排工作流、呼叫外部 API，全自動。因為是本地執行，資料不離開你的機器。</p><p>有意思的是 Goose 跟 MCP 的關係。根據 Arcade.dev 的報導，Goose 是最早影響 MCP 設計方向的開源 agent 之一——MCP 的很多設計決策其實是從 Goose 的實際使用經驗中提煉出來的。現在 MCP 已經捐給 Linux Foundation AAIF，Goose 等於是這個生態系的元老級成員。</p><p>開源、本地優先、LLM 不鎖定——如果你對 Claude Code 的訂閱模式或 Cursor 的定價有意見，Goose 是個值得關注的替代選項。</p><blockquote><p>原文來源：<a href="https://block.xyz/inside/block-open-source-introduces-codename-goose">Block Open Source introduces Goose</a></p></blockquote><h2 id="FortiClient-EMS-CVE-2026-35616：CVSS-9-1-零日漏洞，CISA-給三天修"><a href="#FortiClient-EMS-CVE-2026-35616：CVSS-9-1-零日漏洞，CISA-給三天修" class="headerlink" title="FortiClient EMS CVE-2026-35616：CVSS 9.1 零日漏洞，CISA 給三天修"></a>FortiClient EMS CVE-2026-35616：CVSS 9.1 零日漏洞，CISA 給三天修</h2><p>Fortinet 發布緊急修補：FortiClient EMS（企業端點管理伺服器）被發現零日漏洞 CVE-2026-35616，CVSS 9.1。這是一個 pre-authentication API 存取繞過漏洞，未經認證的攻擊者可以直接提升權限，執行未授權操作。</p><p>時間線很嚇人：watchTowr 的偵測器在 3&#x2F;31 就發現攻擊活動，比 Fortinet 4&#x2F;4 發布公告還早四天。CISA 在 4&#x2F;6 把它加入 KEV 目錄，聯邦機構必須在 4&#x2F;9 前完成修補——只給三天。</p><p>拿到 EMS 伺服器的控制權意味著什麼？攻擊者可以修改端點配置、推送惡意政策、橫向移動到整個企業網路。影響版本是 7.4.5 到 7.4.6，目前只有 hotfix，正式修補版 7.4.7 還在路上。</p><p>Fortinet 今年已經不是第一次出事了。用他們設備的企業，這週請優先排這張工單。</p><blockquote><p>原文來源：<a href="https://thehackernews.com/2026/04/fortinet-patches-actively-exploited-cve.html">Fortinet Patches Actively Exploited CVE-2026-35616</a></p></blockquote><h2 id="Flowise-AI-平台-CVE-2025-59528：CVSS-10-0-滿分，又一個-AI-框架被打穿"><a href="#Flowise-AI-平台-CVE-2025-59528：CVSS-10-0-滿分，又一個-AI-框架被打穿" class="headerlink" title="Flowise AI 平台 CVE-2025-59528：CVSS 10.0 滿分，又一個 AI 框架被打穿"></a>Flowise AI 平台 CVE-2025-59528：CVSS 10.0 滿分，又一個 AI 框架被打穿</h2><p>Flowise，一個蠻多人在用的開源 AI 工作流平台，被爆出一個 CVSS 10.0 的滿分漏洞 CVE-2025-59528。這是一個 code injection 弱點，攻擊者可以直接在 server 上執行任意程式碼，達到 RCE（遠端程式碼執行）。</p><p>CVSS 10.0 是什麼概念？滿分，不能再高了。遠端可利用、不需認證、影響範圍完整、機密性完整性可用性全部淪陷。</p><p>加上前幾天報導的 Langflow CVE-2026-33017（CVSS 9.3），AI agent 基礎設施的資安問題已經不是個案了。MLflow 也有一個 CVSS 10.0 的 command injection（CVE-2025-15379），PraisonAI 的 execute_code() 函數也被發現可以執行攻擊者控制的 Python code。</p><p>這些工具的共同特徵：<strong>為了讓 AI 方便操作而開放了太多執行權限，結果攻擊者也方便了。</strong> 用 AI workflow 平台的團隊，現在該認真檢查一下自己的部署有沒有暴露在公網上。</p><blockquote><p>原文來源：<a href="https://securityonline.info/weekly-vulnerability-digest-april-2026-chrome-zero-day-ai-security/">Weekly Vulnerability Digest April 2026</a></p></blockquote><h2 id="Codex-CLI-拿到-GPT-5-3-Codex-Spark：1-000-TPS-即時編碼"><a href="#Codex-CLI-拿到-GPT-5-3-Codex-Spark：1-000-TPS-即時編碼" class="headerlink" title="Codex CLI 拿到 GPT-5.3-Codex-Spark：1,000+ TPS 即時編碼"></a>Codex CLI 拿到 GPT-5.3-Codex-Spark：1,000+ TPS 即時編碼</h2><p>OpenAI 的 Codex CLI 迎來重大升級：GPT-5.3-Codex-Spark 現在可以直接在 CLI 裡使用。這個模型的賣點是速度——每秒產出超過 1,000 個 token，比前代 GPT-5.2-Codex 快 25%，同時保有 frontier 等級的 coding 能力和更強的推理。</p><p>另外 Codex CLI 還加了 Windows sandbox proxy-only networking（OS 層級的出口規則）、ChatGPT device-code sign-in（CLI 環境下的登入改善）、和 dynamic bearer token refresh。</p><p>1,000 TPS 是什麼體感？大概就是你按下 Enter 的瞬間，整個函數已經寫完了。延遲感幾乎消失。當然 benchmark 速度跟實際使用體驗之間的落差向來不小，但如果真的接近這個數字，對開發者的工作流會是蠻大的改變。</p><blockquote><p>原文來源：<a href="https://daily1bite.com/en/blog/ai-tools/openai-codex-cli-april-2026-update">OpenAI Codex CLI April 2026 Update</a></p></blockquote><hr><p>AI coding 工具這週集體進化：Cursor 重寫介面、Copilot 加 Critic、Block 開源 Goose、Codex 衝到 1K TPS。與此同時，FortiClient EMS 和 Flowise 提醒我們——工具跑得再快，如果安全沒跟上，跑的方向可能是懸崖。</p>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/07/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260407/</id>
    <link href="https://mark22013333.github.io/2026/04/07/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260407/"/>
    <published>2026-04-07T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>Cursor 把編輯器砍掉重練、GitHub Copilot CLI 多了個會自動抓 bug 的 Critic agent、Jack Dorsey 的 Block 丟出開源 AI agent「Goose」、Fortinet 又爆一個被打到進 CISA 黑名單的零日漏洞，然後 Flowise 那邊直接 CVSS 滿分 10.0。AI 工具越來越強的同時，攻擊面也在同步擴大。</p>
<h2 id="Cursor-3-發布：編輯器不見了，Agent-才是主角"><a href="#Cursor-3-發布：編輯器不見了，Agent-才是主角" class="headerlink" title=]]>
    </summary>
    <title>AI 與科技新聞摘要 - 2026/04/07</title>
    <updated>2026-04-07T11:06:44.684Z</updated>
  </entry>
  <entry>
    <author>
      <name>Cheng®</name>
    </author>
    <category term="AI與科技新聞" scheme="https://mark22013333.github.io/categories/AI%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E/"/>
    <category term="OpenAI" scheme="https://mark22013333.github.io/tags/OpenAI/"/>
    <category term="資安" scheme="https://mark22013333.github.io/tags/%E8%B3%87%E5%AE%89/"/>
    <category term="NVIDIA" scheme="https://mark22013333.github.io/tags/NVIDIA/"/>
    <category term="AI 新聞" scheme="https://mark22013333.github.io/tags/AI-%E6%96%B0%E8%81%9E/"/>
    <category term="GPT-5.5" scheme="https://mark22013333.github.io/tags/GPT-5-5/"/>
    <category term="Mbed TLS" scheme="https://mark22013333.github.io/tags/Mbed-TLS/"/>
    <content>
      <![CDATA[<p>天氣冷，但矽谷的火鍋可是滾得飛快。OpenAI 的 GPT-5.5 完成預訓練、NVIDIA 狂押 AI 晶片、ChatGPT 寫入功能全開，同時資安界也傳出好幾個有夠猛的漏洞。一邊是生成式 AI 的新高峰，一邊是全球數十億台 IoT 裝置在踩坑。這週的科技圈真的就是這樣卷——沒有人能獨善其身。</p><h2 id="GPT-5-5「Spud」完成預訓練，Q2-發布在即"><a href="#GPT-5-5「Spud」完成預訓練，Q2-發布在即" class="headerlink" title="GPT-5.5「Spud」完成預訓練，Q2 發布在即"></a>GPT-5.5「Spud」完成預訓練，Q2 發布在即</h2><p>OpenAI 的下一代旗艦模型 GPT-5.5（內部代號「Spud」）已經完成預訓練，目前進入安全評估和紅隊測試階段。根據釋出的資訊，Q2 2026 將正式向公眾宣布。同時，GPT-4 Mini 的改進版本也已開始在 ChatGPT Free 和 Go 用戶之間推出。</p><p>從技術角度來看，GPT-5.5 代表著 OpenAI 在訓練效率和模型容量上的新里程碑。去年的爭議主要集中在訓練成本和資源消耗，今年看起來他們找到了更優雅的解法。預計這次發布會直接對 Claude、Gemini 和其他競爭對手形成壓力。</p><blockquote><p>原文來源：<a href="https://releasebot.io/updates/openai">OpenAI Updates</a></p></blockquote><h2 id="NVIDIA-狂卷-AI-晶片，今年遊戲顯卡叫停"><a href="#NVIDIA-狂卷-AI-晶片，今年遊戲顯卡叫停" class="headerlink" title="NVIDIA 狂卷 AI 晶片，今年遊戲顯卡叫停"></a>NVIDIA 狂卷 AI 晶片，今年遊戲顯卡叫停</h2><p>重磅消息：NVIDIA 在 2026 年完全放棄遊戲 GPU 新品發布，全力集中在 AI 晶片生產。其中「Vera Rubin」平台已進入滿產狀態，搭載 7 款不同的 AI 加速晶片，預計下半年透過 AWS、Google Cloud、Azure 和 OCI 供應。</p><p>有點扎心的是，NVIDIA 這步棋形同宣告：遊戲市場已經不是他們的主戰場了。從 Tesla 到 Meta，再到 OpenAI，AI 基礎設施的訂單已經堆到月球。相比之下，遊戲玩家的 RTX 4090 需求簡直形同虛設。這對 AMD 的 EPYC AI 來說或許是機會，但現在恐怕為時已晚。</p><blockquote><p>原文來源：<a href="https://www.technobezz.com/news/nvidia-reportedly-skips-gaming-gpu-releases-in-2026-to-prioritize-ai-chips">NVIDIA AI Chip Strategy</a></p></blockquote><h2 id="ChatGPT-寫入功能全開，Box、Notion、Linear、Dropbox-都能改"><a href="#ChatGPT-寫入功能全開，Box、Notion、Linear、Dropbox-都能改" class="headerlink" title="ChatGPT 寫入功能全開，Box、Notion、Linear、Dropbox 都能改"></a>ChatGPT 寫入功能全開，Box、Notion、Linear、Dropbox 都能改</h2><p>ChatGPT 的應用整合能力今天又升級了。現在用戶不只能讀取 Box、Notion、Linear 和 Dropbox 的內容，還能直接在 ChatGPT 對話窗口中修改——建立 Linear 任務、更新 Notion 文件、管理 Dropbox 檔案，全部搞定。</p><p>這個更新的意義在於它真正把 ChatGPT 變成了工作流中樞。以前的「讀」只是資料檢索，現在的「寫」才是生產力倍增。想像一下工程師不用切分頁面就能審查 PR、記錄會議筆記、分配任務——這就是為什麼每間公司現在都在拼命做 AI 整合。</p><blockquote><p>原文來源：<a href="https://releasebot.io/updates/openai/chatgpt">ChatGPT Integration Updates</a></p></blockquote><h2 id="Mbed-TLS-CVSS-9-8-重大漏洞，IoT-裝置全線陷危"><a href="#Mbed-TLS-CVSS-9-8-重大漏洞，IoT-裝置全線陷危" class="headerlink" title="Mbed TLS CVSS 9.8 重大漏洞，IoT 裝置全線陷危"></a>Mbed TLS CVSS 9.8 重大漏洞，IoT 裝置全線陷危</h2><p>安全界的警報：Mbed TLS 3.6.5 以下版本爆出重大漏洞（CVE-2026-34875），CVSS 分數高達 9.8。這套 TLS 庫廣泛用於 IoT 裝置、嵌入式系統和所有 ARM 處理器平台——也就是說，全球數十億台裝置都在危急線上。</p><p>一個 CVSS 9.8 的 TLS 漏洞意味著什麼？中間人攻擊、流量竊聽、密鑰洩露——所有最糟的場景都在檯面上。特別恐怖的是，很多企業的 IoT 設備根本無法快速更新韌體。這波漏洞真的會在未來幾個月引爆一堆後端事件。</p><blockquote><p>原文來源：<a href="https://www.thehackerwire.com/vulnerability/CVE-2026-34875/">Mbed TLS CVE-2026-34875</a></p></blockquote><h2 id="Payload-CMS-密碼重設漏洞，CVSS-9-1-直接RCE"><a href="#Payload-CMS-密碼重設漏洞，CVSS-9-1-直接RCE" class="headerlink" title="Payload CMS 密碼重設漏洞，CVSS 9.1 直接RCE"></a>Payload CMS 密碼重設漏洞，CVSS 9.1 直接RCE</h2><p>Payload CMS（熱門無頭 CMS 框架）被爆出密碼恢復流程存在重大漏洞（CVE-2026-34751），CVSS 9.1。未經授權的攻擊者可以直接冒充用戶執行任意操作。官方已在 3.79.1 版本修補。</p><p>這類密碼重設漏洞特別致命，因為它通常是帳號安全的最後防線。Payload CMS 在新創和中小企業中使用度不低，如果伺服器還沒升級，現在已經是緊急狀態。趕快查一下自己的依賴版本吧，踩坑的代價真的很貴。</p><blockquote><p>原文來源：<a href="https://www.thehackerwire.com/vulnerability/CVE-2026-34751/">Payload CMS CVE-2026-34751</a></p></blockquote><hr><p>這週的新聞節奏就是這樣——一邊是 AI 的新高度，一邊是資安的新洞窟。GPT-5.5 快來了，NVIDIA 已經贏了，但同時 IoT 和 CMS 世界著火了。對開發者來說，該慶祝新模型，也該焦慮新漏洞。也許這就是 2026 的日常吧。</p>]]>
    </content>
    <id>https://mark22013333.github.io/2026/04/06/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260406/</id>
    <link href="https://mark22013333.github.io/2026/04/06/AI-%E8%88%87%E7%A7%91%E6%8A%80%E6%96%B0%E8%81%9E%E6%91%98%E8%A6%81-20260406/"/>
    <published>2026-04-06T00:30:00.000Z</published>
    <summary>
      <![CDATA[<p>天氣冷，但矽谷的火鍋可是滾得飛快。OpenAI 的 GPT-5.5 完成預訓練、NVIDIA 狂押 AI 晶片、ChatGPT 寫入功能全開，同時資安界也傳出好幾個有夠猛的漏洞。一邊是生成式 AI 的新高峰，一邊是全球數十億台 IoT 裝置在踩坑。這週的科技圈真的就是這樣卷——沒有人能獨善其身。</p>
<h2 id="GPT-5-5「Spud」完成預訓練，Q2-發布在即"><a href="#GPT-5-5「Spud」完成預訓練，Q2-發布在即" class="headerlink" title="GPT-5.5「Spud」完成預訓練，Q2 發布在即"></a>GPT-5.5「Spud]]>
    </summary>
    <title>AI 與科技新聞摘要 - 2026/04/06</title>
    <updated>2026-04-06T14:07:23.211Z</updated>
  </entry>
</feed>
