Chapter 13 · Domain 8(本章 skill 权重合计 4.1%)
Agentic Customization先判断要给能力、连接还是方法,再选 built-in、custom、Skill 或 MCP
TS 8.3 不是四个名词的背诵题,而是 carrier(承载体)取舍:现成动作能否覆盖、代码由谁执行、是否需要 live external access、是否要跨应用复用,以及知识应当何时进入 context。本章用一张四方表把这些判断压到同一组轴上。
一、先拆层:三类给动作,一类给方法
Built-in Tools 是产品表面已经提供的动作;custom Tools 是应用定义 contract、由自己的代码执行的动作;MCP 是把 external system 的 tools 与 data access 经 server 接进来。Skills 不在同一执行层:它把 instructions、knowledge 与 workflow 写进 SKILL.md,供 Claude 在相关时读取和遵循。把 Skill 当 API client,或把 tool 当长篇作业手册,都是先在 P4 上住错了载体。
题干先问 判断方向
只是要读写文件、搜文本或访问公开 Web? 先看当前 product surface 的 built-in set;已覆盖就不要重复造 integration。
一个应用已有 handler,要让模型按 schema 请求调用? 定义 custom client tool;模型发 structured request,应用执行并回传 result。
反复粘贴 checklist、domain guide 或 multi-step procedure? 写 Skill,让 description 负责发现、正文按需加载。
要接 live database / API,并跨应用共享、独立维护? 建 MCP server;connection 与 authentication 留在 server 一侧。
样题 Q3 的硬边界 — built-in tools 不会自动触达任意内部 API。名字叫 built-in,不等于它拥有组织内部每个 endpoint 的连接、authentication 与业务 contract;看到这种偷换,先用 P5 删掉。
二、Built-in inventory:先锁定 product surface
「built-in」不是跨所有 Claude 界面的统一清单。下面只列当前官方 Claude Managed Agents toolset:agent configuration 决定哪些可用;纳入完整 toolset 时默认启用全部,configs 可逐项禁用、覆盖设置或配置 approval policy。题干换成别的 surface 时,不能把这八项无条件搬过去。
Built-in 官方能力边界
bash在 shell session 中执行 Bash commands。
read读取 sandbox filesystem 的文件。
write向 sandbox filesystem 写文件。
edit对文件执行 string replacement。
glob用 glob patterns 做快速文件匹配。
grep用 regex patterns 搜索文本。
web_fetch从 URL 抓取 content。
web_search搜索 Web information。
这张 inventory 表只回答「现成动作是什么」,不替你做权限设计。若 workload 只需 read、glob、grep,就应在 configuration 中关掉不需要的 shell、write、edit 与 Web 能力;若需求是内部库存 API,即使 web_fetch 看起来最接近,也不能跳过该系统自己的 connection、authentication 与 operation schema。
三、核心四方取舍表
下面只保留四列都能由 blueprint 或 verified behavior 支撑的轴。读表时先横向看同一行,不要把「有没有代码」「是不是可复用」「是否省 context」混成一个模糊的好坏排序。
判断轴 Built-in Tools Custom Tools Skills MCP
交付什么
产品表面预置的具体动作;Managed Agents 的当前集合见上表。
应用定义 operation 与 return contract,模型据此请求调用。
SKILL.md 中的 instructions、knowledge 与 workflow。
面向 external tools、databases 与 APIs 的标准化 tools / data access。
执行边界
由当前 surface 的 toolset 提供并在 agent session 中调用;每项只做 inventory 声明的动作。
模型只发 structured request;你的 application code 执行,再把 result 送回 session。
Claude 读取 Markdown instructions 并按其工作;Skill 本身不是 external-system connection。
Server 处理 external-system connection 与 authentication,并提供 purpose-built tools。
发现 / 加载
在 agent configuration 选择;完整 toolset 纳入后可用 configs 收窄。
Client tool 定义放 API request 顶层 tools,参数 contract 用 JSON Schema。
默认 session start 只加载 descriptions,使用时才加载 full content。
Claude Code 先加载 tool names 与 server instructions,full JSON schemas 按需延迟。
最强适配信号
需求恰好落在当前清单;若要 arbitrary internal API,就超出边界。
单一应用拥有 handler 与 lifecycle,且没有跨应用共享、独立维护的硬约束。
同一 checklist、reference 或 multi-step procedure 被反复粘贴,需要按相关性调用。
live external system 要被多个 Claude applications 共享,并由 server 独立维护。
Context cost 不能被简化成「Skill 免费、MCP 很贵」。Skill description 默认先进入 session,full body 才按需加载;MCP 先带 names / server instructions,full schemas 延迟。Custom tool 的 schema 进入 request,而请求里的 tool definitions 本来就算 context window。真正的动作是只开放当前任务需要的能力,并让说明材料留在按需载体里;不是给四类贴一个永久的 token 排名。
四、从 use case 落到 carrier
做题可以沿一条短链走:先判断需求是 action / live data 还是 knowledge / procedure 。后者优先 Skill;前者先查 built-in inventory。未覆盖时,再问谁拥有 execution:单一应用已经有 handler,custom tool 通常是更薄的承载;多个应用要共享且 connector 要独立维护,MCP 才直接命中 P4。
Use case signal 优先选择 为什么
在 Managed Agents sandbox 内读文件、regex 搜索、跑已有 test command Built-in 现有 read / grep / bash 已直接覆盖;按最小权限收窄。
一个 API service 已有 lookup_order(),只需让模型结构化请求 Custom tool 应用保留执行、validation 与 error handling ownership。
团队每次 review 都粘贴同一套 checklist 与 output procedure Skill SKILL.md 保存 procedure,description 做相关性触发,body 按需加载。
Inventory API 要供 Claude Code、Desktop 与另一 agent application 共同使用 MCP server 一个独立 connector 暴露 live operations,避免每个应用各写一份。
四方不是互斥套餐。最典型的组合是 MCP + Skill :MCP 负责数据库 connection、authentication 与 query tool;Skill 负责 schema、query patterns、review checklist 与团队 workflow。前者给「能做什么」,后者给「怎样做得符合本团队」。如果反过来让 Skill 承担 connection,或把 700 行 style guide 塞进 tool contract,两边都把职责放错了。
考点回链 — 本章覆盖:TS 8.3(built-in Tools、custom Tools、Skills、MCPs 的执行边界、加载路径与 use-case 取舍,以及 Skill + MCP 组合)。相邻考点:tool description、schema、client / server dispatch 与 approval patterns,以及 MCP server authoring、resources / tools / prompts 和 transports,见
ch12 ;context budget 与 isolation 见
ch11 ;Claude Code 的 Rules、Skills、Commands、Agents 与 Agent Memory 见
ch15 。
本章题组
QUESTION 01 · TS 8.3 · CROSS-APPLICATION INTERNAL API
Three Claude applications need live inventory from the same internal REST service. The inventory team changes operations twice per month, requires centralized authentication, and must maintain the integration independently of all three applications. Which customization best fits?
A Expose inventory operations through one maintained MCP server, centralize typed contracts and authentication there, and let all three applications consume the same versioned connector.
B Export the current inventory nightly into each application's system prompt, then use the built-in web_fetch tool as proof that private authentication and live operations are already covered.
C Create a shared Skill containing the endpoint documentation and credentials, relying on its Markdown instructions to authenticate, execute REST calls, and return current inventory without any tool connection.
D Give each application its own custom client tool and copied inventory handler so every team can deploy authentication and operation changes independently.
正确 A live access、跨三个应用复用、独立维护与集中 authentication 都指向 MCP server;这是样题 Q3 的 carrier 判据,不是 built-in 名称猜测。
D5 错层承载 违反 P4 B :nightly snapshot 没有 live access,context 也不是 inventory store;web_fetch 不会自动取得任意内部 API contract 与认证。
D5 错层承载 违反 P4 C :Skill 能提供 instructions,却不因此变成 external-system connection;把 credentials 与执行职责塞进 Markdown 同时住错层。
D6 半对半错 违反 P4 D :custom tool 可以让单个应用执行操作,但复制三份 handler 直接违背共享与独立维护约束,前半句可行、整体不适配。
QUESTION 02 · TS 8.3 · CUSTOM TOOL EXECUTION
A Node.js support service defines a custom client tool named lookup_tax. Claude returns a tool_use block with validated-looking arguments, but no tax lookup appears in application logs. What should the developer do next?
A Wait for Anthropic infrastructure to execute the user-defined tool automatically, because returning tool_use means the remote server accepted responsibility for the private operation.
B Validate arguments and authorization, execute lookup_tax in the application, return a matching tool_result, and continue the conversation so Claude can use the live result.
C Move the tool schema into a Skill and treat loading its instructions as both execution and the tool_result for the next turn.
D Deploy a dedicated MCP server around the existing lookup_tax handler, centralizing authentication, versioning, observability, and schema governance behind a reusable remote tool boundary before integrating the support service.
正确 B custom client tool 的模型输出是 structured request;应用拥有 validation、execution 与 result 回传,tool_use 本身不是已完成动作。
D1 凭空捏造 违反 P5 A :user-defined client tool 不会因 schema 被接受就改由 Anthropic 执行;选项给真实机制安了错误执行者。
D5 错层承载 违反 P4 C :Skill 提供 instructions,不运行 Node handler,也不能冒充协议要求的 tool result。
D7 过度工程 违反 P10 D :现有单应用 handler 已是最薄执行边界;题干没有共享或独立维护要求,先部署 server 是无证据升级。
QUESTION 03 · TS 8.3 · SKILL FIT
Twelve developers paste the same 900-line code-review checklist into Claude Code about 40 times per week. It contains instructions and examples but needs no live API, database, or side effect. What should the team create?
A Use a project Skill: keep discovery metadata in SKILL.md, load the workflow only when relevant, and version the 900-line checklist, templates, and supporting files beside it.
B Host the static checklist behind an MCP operation and fetch all 900 lines over HTTP each time the review begins.
C A custom client tool whose application handler returns the 900-line checklist as a structured tool result on each review, centralizing checklist delivery in the runtime.
D Use the Managed Agents built-in toolset and embed the 900-line review procedure in each built-in tool description, keeping the checklist adjacent to every file, shell, and Web action used during review.
正确 A 重复的 instructions、checklist 与 multi-step procedure 正是 Skill 的适配信号;description 支持发现,full body 在使用时进入 context。
D7 过度工程 违反 P10 B :没有 live system 或共享 action,却为静态 Markdown 新建远端 server 与监控服务,重手段没有对应约束。
D5 错层承载 违反 P4 C :checklist 是 knowledge / workflow,不是应用要执行的 operation;把它伪装成 tool result 增加了无意义的往返。
D5 错层承载 违反 P9 D :built-in tool descriptions 不是 procedure 仓库;把 900 行复制八次既错载体,也持续挤占 active context。
QUESTION 04 · TS 8.3 · MIXED BUILT-IN AND CUSTOM
One Managed Agent must regex-search local fraud rules and call a live internal scoring API used only by this service. The application already has an authenticated score_transaction() handler. Which tool set is the smallest fit?
A Put the rule-search instructions and the API token in one Skill, then rely on the Skill body to perform both the regex search and authenticated network request without tools.
B Use built-in grep for both local rule search and internal scoring, passing the private API endpoint and token as grep arguments.
C Use built-in grep for local rule search and an application-executed custom tool for score_transaction(); validate input and authorization at the live-call boundary, and keep the API token out of Skill text and grep arguments.
D Expose score_transaction through an MCP server, wrap it with an application custom tool for service-specific validation, and keep web_search as a fallback data path, using layered adapters for portability, resilience, and centralized observability.
正确 C grep 精确覆盖 local regex search;已有 handler 且只有一个 consumer,custom tool 保留应用执行边界,两个载体各做自己擅长的事。
D5 错层承载 违反 P4 A :Skill 能教方法,不会执行 regex tool 或 authenticated request;把 token 放进 instructions 也没有建立 action boundary。
D1 凭空捏造 违反 P5 B :grep 的职责是 regex text search;内部 API 与 authentication 是选项擅自添加的能力。
D7 过度工程 违反 P10 D :一个已有 handler 被重复包成 MCP、custom 与 Web fallback,题干没有失败或复用证据支撑三层 integration。
QUESTION 05 · TS 8.3 · CONTEXT LOADING
A Claude Code team audits context usage after adding 25 Skills and six MCP servers. Which statement correctly describes the default loading distinction?
A Every Skill body is injected in full on every request, while MCP contributes no names, instructions, or schemas until after a successful external tool call has already completed.
B Load every MCP schema at session start and keep model-invocable Skills hidden until a developer invokes each slash command.
C Prompt caching removes both Skill descriptions and MCP tool definitions from the context window, so the team can ignore selection and loading costs once the prefix is cached.
D Skill descriptions load at session start and bodies on use; MCP loads names and server instructions first, deferring full schemas until needed; count discovery metadata in the startup budget.
正确 D 两者都做 progressive loading,但装入的对象不同:Skill 是 description → body;MCP 是 names / server instructions → full schemas。
D1 凭空捏造 违反 P5 A :把 Skill 的 on-demand body 反写成 always-on,又把 MCP 初始 names / instructions 擦掉,两个机制职责都错。
D1 凭空捏造 违反 P5 B :默认行为恰好相反:MCP full schemas 可延迟,model-invocable Skill descriptions 用于相关性发现。
D2 无关杠杆 违反 P9 C :caching 改变复用与计费,不让 cached token 离开 context;它也不能替团队决定哪些 capability 应该加载。
QUESTION 06 · TS 8.3 · BUILT-IN TOOLSET SCOPE
A compliance audit agent may read files, match paths, and regex-search text. It must not run shell commands, modify files, or access the Web. The full Managed Agents toolset is otherwise enabled. Which configuration best matches the boundary?
A Leave every built-in enabled and add “never mutate or use the network” to the system prompt, treating the wording as a technical denial even if the model requests a prohibited tool.
B Disable only write; keep edit, bash, web_fetch, and web_search enabled because their names do not literally contain the word “write.”
C Use configs to leave read, glob, and grep available while disabling bash, write, edit, web_fetch, and web_search.
D Replace the three sufficient built-ins with duplicated custom tools, expose those again through an MCP gateway, and depend on review-time instructions to keep both new layers from mutating data.
正确 C 题干允许的三个动作与官方 inventory 一一对应;configs 负责收窄完整 toolset,禁用项覆盖 shell、两种写路径与两种 Web 路径。
D3 措辞冒充控制 违反 P3 A :高后果边界仍靠一句 prompt;可调用能力没有被技术收窄,失守时没有确定性阻断。
D6 半对半错 违反 P3 B :关掉 write 只覆盖一条修改路径;edit、bash 与两项 Web 能力仍直接违反约束。
D7 过度工程 违反 P10 D :built-ins 已精确覆盖只读任务;重复 custom + MCP 不增加约束匹配,末尾还退回 prompt 软约束。
QUESTION 07 · TS 8.3 · SKILL PLUS MCP
A database assistant needs authenticated live queries and a 700-line team guide covering schema meaning, approved joins, review rules, and common query workflows. Which customization split is most appropriate?
A Put the database token, SQL client, and 700-line guide into one Skill, expecting Markdown instructions to establish the network connection and execute authenticated queries without a tool.
B Use MCP for the authenticated database tools and a Skill for schema knowledge, query patterns, and the review workflow.
C Copy all 700 lines into every MCP tool description so connection code, authentication, schema knowledge, and review procedure are repeated inside each action contract.
D Use the built-in web_search tool as the database connector and rely on public search results to supply private schema definitions and access approval.
正确 B MCP 给 live connection、authentication 与 tools;Skill 给如何使用这些 tools 的 schema knowledge 与 workflow。两者职责互补。
D5 错层承载 违反 P4 A :Skill 是 instructions / knowledge 载体,不是 SQL client;把 token 放进去也没有建立可执行的 authenticated connection。
D5 错层承载 违反 P9 C :MCP tool contract 应描述 action;700 行 reference / workflow 属于按需 Skill,复制到每项只会放大 context 噪声。
D1 凭空捏造 违反 P5 D :web_search 只负责 Web search,不自动成为 private database connector、schema source 或 approval mechanism。
QUESTION 08 · TS 8.3 · CUSTOM VERSUS MCP
A two-week TypeScript pilot has one service, one existing authenticated get_price() handler, and no planned second consumer or independent integration team. Claude only needs structured access to that operation. What should the developer implement first?
A Build and deploy a shared MCP service, service-discovery layer, and separate operations pipeline now so hypothetical future clients can reuse the integration if the pilot later expands.
B Write a Skill containing the endpoint and authentication steps, then let the model interpret those instructions as permission and execute the private HTTP call without application code.
C Enable built-in web_fetch and assume its URL input automatically inherits the service's private credentials, business error handling, and price-response schema.
D Define a custom tool contract and let the application validate, execute get_price(), and return the result.
正确 D 一个 consumer、现成 handler、无独立维护要求:custom client tool 是最薄充分承载,应用继续拥有 validation 与 execution。
D7 过度工程 违反 P10 A :为未出现的 future reuse 预建三层服务,跳过了已能完成 pilot 的应用内 contract。
D5 错层承载 违反 P4 B :Skill 可以记录 procedure,却不会执行 handler;把认证步骤写成 instructions 不能产生 live action。
D1 凭空捏造 违反 P5 C :web_fetch 不自动继承内部 credentials、业务错误处理或 response schema,选项给 built-in 添了未声明职责。