Elie Schoppik · 2026-01-28

为何使用技能?(第一部分)

摘要

本课程通过营销活动分析的实际场景,展示了技能(Skills)的核心价值——将重复性工作流、专业知识或新功能打包成可复用的指令文件夹。技能不仅减少了提示词的重复输入,还能优化上下文窗口的使用,提升分析效率并支持团队协作与跨平台共享。

要点

  • 技能定义:技能是包含指令的文件夹,用于封装重复的工作流程和专业知识,避免在每次对话中重复输入相同提示词
  • 上下文优化:通过条件性引用外部文件(如预算分配规则),技能可以智能地控制哪些信息进入上下文窗口,提高效率
  • 文件结构规范:技能需要命名为 SKILL.md 的主文件,包含必需的 YAML frontmatter(name 和 description),以及可选的 references 文件夹存放外部引用文件
  • 跨平台兼容性:技能作为开放标准,支持 Claude AI、Codex、Gemini CLI 等多种环境,便于团队共享和协作
  • 实际应用案例:课程演示了从营销数据分析到生成 Excel 报告的完整流程,展示了技能如何将 CSV 数据转化为可操作的洞察

视频信息:Why Use Skills? - Part I

视频信息:Why Use Skills? - Part I


中文翻译

技能(Skills)是指令的文件夹,用于为你的智能体打包重复的工作流、专业知识或新功能。如果你发现自己在对话中反复输入相同的提示词,你应该考虑将其转换为一项技能。让我们探索一下如何使用 Claude AI 来实现这一点。在我们进一步讨论技能、深入了解技能的样子以及它的工作原理之前,让我们先看一个场景,来展示为什么技能如此有用。

在这里,我有一个包含一些营销活动数据的 CSV 文件,我想分析它的表现。为了向你展示它长什么样,这里有日期、活动名称、展示次数、点击次数和转化次数。你可以想象一下,我们要接收一些营销数据,并使用 Claude 来分析这些信息。所以,在我的第一个提示词中,我附上了这个数据,解释了输入数据的样子,要求检查数据质量,进行漏斗分析,以及一些关于我预期的点击率和转化率的有用指标。在底部,我还要求了针对这段特定数据的输出格式。

现在你可以想象,如果不必每次都包含这个提示词,而是把它打包起来,那将是非常有价值的。当我们查看我们在活动数据中看到的内容时,Claude 将读取这个 CSV 文件。然后它将执行数据质量检查和漏斗分析,并返回我们的活动表现分析。这里它将显示总记录数、任何缺失的数据以及数据中存在的任何异常。如果我们再深入一点看,我们会看到我们的漏斗分析与我们需要寻找的基准数据的对比。我们可以看到这里,有些事情效果更好,有些事情效果不佳。我们得到了很多有用的反馈数据,我们可以据此采取行动,调整我们的营销活动并继续前进。

我们对 Claude 告诉我们的内容有了一个很好的解读,什么在起作用,什么不起作用。现在我们将继续要求对某些营销效率指标进行额外的计算。这些包括我们的广告支出回报率、获客成本、净利润等等。我们还将要求以某种特定的方式输出格式。我们将看到这种效率分析的结果,我们会再次看到什么在起作用,什么不起作用以及一些解释。我们会看到我们的投资组合表现和总净利润。看起来我们在这里赚到了钱,但我确信我们还有很多可以做的事情。

我们要做的下一步是引入额外的数据,即我们的预算重新分配规则。这里的想法是,如果我们有额外的资金可以运用,并考虑分配给其他营销渠道。你可以想象这个文件包含了相当多的关于分配规则的数据,我们试图弄清楚什么,以及如何最好地决定增加哪里的预算。这也可能导致基于我们这里的框架来维持预算或减少预算。同样,这是大量针对我们需要特定用例的数据。Claude 知道如何处理特定的决策并分析营销指标,但在这里我们指定了我们想要做事情的确切方式。这需要我引入外部文档,找到合适的人,即使我不是这方面最精通的,也希望我能做对。

我们将继续查看这些分配规则和我们的建议。我们可以看到哪些通过了,哪些没有通过,以及这里提议的重新分配。释放一些预算,分析什么在起作用,以及将额外的预算分配到哪里。我们在这里看到的是一个循序渐进的过程,需要我们作为用户输入必要的文档并具备必要的先验知识。不仅如此,我在这里输入的所有内容都会立即添加到上下文窗口中。如果我想问一些不同的问题会发生什么?如果我想进行不同类型的对话会发生什么?这里的这些信息并不总是对我将要做的所有事情都是必要的。

