Summary

This article explains how to decouple a Claude Code skill ecosystem so it can run outside Claude Code — via a web UI, API, or automated pipeline. Using a cooking metaphor, it frames Skills as recipes (markdown that defines workflow), Agents as the head chef/manager that decides and orchestrates, and Subagents as disposable line cooks with isolated context. Claude Code silently handles skill loading/triggering, tool provision, and shared context; to leave it you must rebuild the orchestration layer, with three options: use the official Claude Agent SDK, build a lightweight custom orchestrator on the Anthropic API, or wrap each skill as an MCP server.

本文解釋如何將 Claude Code 的 skills 生態解耦,使其能透過 Web 介面、API 或自動化流程在 Claude Code 之外運行。作者以做菜比喻:Skills 是菜譜(定義流程的 markdown)、Agents 是決策調度的主廚/經理、Subagents 是上下文隔離、用完即走的臨時工。Claude Code 在背後處理 skill 的自動加載觸發、工具供給與共享上下文;要脫離它,就必須重建編排層,方案有三:直接用官方 Claude Agent SDK、在 Anthropic API 上自建輕量編排層,或把每個 skill 封裝成 MCP Server。

Key Points

  • Skills are markdown documents (not code) that define a workflow; their description field drives automatic triggering inside Claude Code.
  • Claude Code does three things behind the scenes: auto-loads/triggers skills from .claude/skills/, provides built-in tools (Read/Edit/Execute/Grep), and manages a shared file system, git repo, and conversation context.
  • The Claude Agent SDK’s core idea is “give Claude a computer”; it splits into three layers — user (web/API/CLI), orchestration (main Agent + Skills), and execution (Subagents + Tools + file system).
  • Decoupling difficulty concentrates in the orchestration layer: making the main Agent understand intent, select skills, and coordinate execution.
  • Three migration paths: (1) Claude Agent SDK — official, complete, some conversion cost; (2) lightweight self-built on Anthropic tool use — flexible but you handle context/error/subagent logic; (3) MCP servers — standardized and reusable but heavier to run.
  • Practical concerns when decoupling: cross-skill data passing via the file system, error/retry strategies, and token cost control via compaction.

Insights

The article’s most useful framing is that Claude Code’s “magic” is really invisible infrastructure — loading, tooling, and shared context — so the engineering effort of going to production is precisely the cost of replicating that infrastructure, concentrated in the orchestration layer. The recipe/chef/line-cook metaphor cleanly separates declarative knowledge (Skills) from decision-making (Agent) from disposable execution (Subagents), which is the same separation bot_vault’s own skill files rely on. The three-option tradeoff (SDK vs. custom vs. MCP) is a reusable decision framework for anyone productizing an agent prototype.

Connections

Raw Excerpt

Skills 定义流程 → Agent 执行调度 → Subagents 完成任务