REVIT_MCP 的核心架構:把 9 個系統、72 個 Domain、166 個工具按職責分到三層。Skill 管「何時觸發」、CLAUDE.md 管「跨 AI Client 橋接」、Domain 管「不可協商的知識」。本頁同時澄清「MCP ≠ Skill」的常見誤解。
社群常爭論「Skill 會不會取代 MCP」。答案是不會——MCP 是廚房(給 AI 能力),Skill 是食譜(給 AI 知識)。兩者缺一不可。
"Tools are designed to be model-controlled, meaning that the language model can discover and invoke tools automatically."
(工具被設計為模型控制的,意即語言模型可以自動發現並調用工具。)
— MCP Specification: Tools
"Skills load on-demand and eliminate the need to repeatedly provide the same guidance across multiple conversations."
(技能按需載入,消除了在多次對話中重複提供相同指引的需要。)
— Anthropic: Agent Skills Overview
| 維度 | MCP Tool | Agent Skill |
|---|---|---|
| 角色 | 能力層(DO)— 廚房 | 知識層(KNOW)— 食譜 |
| 控制者 | LLM 自動選擇 | 關鍵字觸發 → 按需載入 |
| 粒度 | 單一原子操作 | 多步驟工作流編排 |
| 需要基礎設施 | 是(Server process) | 否(純檔案) |
"We'll also explore how Skills can complement Model Context Protocol (MCP) servers by teaching agents more complex workflows that involve external tools and software."
(我們也將探討 Skill 如何補充 MCP 伺服器,透過教導 Agent 涉及外部工具的更複雜工作流程。)
— Anthropic Engineering Blog
"Skills describe the workflow. MCP provides the runner... Saying Skills killed MCP is like saying GitHub Actions killed Bash."
(Skill 描述工作流程。MCP 提供執行器……說 Skill 殺死了 MCP,就像說 GitHub Actions 殺死了 Bash。)
— Block/Goose Team
override_element_graphics 真的去改 Revit model 顏色,query_elements_with_filter 真的查 Revit 資料庫。
這些操作需要 WebSocket、Revit API、Transaction。Skill 做不了這些。
/fire-safety-check 告訴 AI「先查參數名 → 再列時效等級 → 再篩選 → 最後上色」。
這是知識和順序,不是能力。MCP 不管這些。
每一層各自管獨立職責,互不重複。理解這三層 = 理解專案結構的全部。
放在 .claude/skills/{name}/SKILL.md。關鍵字觸發後按需載入,告訴 AI「該做什麼步驟、引用哪個 Domain、呼叫哪些 MCP Tool」。
本專案目前 50 個 Skill。
專案根目錄的單一 source of truth。多 AI Client(Claude / Gemini / Copilot / Claude Code)都讀同一份,避免重複維護。含 AI Guard Rails、Domain 觸發表、Build Commands。
GEMINI.md 是 1 行指向 CLAUDE.md 的薄殼。
放在 domain/*.md。不可協商的限制——法規、SOP、計算公式、邊界案例。被多個 Skill 引用(複用),是專案的「資產投資」。
本專案目前 72 個 Domain。
BIM 的知識是共用的——防火法規同時被消防檢查、走廊分析、建築合規引用。Domain 獨立於 Skill 存在,是因為知識不應該重複在每個 Skill 裡。
domain/fire-rating-check.md 同時被以下 3 個 Skill 引用:
/fire-safety-check — 消防安全檢討(防火時效視覺化)/corridor-analysis — 走廊防火分析(隔間時效要求)/building-compliance — 建築法規檢討(防火構造合規)如果防火法規條文更新,只動 domain/fire-rating-check.md 一處,三個 Skill 自動拿到新內容。這就是「Domain 是本體」(P5)的具體含義。
Skill / CLAUDE.md / Domain 是「邏輯三層」,下面這個是「技術四層」——AI Client → MCP Server → Revit Add-in → Revit API。
AI Client (Claude Desktop / Gemini CLI / VS Code Copilot / Claude Code)
↓ stdio
MCP Server (Node.js/TypeScript) — MCP-Server/src/index.ts
↓ WebSocket (ws://localhost:8964)
Revit Add-in (C# .NET 4.8) — MCP/Application.cs
↓ ExternalEventManager (UI thread)
CommandExecutor → Revit API
第 5 種「embedded」選項——WPF chat window 內嵌在 Revit Add-in,直接 call Gemini API,bypass MCP Server。
check_smoke_exhaust_windows 比 FilteredElementCollector.OfCategory(...) 友善 100 倍)。本專案支援多個 AI Client,採用「不同入口、同一目的地」規範。
| 項目 | Claude Code | Gemini CLI | VS Code Copilot |
|---|---|---|---|
| 行為指引 | CLAUDE.md | GEMINI.md → CLAUDE.md | .github/copilot-instructions.md |
| Skills | .claude/skills/SKILL.md |
.gemini/skills/SKILL.md |
instructions 引導 |
| Domain 文件 | 共用 domain/ |
共用 domain/ |
共用 domain/ |
| MCP Tools | 共用 166 個工具 | 共用 166 個工具 | 共用 166 個工具 |
| Event Log | 共用 log/ |
共用 log/ |
共用 log/ |
SKILL.md 格式遵循 Agent Skills 開放標準(YAML frontmatter + Markdown body),Claude Code 與 Gemini CLI 皆原生支援。
GEMINI.md 內容就是 CLAUDE.md)。Skill 層遵守 Anthropic 制定的 Agent Skills 開放標準(YAML frontmatter + Markdown),任何支援標準的 AI Client 都能用。Domain / MCP / Log 全跨 client 共用。