我们接下来要看的是,我们如何获取这些信息并将其打包成一项技能。一种独立的资产,实际上是一个文件夹,其中包含有关如何执行活动分析的说明,同时也特意区分哪些信息进入上下文窗口,哪些不进入。正如我们所见,这是一个每周的活动表现分析。所以这并不是我想每周都要自己通过复制粘贴这个特定提示词来重复做的事情。将其预先打包好,以便我可以自己使用,与团队成员分享,并在必要时进行编辑,这将好得多。

因此,让我们来看看 SKILL.md 文件是什么。这个文件需要命名为 SKILL.md,格式为 Markdown。这将是执行我们所看到的任务的底层指令集。在这个 Markdown 文件中,我有与之前提示词中包含的非常相似的信息。我有输入要求、数据质量检查、包含之前使用的指标的漏斗分析以及历史基准。我有同样的效率分析以及我期望的输出格式。最后,我在这里有一个关于预算重新分配的注释,它仅在用户询问预算重新分配时才引用不同的文件。

所以我们谈到了一点关于这如何在上下文中更高效。这是一个例子,我只会在用户询问该特定信息片段时才读取和使用此文件。为了使这项技能按预期工作,我还需要在开头添加一条数据。此数据采用名为 YAML 的数据格式,这就是它的样子。你在整个标准中制作的每一项技能都需要一个名称和一个描述。技能的名称对于引用何时使用它以及在使用它的 UI 中非常重要。描述很重要,这样我们使用的模型就可以理解何时使用这项特定技能。当你制作一项技能时,名称和描述是必需的。

所以我们有了 SKILL.md 文件,我想向你展示的第二个文件就是这个 budget_reallocation_rules.md 文件,它与我们看到的另一个提示词非常相似。当你制作一项技能时,你的技能可以引用其他文件,只要它们都在同一个父文件夹中。这些预算重新分配规则正是我在之前与 Claude AI 的对话中放入的内容。所以我们在这里所做的是,我们不再将指令直接放入我们的对话中,而是将其放入一个文件夹中。现在我已经有了这个 SKILL 文件,以及任何外部文件,我要做的是新建一个文件夹。我将该文件夹命名为技能的名称,analyzing-marketing-campaign(分析营销活动)。关于命名技能有一些高级规则。坚持使用小写字母,在单词之间使用连字符,不要使用像 Claude 或 Anthropic 这样的保留关键字。

现在我已经为我正在制作的技能创建了这个文件夹,我将继续制作另一个名为 references(参考资料)的文件夹。当我们查看技能的开放标准时,我们会看到这实际上是一个特定的名称,当技能使用外部参考资料时我们会使用它。在我们的 SKILL.md 中,我们链接到了 references/budget_reallocation_rules。所以我将把该文件放入这个文件夹中。我将把文件夹放入我们的营销活动文件夹中。然后我将把 SKILL.md 放在这个文件夹的顶层。如果我们快速查看一下里面的内容,我们应该会看到我们的 SKILL.md 以及包含该额外预算分配文件的 references 文件夹。

现在我将继续从这个文件夹创建一个 zip 文件,并将其上传到 Claude AI。一旦我上传了该技能,我就应该能够在未来的对话中开始使用它。我将前往这里的"设置"。然后我将转到"功能"(Capabilities)。当我导航到"功能"的底部时,我们将看到关于"技能"的这一部分。这里有一些示例,我们稍后会讨论一下。但现在,我想添加我自己的。所以我将继续添加,并上传我创建的 zip 文件中的技能。我将继续拖放该 zip 文件,并给它一点时间上传。完成后,我们可以看到我们技能的名称以及该描述。

现在我们已经上传了我们的技能,让我们去看看它的实际效果。我将开始一个新的聊天。我将向 Claude 询问一个与我之前类似的提示词。现在我将继续附上我之前使用的同一个 CSV 文件。如果一切按预期工作,我们应该开始看到 Claude 提取我们要用于每周营销活动的技能。然后 Claude 应该执行该技能所需的任务,我们不再需要来回输入所有那些提示词。所以让我们来看看 Claude 在这里能做什么。我们会看到这里它将读取这个技能文件,以确保它遵循正确的指令。我们技能的名称以及描述是允许 Claude 提取它的原因。既然我们询问的是重新分配预算,它将继续读取我们上传到技能的那个额外文件。

然后我们将继续分析数据。如果你想查看 Claude 在这里运行和执行的代码,我们随时可以打开它,看看幕后发生了什么。我们将在这里看到与我们之前看到的非常相似的内容。我们将分析可能面临额外挑战的渠道,在本例中是 TikTok。我们可能会看到正在起作用的事情以及建议的重新分配。但在这种情况下,我们不必自己添加所有的提示词。这项技能可以在许多不同的平台上共享。由于技能是一个开放标准,因此其他编码环境(如 Codex、Gemini CLI 等)也支持此功能。

