本页目录

📘 第 8 课:Skills(技能)

官方课程名:Skills(Curriculum 第二段「Teaching your Agent」收官课) 官方地址:https://anthropic.skilljar.com/claude-platform-101 归档路径:Claudeexams/20-课程/课程003 the AI Platform 101/ 针对认证:CCAR-P(架构师 Professional) 归档日期:2026-10-14 ⚠️ 语料来源:官方 Skilljar 课程正文(用户提供,需登录)。CC BY-NC-SA 4.0,仅供个人学习。

⭐⭐ 本课权重提示:领域 2 复用策略的「正名课」。CCAR-P 考纲领域 2 白纸黑字写着「实现提示复用策略(caching、模块化提示、Skills)」—— 本课就是那个 Skills 在平台侧的落地讲。同时命中领域 3(19%)的扩展机制(挂载点、beta 通道、与 code execution 组合)与领域 7(7%)的团队标准化叙事。与第 7 课合读:工具三分法管 what,本课的 Skills 管 how。 🔗 跨课对照:课程 001《Introduction to agent skills》讲的是 Skills 在 AI Code Assistant 语境(PROJECT.md、Hooks、allowed-tools 白名单);本课是同一概念在 Platform / API 语境(SKILL.md 上传、container 挂载、beta 端点)。两课共享「渐进式披露(progressive disclosure)」同一机制。


🎯 本课学习目标

⚠️ 本课官方未提供 What you'll learn 区块。以下按文稿结构反推:

  1. 能说清 Skills 是什么:指令 + 脚本 + 资源的文件夹,核心是一份 SKILL.md,上传一次、挂到任意 messages.create 调用。
  2. ⭐⭐ 能背出 Skills vs. tools 判别句:tools 是 what the AI can do,Skills 是 how you want it done。
  3. ⭐⭐ 能讲清渐进式加载机制:启动只装 name + description,agent 判定相关才把全量 Skill 装进上下文。
  4. ⭐⭐ 能写出 / 读懂上传(client.beta.skills.create)与挂载(container.skills + betas)两段代码。
  5. ⭐ 能说清 Skills 与 code execution 的搭配理由:Skill 规程要干真活(跑脚本)。
  6. 能讲出生产价值:一个团队用同一 Skill 端点让所有人的输出同构同序。

📖 一、Skills 是什么(What Skills are)

官方原句: Skills are folders of instructions, scripts, and resources that the AI loads dynamically to improve performance on specialized tasks.* At the core of every Skill is a SKILL.md file — a packaged set of instructions you upload once and then attach to any messages.create call*.

精译:Skills 是指令、脚本与资源的文件夹,the AI 会动态加载它们来提升在专门任务上的表现。每个 Skill 的核心是一份 SKILL.md 文件 —— 一套打包好的指令,你上传一次,然后挂到任意一次 messages.create 调用上。

官方原句: You're teaching the AI how you do something*: your status report format, your review checklist, your release notes. the AI reads the Skill, follows the procedure, and produces output in your shape.***

精译:你在教 the AI 你做某件事的方法:你的状态报告格式、你的审查清单、你的发布说明。the AI 读这个 Skill、照着规程执行,然后产出符合你形状的输出。

⭐⭐ 三个记忆锚点

锚点 内容 为什么重要
本体 文件夹 = instructions + scripts + resources,核心 SKILL.md 考题问「Skill 由什么组成」的原词
生命周期 upload once → attach to any call(上传一次、任意挂载) 与「每条 prompt 复制粘贴规程」对立,领域 2 复用策略考点
动作方向 教方法(how),不是给能力(what) 与 tools 的判别分界,见下节

📖 二、Skills vs. Tools(本课第一判别句)

官方原句: Tools connect the AI to data and actions.* "Look up this code section," "send this email" — the AI calls the tool, and something else runs.***

精译:工具把 the AI 接到数据与动作上。「查这段代码」「发这封邮件」 —— the AI 调用工具,别的东西去运行。

官方原句: Skills teach the AI a procedure.* "Generate the daily status report following this template" — it's a playbook the AI reads and follows, which sometimes means running bundled scripts itself*.

