AI09 · Build AI Extensions 詳細 ROADMAP

計畫文件,不會被 Quartz 渲染。 回主 roadmap → ai/ROADMAP.md


章節目標

「你擴展別人的 AI」——這章是給 plugin / SDK / extension 開發者的。寫東西讓 Claude / Cursor / Copilot / 任何 MCP client 能用你的能力。

跟其他章分工

  • AI08 Build Applications = 你是 AI 服務(user 呼叫你的 app)
  • 本章 = 你擴展別人的 AI(別人的 AI 呼叫你的能力)
  • AI05 Agent = Agent 概念(patterns / memory);本章是動手寫 extension
  • AI06 Coding Assistants = 使用 Claude Code / Cursor;本章是擴展這些工具

🌱 基本介紹

#主題SlugStage大綱
01Build AI Extensions 全景01-build-extensions-landscape🌱三種擴展點:Claude 生態(Skills / Subagents / Slash / Hooks)/ 通用標準(MCP / Tool Schema)/ IDE 擴展(Cursor rules / Windsurf / VSCode extensions)

❓ 為什麼需要

#主題SlugStage大綱
02為什麼寫 Extension 比寫 App 更常見02-why-extension-over-app🌱多數人用 Claude / Cursor 已有;擴展現成工具 ≥ 從零寫 app 的 ROI;share / distribution 模式
03為什麼 MCP 出現會改變 AI 生態03-why-mcp-matters🌱不同 AI client 以前各有 tool plugin;MCP 是 USB-C 通用標準;2024-2026 廣泛採用的影響
04為什麼 Claude Skill / Subagent 是新範式04-why-claude-skill-paradigm🌱靜態 RAG 是「塞 context」;Skill / Subagent 是「按需加載 + 獨立思維」;改變 agent 設計 mental model

🕰️ 演進

#主題SlugStage大綱
05AI Extension 演進驅動力05-extension-evolution-drivers🌱Plugin(ChatGPT Plugins 2023,死)撞普及度撞牆 → GPTs 自訂;Function Calling(OpenAI)撞 vendor lock-in 撞牆 → MCP 標準化;靜態 prompt library 撞動態任務撞牆 → Claude Skill auto-loading;single context 撞任務切換撞牆 → Subagent 組合

🧠 知識型

F09-A Claude 生態擴展

#主題SlugStage大綱
06Claude Skill 格式從零06-claude-skill-from-zero🌱Skill frontmatter 設計、auto-load 觸發條件、scripts/ 資源、版本管理;寫第一個 skill(例如 PDF extractor)
07Subagent 設計與組合07-subagent-design🌱單一職責原則套用到 agent;Subagent 命名 / system prompt / tool 允許清單;parent-subagent 資料傳遞;Subagent 組合 workflow
08Slash Command Authoring08-slash-command-authoring🌱Claude Code slash command 格式;arguments / context 取得;跟 SKILL / subagent 協作;公司內部 slash library 治理
09Hooks 設計09-hooks-design🌱Pre-tool / post-tool / user-prompt-submit / stop hooks;什麼場景值得寫 hook;不要讓 hook 慢 IO;安全考量
10CLAUDE.md 系統化設計10-claude-md-systematic🌱個人 / 專案 / 組織三層 CLAUDE.md;常用規則模式;memory system 整合;避免 CLAUDE.md 爆炸

F09-B 通用 AI 能力擴展

#主題SlugStage大綱
11Custom Tool / Function Schema 設計11-custom-tool-schema🌱JSON Schema 最佳實踐;description 寫得 model 能抓意圖;parameter 設計防 model 亂填;error return 的 format
12MCP Server 從零12-mcp-server-from-zero🌱stdio vs SSE transport;tool / resource / prompt 三種 primitive;Python / TypeScript SDK 範例;publish 到 MCP registry
13MCP vs Tool Use vs Plugin 選型13-mcp-vs-tool-vs-plugin🌱三種擴展方式的定位;什麼場景選哪個;lock-in / portability / 複雜度權衡
14Agent Framework 自建 vs 用現成14-framework-build-vs-use🌱LangChain / LlamaIndex 上層 vs OpenAI Assistants / Anthropic Claude API 直接呼叫;build 自己的 orchestration 什麼時候值得

F09-C IDE / Editor 擴展

#主題SlugStage大綱
15Cursor Rules 深入15-cursor-rules-deep🌱.cursorrules / .cursor/rules/*.mdc;globs / alwaysApply / description;跟 Claude Code .claude/ 對比
16Windsurf / Continue 擴展16-windsurf-continue-extensions🌱Windsurf workflows;Continue config 擴展;跟 Claude Code / Cursor 對比
17VSCode / JetBrains AI Extension 開發17-ide-ai-extension-dev🌱自己寫 AI extension 給 IDE;整合公司專屬 LLM backend;enterprise distribution

🔧 小實作注意事項

#主題SlugStage大綱
18寫第一個 Claude Skill18-first-claude-skill🌱15 分鐘內寫一個實用 skill(PDF 摘要 / 會議記錄整理 / 程式碼重構檢查);frontmatter 設計;auto-load 驗證
19寫第一個 MCP Server19-first-mcp-server🌱Python / TypeScript 從零寫一個 GitHub / Notion / local file MCP;連到 Claude Desktop 驗證
20寫第一個 Subagent Workflow20-first-subagent-workflow🌱設計一個 4-subagent workflow(例如:研究 + 寫作 + 審稿 + 發布);context 傳遞 / 失敗處理
21建自己的 AI 助理(openclaw)21-build-your-assistant🌿吸收自舊 07-2-build-your-bot.md;指向 openclaw 專案

💣 Anti-pattern

#主題SlugStage大綱
22Build Extensions Anti-patterns22-extensions-antipatterns🌱Skill 寫太廣(永遠不 trigger 或一直 trigger);Subagent 設計成 mini-monolith(違反單一職責);Hook 慢 IO 導致 UX 爛;Tool schema description 含糊 model 亂呼叫;MCP server 不驗證輸入;Skill / MCP 名字撞已有的;version 沒管理升級破壞既有用法

🧰 對應檢查工具

#主題SlugStage大綱
23Build Extensions 工具23-extensions-tooling🌱Claude 生態: Claude Agent SDK / Claude Code / Claude Desktop;MCP: MCP Inspector / MCP CLI / modelcontextprotocol.io;Schema: JSON Schema validator;IDE: VSCode Extension Toolkit / JetBrains Platform SDK;Test: Anthropic Claude API sandbox / MCP tester

📎 補充

#主題SlugStage大綱
S01openclaw 架構解剖s01-openclaw-architecture🌱自架個人 AI agent 平台的架構決策;skills / subagents / MCP 整合設計
S02Extension 生態商業化s02-extension-monetization🌱Marketplace(Cursor / Anthropic SDK 生態);pricing model;distribution 策略

章節進度統計

  • 知識主題:23 項 + 2 補充 = 25 項
  • 🌿 growing:1(建自己的 AI 助理 既有)
  • 🌱 seed:24

跨系列連結

  • → AI05 Agent(Agent 概念,本章是擴展實作)
  • → AI06 Coding Assistants(使用 Claude Code,本章是擴展)
  • → AI07 Methodology(extension 設計方法論)
  • → AI08 Build Applications(反方向:你建服務)
  • tools/openclaw(實戰專案)
  • common/tooling/git/(extension repo 管理)
  • management/project-mgmt/(extension 版本 / 發布管理)