因此,我们不仅创造了一种将这些数据打包到一个中心位置的方法,而且我们在上下文窗口方面也更加高效,并且这里的可移植性非常有价值。现在,让我们继续使用我们找到的数据创建一个报告。我们将继续创建一个包含以下信息片段以及我们要推荐的颜色编码的 Excel 报告。在底层,创建电子表格并执行必要代码以实现此目的的能力,实际上存在于 Claude 内置的一项技能中。所以我们实际上将看到正在使用底层技能,运行代码来创建此 Excel 文件,最后根据我们要指定的输出要求进行输出。

我们要有了现在的电子表格。在这里我们可以看到,我们有执行摘要、漏斗分析、效率分析。我们可以去 Google Drive 打开它或下载这个电子表格。通过使用我们的技能来分析数据并提供我们需要的内容,以及内置的创建电子表格的技能,我们可以将 CSV 中的数据转换为多种不同文件格式的有意义、可操作的见解。接下来,我们将更深入地探讨技能是什么样子的、它是如何工作的,以及它在整个 AI 生态系统中的位置。

继续

English Script

Skills are folders of instructions that package repeated workflows, specialized knowledge, or new capabilities for your agent. If you find yourself typing the same prompt across conversations, you should consider transforming that into a skill. Let’s explore how to do that using Claude AI. So before we talk a little bit more about skills and dive into what a skill looks like and how it works, let’s walk through a scenario to showcase why skills are so useful.

Right here, I’ve got some campaign data in a CSV that I’d like to analyze the performance of. So just to show you what this looks like, I’ve got a date, a campaign name, impressions, clicks, conversions. You can imagine here that we’re going to take in some marketing data use Claude to analyze this information. So in my first prompt, I’m attaching this data, explaining what the input data looks like, asking to check for quality, funnel analysis, and some useful metrics around what I expect for click-through rates and conversion rates. At the bottom, I’ve got an output format that I’m requesting for this particular piece of data.

Now you can imagine it would be valuable to not have to include this prompt every time and to have that packaged up. As we take a look at what we’re seeing in our campaign data, Claude is going to read this CSV. It’s then going to perform the Data Quality Check and Funnel Analysis and give us back our campaign performance analysis. Here it’s going to show the Total Records, any Missing Data, and any Anomalies in the data that exist. If we take a look a little further, we’ll see our Funnel Analysis versus the benchmark data that we were looking for before. We can see here, some things that are working better, some things that are not working as well. We’re getting a lot of useful data back that we can take action around, change our marketing campaigns and move forward.

We’ve got a nice interpretation of what Claude is telling us, what’s working, what’s not working. And now we’re going to go ahead and ask for additional computations of certain efficiency metrics for marketing. These include return on our ad spend, cost per acquisition, and net profit and so on. We’re also going to ask for an output format in a certain fashion. We’ll see the results from this efficiency analysis, we’ll see what’s working, again, what’s not working and some interpretations. we’ll see our portfolio performance and our total net profit. Looks like we’re making money here, but there’s still much more that I’m sure we can do.

The next step that we’re going to do here is to take in an additional piece of data, our budget reallocation rules. The idea here is that we have extra money to play around with and think about allocating towards other marketing channels. You can imagine this file has quite a bit of data around the rules for allocating, what we’re trying to figure out and how best to decide where to increase our budget. This could also lead to maintaining a budget or decreasing a budget based on this framework that we have here. Again, this is a lot of data that is specific to our particular use case. Claude knows how to handle particular decisions and analyze marketing metrics, but here we’re specifying exactly the way that we want to do things. This requires me bringing in external documentation, finding the right people, and even if I’m not the most knowledgeable about this, hoping that I get it right.

We’re going to go ahead and see these allocation rules, our recommendations. We can see what’s passing, what’s not passing, and a proposed reallocation here. Freeing up some budget, analyzing what’s working and where to allocate additional budget towards. What we’ve seen here is a step-by-step process that requires us as the user to put in the necessary documentation and have the necessary pre-existing knowledge. Not only that, but everything that I’m putting in here is immediately getting added to the context window. What happens if I want to ask something different? What happens if I want to have a different kind of conversation? This information here is not always necessary for everything I’m going to do.

What we’re going to take a look at here is how we can take this information and package it into a skill. a standalone asset, a folder really, that contains instructions for how to go about performing the campaign analysis while also being intentional about what information goes into the context window and what information doesn’t. As we’ve seen, this is a weekly campaign performance analysis. So this isn’t something that I want to have to repeat on my own every single week with this particular prompt by copying and pasting. This is going to be much nicer to have pre-packaged that I can use myself, share with members of the team, and edit as necessary.

So with that, let’s take a look at what a SKILL.md file is. This file needs to be named SKILL.md in markdown format. And this is going to be the underlying set of instructions to perform the task that we saw. In this Markdown file, I have very similar information to what I included in the previous prompt. I have my input requirements, a data quality check, funnel analysis with the metrics that we were working at before, and historical benchmarks. I have that same Efficiency Analysis as well as the Output Format that I expect. Finally, I have a note here on Budget Reallocation that references a different file only when the user asks about Budget Reallocation.