精译:Skills 教 the AI 一套规程。「按这个模板生成每日状态报告」 —— 它是一本 the AI 读了照办的战术手册,有时这意味着亲自运行捆绑的脚本。

⭐⭐ 判别句(必背)

A simple way to remember it: tools are about what the AI can do, while Skills are about how you want it done. 「工具关乎 the AI 能做什么;Skills 关乎你想让它怎么做。」

维度 Tools(第 4–7 课) Skills(本课)
解决的问题 连接:数据与动作 传承:方法与规程
本体 schema + 实现(谁来执行看三分法) SKILL.md 打包的指令集(可含脚本)
运行 metaphor the AI 调用,别的东西跑 the AI 读了照办,有时自己跑捆绑脚本
一句话 what the AI can do how you want it done
考题题型 谁声明 / 谁执行 / 要不要 loop 该沉淀成 Skill 还是用工具接数据

⭐⭐ 渐进式加载(渐进式披露的平台版)

官方原句: Skills don't load fully into context on startup.* Only the name and description load at first. When your agent decides a Skill is relevant, it then loads the full Skill into context. That keeps your context lean* even when many Skills are available.

精译:Skills 不会在启动时全量装进上下文。起初只加载名称与描述。当你的 agent 判定某个 Skill 相关时,才把完整 Skill 装进上下文。这样即使挂了很多 Skills,你的上下文依然精简。

🔗 与课程 001 的「渐进式披露(progressive disclosure)」同一机制(表 01-047 disclosure 已收);也与课程 002 的 4D 动态性呼应:Skill 是动态资源,不是一次性序列(表 02-063)。


📖 三、上传 Skill(Uploading a Skill)

官方原句: Skills are uploaded once to your workspace, then referenced by ID. You can upload directly on the the AI Platform, or do it programmatically.

精译:Skills 上传一次到你的工作区,之后按 ID 引用。可以直接在 the AI Platform 页面上传,也可以以编程方式上传。

skill = client.beta.skills.create(
    display_title="Status Report Generator",
    files=files_from_dir("status-report-skill"),  # folder containing SKILL.md
)

print(skill.id)  # reference this ID in future requests

代码拆解

要素 说明
client.beta.skills.create beta 端点下的 skills 资源创建方法(三处 beta 之一,见 032)
display_title 显示标题(人类可读名)
files_from_dir(...) 从文件夹打包上传 —— 文件夹里必须有 SKILL.md
skill.id 返回的引用句柄:之后所有请求都靠它挂载

官方原句: All the rules for what makes a good status report — sections, tone, how to summarize, how to handle blockers — live in a Skill packaged ahead of time. The activity log itself is just a string passed in at request time.

精译:一份好状态报告的所有规则 —— 章节、语气、怎么汇总、怎么处理阻塞项 —— 都住在提前打包好的 Skill 里。活动日志本身只是请求时传入的一个字符串。

⭐⭐ 「提前打包 vs. 请求时传入」是本课的分工公式:怎么写进 Skill(静态、复用);数据本身走请求参数(动态、每次变)。这正是缓存与复用的架构直觉。


📖 四、挂载到请求(Attaching a Skill)

官方原句: Skills attach to a request through the container configuration — a skills array inside the container, where each entry names a skill_id and version.

精译:Skills 通过容器配置挂到请求上 —— 容器里有个 skills 数组,每个条目写明 skill_id 与 version。

response = client.beta.messages.create(
    model="current-model-fast",
    max_tokens=4096,
    betas=["skills-2025-10-02", "code-execution-2025-08-25"],
    container={
        "skills": [
            {
                "type": "custom",
                "skill_id": skill.id,
                "version": "latest",
            }
        ]
    },
    tools=[
        {
            "type": "code_execution_20250825",
            "name": "code_execution",
        }
    ],
    messages=[
        {
            "role": "user",
            "content": f"Generate the daily status report from this activity log:\n\n{activity_log}",
        }
    ],
)

官方点名的三个要点

# 官方原句 精译 考点
1 We're calling client.beta.messages.create, not the standard one, and passing the skills feature via the beta header. As of this video, Skills are still a beta feature. 调的是 beta 端点而非标准端点,skills 特性经 beta 头传入;截至本视频,Skills 仍是 beta 特性 三处 beta 一处不能少:端点(.beta.)+ betas 数组(声明两个特性版本)
2 container.skills is where the Skill attaches. It's a list, so you can layer multiple Skills onto one call. container.skills 是挂载点;它是列表,可以把多个 Skills 叠加到一次调用 挂载点选择题:不是塞进 messages,也不是 tools 数组;layer 是动词
3 Code execution is turned on here too. Skills often pair well with code execution, because Skill procedures can do real work — like running scripts in a terminal. 这里也开了代码执行;Skills 常与 code execution 搭配,因为 Skill 规程要干真活 —— 比如在终端跑脚本 组合题:规程要跑脚本 → Skill + code execution 一起开

📖 五、运行与生产价值(Running it)

官方原句: The output is a status report formatted exactly the way the Skill says to format it. Sections, tone, blocker handling — all of it comes from the SKILL.md file you uploaded. The user prompt is one line; the procedure lives in the Skill.**

精译:输出是一份完全按 Skill 说的格式排版的状态报告。章节、语气、阻塞项处理 —— 全部来自你上传的那份 SKILL.md。用户提示词只有一行;规程住在 Skill 里。

官方原句: In a production app, this is how a team standardizes output across an entire feature. With this daily status report endpoint, every PM gets the same structure, the same tone, the same sections, in the same order — without anyone copy-pasting a template into a prompt.

精译:在生产应用里,这就是一个团队让整个功能的输出标准化的方法。有了这个每日状态报告端点,每个 PM 拿到的都是同样的结构、同样的语气、同样的章节、同样的顺序 —— 没有任何人需要把模板复制粘贴进提示词。

⭐⭐ 领域 7 叙事:复用的收益不只是省 token,而是组织级一致性 —— 把「格式约定」从人脑与聊天记录里搬进版本化的 Skill 资产。


📌 六、Recap(官方六条要点)

# 官方原句 一句话
1 Skills package your procedures. A SKILL.md file (plus any scripts and resources) teaches the AI how you want something done. Skills 打包你的规程
2 Tools vs. Skills: tools are about what the AI can do; Skills are about how you want it done. what vs. how 判别句
3 Skills load progressively. Only the name and description load at startup; the full Skill loads into context when the agent decides to use it. 渐进式加载
4 Upload once with client.beta.skills.create, then attach with container.skills on any messages.create call — a list, so you can layer multiple Skills. 上传一次、列表挂载、可叠加
5 Pair with code execution when the Skill's procedure needs to do real work. 要干真活就配 code execution
6 Reach for a Skill when the how matters as much as the what. how 与 what 同等重要时,上 Skill

🧠 本课 → CCAR-P 考点映射

本课内容 对应领域 权重
Skills 作为提示复用策略(考纲领域 2 原词:caching、模块化提示、Skills) 领域 2 Models, Prompting & Context Engineering 13%
挂载机制(container.skills / beta 通道 / 与 code execution 组合) 领域 3 Integration 19%
渐进式加载保住上下文预算 领域 2 + 领域 5(治理:上下文与成本控制) 13% / 14%
团队输出标准化(PM 场景) 领域 7 Developer Productivity 7%

⭐ 战略结论:本课短小但考点密度高 —— 领域 2 考纲原词直接命中,判断题(Skill 还是 tool)、机制题(挂载点、三处 beta)、场景题(团队标准化)三种题型都能从这里出。


🔤 本课新生词(已回灌 30-单词表/03,2026-10-14)