So we talked a little bit about how this can be much more efficient with context. This is one example where I’m only going to be reading and using this file if a user asks about that particular piece of information. In order to get this skill to work as expected, there’s one more piece of data that I need to add to the beginning here. This data is in a data format called YAML, and here’s what it looks like. Every skill that you make across the entire standard requires a name as well as a description. The name of the skill is going to be important for referencing when to use it and in the UI that we’re working with if it’s being used. And the description is important so that the model that we’re working with can understand when to use this particular skill. When you make a skill, the name and description are required.

So we’ve got our SKILL.md file, and the second file I want to show you is just this budget_reallocation_rules.md file, which is very similar to the other prompt that we saw. When you make a skill, your skill can reference other files as long as they’re all in the same parent folder. These budget reallocation rules are exactly what I put in that previous conversation with Claude AI. So what we’re doing here is we’re moving away from putting in instructions directly in our conversation, and instead putting it into a folder. Now that I’ve got this SKILL file, as well as any external files, What I’m going to do here is make a new folder. And I’ll name that folder the name of the skill, analyzing-marketing-campaign. There are some high-level rules around naming skills. Stick with lowercase letters, use dashes between words, and don’t use reserved keywords like Claude or Anthropic.

Now that I’ve created this folder for the skill that I’m making, I’m going to go ahead and make another folder called references. When we look at the open standard for skills, we’re going to see that this actually is a specific name that we use when there are external references that the skill uses. And inside of our SKILL.md, we linked to references/budget_reallocation_rules. So I’ll go ahead and put that file in this folder. I’ll put the folder inside of our marketing campaign. And then I’ll put the SKILL.md at the top level of this folder. If we take a quick look at what’s inside, we should see our SKILL.md as well as our references folder that contains that additional budget allocation file.

Now I’m going to go ahead and create a zip file from this folder and I’m going to go ahead and upload that to Claude AI. Once I upload that skill, I should be able to start using it in future conversations. I’m going to head over to my Settings right over here. And I’m going to go to Capabilities. As I navigate to the bottom of Capabilities, we’re going to see this section on Skills. There are some example ones that we’ll talk a little bit about later. But right now, I want to add my own. So I’m going to go ahead and add, and I’m going to upload the skill in a zip file that I created. I’m going to go ahead and drag and drop that zip file and give that a second to upload. Once that’s done, we can see the name of our skill as well as that description.

Now that we’ve uploaded our skill, let’s go see this in action. I’m going to start with a new chat. I’m going to go ahead and ask Claude a similar prompt to what I had before. And I’m going to go ahead now and attach the same CSV that I was working with before. If this works as expected, we should start to see Claude pick up the skill for our weekly marketing campaign. Claude should then perform the tasks required in that skill and the need for us to have all that prompt back and forth is no longer there. So let’s go ahead and see what Claude can do here. We’ll see here it’s going to read this skill file to ensure it’s following the right instructions. The name of our skill as well as the description is what is allowing Claude to pick this up. Since we’re asking about reallocating the budget, it’s going to go ahead and read that additional file that we uploaded to our skill.

We’ll then go ahead and analyze the data. If you want to see the code that Claude is running and executing here, we can always open this up and take a look at what’s happening behind the scenes. What we’re going to see here is something very similar to what we saw before. we’re going to analyze channels that may have additional challenges, in this case TikTok. We may see things that are working as well as recommended reallocations. But in this case, we didn’t have to add all the prompting ourselves. This skill can be shared across many different platforms. And since skills are an open standard, this is supported in other coding environments like Codex, Gemini CLI, and much more.

So not only have we created a way to take this data and package it into a centralized place, we’re being more efficient with the context window and the portability here is extremely valuable. Now, let’s go ahead and create a report with the data that we found. We’re going to go ahead and create an Excel report with the following pieces of information as well as a color coding that we’re recommending. Under the hood, the ability to create spreadsheets and execute necessary code to do so, actually lives in a skill that comes built-in to Claude. So we’re actually going to see the underlying skill being used, code being run to create this Excel file, and then finally the output based on the requirements that we specified.

We’ve got our spreadsheet now. Here we can see, we’ve got an Executive Summary, Funnel Analysis, Efficiency Analysis. And we can go and open this in Google Drive or download this spreadsheet. Through the use of our skill to analyze data and give us what we need, as well as built-in skills to create spreadsheets, we can transform data from CSVs into meaningful, actionable insights in many different kinds of file formats. Next, we’ll explore in a little bit more depth what a skill looks like, how it works, and where it fits into the entire AI ecosystem.