词汇 音标 释义 备注
⭐⭐ SKILL.md — Skill 核心清单文件 打包指令集本体;上传一次反复挂载 → 精讲 029
⭐⭐ procedure /prəˈsiːdʒər/ 流程、规程 Skills 教的是 procedure → 精讲 030;表 01-067 已收
⭐⭐ playbook /ˈpleɪbʊk/ 战术手册 官方对 Skill 的比喻 → 精讲 030
⭐⭐ container /kənˈteɪnər/ 容器 Skill 挂载点 container.skills → 精讲 031
⭐⭐ beta / betas /ˈbiːtə/ 测试版 端点+头+参数三件套 → 精讲 032
⭐⭐ layer(v.) /ˈleɪər/ 叠加(动词) 多 Skill 叠进一次调用 → 精讲 033;⚠️ 第 1 课 layer 是名词「层」,此处是动词
⭐⭐ progressively /prəˈɡresɪvli/ 渐进式地 只装 name + description → 精讲 034;表 01-047 disclosure 同源
⭐ attach /əˈtætʃ/ 附加、挂载 attach to any messages.create call
⭐ dynamically /daɪˈnæmɪkli/ 动态地 loads dynamically;表 02-063 dynamic 家族已收
⭐ package(v.) /ˈpækɪdʒ/ 打包 a packaged set of instructions
⭐ lean /liːn/ 精简的 keeps your context lean
⭐ workspace /ˈwɜːrkspeɪs/ 工作区 Skills 上传到 workspace
⭐ pair well with — 与……搭配得当 Skills often pair well with code execution
⭐ standardize /ˈstændərdaɪz/ 标准化 领域 7 团队输出统一的核心动词
⭐ blocker /ˈblɑːkər/ 阻塞项 how to handle blockers(状态报告场景词)
⭐ ahead of time — 提前 packaged ahead of time
⭐ at request time — 请求时 与 ahead of time 对立:数据走请求参数
⭐ bundled /ˈbʌndld/ 捆绑的 running bundled scripts itself
⭐ in your shape — 按你的格式 produces output in your shape
⭐ template /ˈtempleɪt/ 模板 领域 2 提示模板原词;copy-pasting a template
Skill — 技能(平台特性专名) 本课主题;与 tool 判别 → what vs how
folder /ˈfoʊldər/ 文件夹 folders of instructions, scripts, and resources
script /skrɪpt/ 脚本 三件套之二
resource /ˈriːsɔːrs/ 资源 三件套之三
specialized /ˈspeʃəlaɪzd/ 专门的 specialized tasks
status report — 状态报告 本课贯穿场景
review checklist — 审查清单 your review checklist
release notes — 发布说明 三场景之三
look up — 查找 tools 例:look up this code section
send this email — 发邮件 tools 例(动作类)
tool /tuːl/ 工具 表 02-044 已收;本课判别句另一主角
upload /ˌʌpˈloʊd/ 上传 uploaded once to your workspace
display_title — 显示标题 skills.create 参数
skill_id — Skill ID container.skills 条目字段
version /ˈvɜːrʒn/ 版本 "version": "latest";表 01-085 version control 同族
entry /ˈentri/ 条目 each entry names a skill_id
feature /ˈfiːtʃər/ 功能特性 still a beta feature
terminal /ˈtɜːrmɪnl/ 终端 running scripts in a terminal
endpoint /ˈendpɔɪnt/ 端点 daily status report endpoint
recap /ˈriːkæp/ 要点回顾 栏目词(re- 再 + cap 摘要)
PM — 产品经理 every PM gets the same structure
copy-paste — 复制粘贴 反面动作:without anyone copy-pasting a template
messages.create — 创建消息 第 1 课已收,此处复现(挂载目标调用)
code execution — 代码执行 第 1、7 课已收,此处复现(beta 名 code-execution-2025-08-25)
programmatically — 以编程方式 第 1 课已收,此处复现

✅ 本课进度

  • [x] 全文精译与架构师级拆解(2026-10-14)
  • [x] ⭐⭐ 记录 Skills vs. tools 判别句与渐进式加载机制
  • [x] 记录上传 / 挂载两段代码与「三处 beta」要点
  • [x] 生词回灌 30-单词表/03-考试核心生词与术语表.md(2026-10-14:新增速查 39 条 → 全表 340 条;新升级精讲 6 条 029–034)
  • [x] 保存本课英文原文(23-English-08-Skills.md)
  • [ ] 跑通本课 runnable demo(需 Console 账号 + API key + 预付费额度)
  • [ ] 官方未提供 What you'll learn 与练习区块 —— 若后续页面补全,需回填

🔗 关联

⚠️ 语料说明:英文原文中的 model="current-model-fast" 等为抓取/去品牌化残留;其余英文引句均为官方原句,未作改动。

输入至少 2 个字符,检索全部课程与单词表