前言
各位好,我是小溪,见信如面。2025年10月16日,Anthropic发布了Claude模型的一个重要更新——Agent Skills,这项更新让用户能够将专业技能、脚本和资源整合进模块化的“技能文件夹”(Skill folders),从而让AI在特定的工作环境中更加专业地完成任务。对Claude Code CLI以往内容感兴趣的朋友也可以查看以前的文章:
- Hooks才是Claude Code CLI 的革新性更新
- Claude Code颠覆编程方式的Output Styles
- 推荐一个Claude Code宝藏网站Claude Code Templates
- Claude Code推出插件系统,AI编程模式再上新台阶
- 如何从零构建一个Claude Code插件
当前使用版本
2.0.24 (Claude Code)
简介
官方这样描述:“代理技能将专业知识整合进可发现的功能中。每个技能都由一个 SKILL.md 文件构成,该文件包含了Claude在必要时需参考的指南、脚本和模板等可选辅助文件。”
简单来说,Agent Skill是一个用来指导模型如何执行特定操作的Markdown文件,同时允许附加额外的文档和预编写的脚本,通过执行这些脚本,可以使模型在执行特定任务时表现得更加专业、高效,是AI的“可加载能力包”。
官网地址:
https://docs.claude.com/en/docs/claude-code/skills
Anthropic提供了一系列Skill实例,部分已经集成到Claude Code桌面应用中,也可在Claude Code CLI中使用,感兴趣的朋友们可以自行探索。
Github地址:
https://github.com/anthropics/skills
优势
Agent Skills具备以下特点:
- 为特定工作流程扩展Claude的功能
- 通过git在团队间共享知识
- 减少重复性的提示
- 为复杂任务开发多种技能
如何调用?
技能是由模型调用的,Claude会根据您的请求和技能描述自主决定何时启用它们。
Skills类型
Agent Skills有三种类型,Claude Code会自动从以下来源发现Skills:
- 个人(全局)技能:适用于所有项目,位于 ~/.claude/skills/ 目录下
- 项目技能:仅限特定项目使用,位于 .claude/skills/ 目录下
- 插件技能:随已安装的插件一起提供
Skills目录及操作
Skill目录结构
Agent Skills的文件结构大致如下:
my-skill/
├── SKILL.md # 指令与说明文件 必需项
├── reference.md # 文档(可选)
├── examples.md # 示例(可选)
├── scripts/ # 脚本(可选)
│ └── helper.py
└── templates/ # 模版(可选)
└── template.txt
SKILL.md
每个Skills都在具有以下结构的 Markdown 文件中定义:
---
name: your-skill-name
description: Introduce the Skills function。Description of when this Skill should be invoked
allowed-tools: which tools Claude can use when a Skill is active
license:skill license
---
Skill Implementation and Requirements
Skill技能Markdown Frontmatter属性:
- name:技能名称
- description:描述技能功能及何时应调用此技能
- allowed-tools:技能激活时可用的工具
- license:开放源代码许可证
技能中可以引用其他额外的文件作为上下文:
For advanced usage, see [reference.md](reference.md).
也可以采用文件路径的形式
For advanced usage, see ./reference.md
需要执行脚本的操作,可以使用如下方式指定:
Run the helper script:
```bash
python scripts/helper.py input.txt
```
对于 allowed-tools 的使用,可以在 frontmatter 中设置 Claude 在技能激活时能使用的工具:
---
name: your-skill-name
description: Introduce the Skills function。Description of when this Skill should be invoked
allowed-tools: Read, Grep, Glob
---
基本使用
前提条件
Claude Code 版本 1.0 或以上版本
官方Skill安装使用
以Claude Code官方Skill 市场为例,在交互式命令中输入如下命令添加Skill市场:
/plugin marketplace add anthropics/skills
在插件市场选择【浏览并安装插件】浏览并安装
或者直接通过以下命令安装:
/plugin install document-skills\@anthropic-agent-skills
/plugin install example-skills\@anthropic-agent-skills
document-skills 和 example-skills 包含的Skills如下所示:
安装完成后,根据提示重启Claude Code CLI
在交互式命令中直接输入提示词:
提取 /Users/username/Desktop/工作簿1.xlsx 文件内容
Claude Code CLI会先请求权限,然后启动Excel处理技能
授权后,Claude Code CLI会安装所需依赖并创建脚本
授权脚本后最终读取到了Excel表格内容
最后看看传统Claude Code CLI读取Excel表格的效果
三方Skill安装使用
这里以Claude Code Templates提供的Skills为例,对Claude Code Templates不熟悉的朋友们可以参阅往期内容:
分享一个Claude Code宝藏网站Claude Code Templates
进入项目根目录,在命令行终端输入如下命令进行安装:
$ npx claude-code-templates\@latest --skill=creative-design/canvas-design --yes
安装完毕后,项目 .claude/ 目录内会新增一个 skills 文件夹
完整的 SKILL.md 内容如下:
name: canvas-design
description: Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
license: Complete terms in LICENSE.txt
--------------------------------------
These are instructions for creating design philosophies - aesthetic movements that are then EXPRESSED VISUALLY. Output only .md files, .pdf files, and .png files.
Complete this in two steps:
1. Design Philosophy Creation (.md file)
2. Express by creating it on a canvas (.pdf file or .png file)
First, undertake this task:
## DESIGN PHILOSOPHY CREATION
To begin, create a VISUAL PHILOSOPHY (not layouts or templates) that will be interpreted through:
* Form, space, color, composition
* Images, graphics, shapes, patterns
* Minimal text as visual accent
### THE CRITICAL UNDERSTANDING
* What is received: Some subtle input or instructions by the user that should be taken into account, but used as a foundation; it should not constrain creative freedom.
* What is created: A design philosophy/aesthetic movement.
* What happens next: Then, the same version receives the philosophy and EXPRESSES IT VISUALLY - creating artifacts that are 90% visual design, 10% essential text.
Consider this approach:
* Write a manifesto for an art movement
* The next phase involves making the artwork
The philosophy must emphasize: Visual expression. Spatial communication. Artistic interpretation. Minimal words.
### HOW TO GENERATE A VISUAL PHILOSOPHY
**Name the movement** (1-2 words): "Brutalist Joy" / "Chromatic Silence" / "Metabolist Dreams"
**Articulate the philosophy** (4-6 paragraphs - concise but complete):
To capture the VISUAL essence, express how the philosophy manifests through:
* Space and form
* Color and material
* Scale and rhythm
* Composition and balance
* Visual hierarchy
**CRITICAL GUIDELINES:**
* **Avoid redundancy**: Each design aspect should be mentioned once. Avoid repeating points about color theory, spatial relationships, or typographic principles unless adding new depth.
* **Emphasize craftsmanship REPEATEDLY**: The philosophy MUST stress multiple times that the final work should appear as though it took countless hours to create, was labored over with care, and comes from someone at the absolute top of their field. This framing is essential - repeat phrases like "meticulously crafted," "the product of deep expertise," "painstaking attention," "master-level execution."
* **Leave creative space**: Remain specific about the aesthetic direction, but concise enough that the next Claude has room to make interpretive choices also at a extremely high level of craftmanship.
The philosophy must guide the next version to express ideas VISUALLY, not through text. Information lives in design, not paragraphs.
### PHILOSOPHY EXAMPLES
**"Concrete Poetry"**
Philosophy: Communication through monumental form and bold geometry.
Visual expression: Massive color blocks, sculptural typography (huge single words, tiny labels), Brutalist spatial divisions, Polish poster energy meets Le Corbusier. Ideas expressed through visual weight and spatial tension, not explanation. Text as rare, powerful gesture - never paragraphs, only essential words integrated into the visual architecture. Every element placed with the precision of a master craftsman.
**"Chromatic Language"**
Philosophy: Color as the primary information system.
Visual expression: Geometric precision where color zones create meaning. Typography minimal - small sans-serif labels letting chromatic fields communicate. Think Josef Albers' interaction meets data visualization. Information encoded spatially and chromatically. Words only to anchor what color already shows. The result of painstaking chromatic calibration.
**"Analog Meditation"**
Philosophy: Quiet visual contemplation through texture and breathing room.
Visual expression: Paper grain, ink bleeds, vast negative space. Photography and illustration dominate. Typography whispered (small, restrained, serving the visual). Japanese photobook aesthetic. Images breathe across pages. Text appears sparingly - short phrases, never explanatory blocks. Each composition balanced with the care of a meditation practice.
**"Organic Systems"**
Philosophy: Natural clustering and modular growth patterns.
Visual expression: Rounded forms, organic arrangements, color from nature through architecture. Information shown through visual diagrams, spatial relationships, iconography. Text only for key labels floating in space. The composition tells the story through expert spatial orchestration.
**"Geometric Silence"**
Philosophy: Pure order and restraint.
Visual expression: Grid-based precision, bold photography or stark graphics, dramatic negative space. Typography precise but minimal - small essential text, large quiet zones. Swiss formalism meets Brutalist material honesty. Structure communicates, not words. Every alignment the work of countless refinements.
*These are condensed examples. The actual design philosophy should be 4-6 substantial paragraphs.*
### ESSENTIAL PRINCIPLES
\- **VISUAL PHILOSOPHY**: Create an aesthetic worldview to be expressed through design
\- **MINIMAL TEXT**: Always emphasize that text is sparse, essential-only, integrated as visual element - never lengthy
\- **SPATIAL EXPRESSION**: Ideas communicate through space, form, color, composition - not paragraphs
\- **ARTISTIC FREEDOM**: The next Claude interprets the philosophy visually - provide creative room
\- **PURE DESIGN**: This is about making ART OBJECTS, not documents with decoration
\- **EXPERT CRAFTSMANSHIP**: Repeatedly emphasize the final work must look meticulously crafted, labored over with care, the product of countless hours by someone at the top of their field
**The design philosophy should be 4-6 paragraphs long.** Fill it with poetic design philosophy that brings together the core vision. Avoid repeating the same points. Keep the design philosophy generic without mentioning the intention of the art, as if it can be used wherever. Output the design philosophy as a .md file.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
## DEDUCING THE SUBTLE REFERENCE
**CRITICAL STEP**: Before creating the canvas, identify the subtle conceptual thread from the original request.
**THE ESSENTIAL PRINCIPLE**:
The topic is a **subtle, niche reference embedded within the art itself** - not always literal, always sophisticated. Someone familiar with the subject should feel it intuitively, while others simply experience a masterful abstract composition. The design philosophy provides the aesthetic language. The deduced topic provides the soul - the quiet conceptual DNA woven invisibly into form, color, and composition.
This is **VERY IMPORTANT**: The reference must be refined so it enhances the work's depth without announcing itself. Think like a jazz musician quoting another song - only those who know will catch it, but everyone appreciates the music.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
## CANVAS CREATION
With both the philosophy and the conceptual framework established, express it on a canvas. Take a moment to gather thoughts and clear the mind. Use the design philosophy created and the instructions below to craft a masterpiece, embodying all aspects of the philosophy with expert craftsmanship.
**IMPORTANT**: For any type of content, even if the user requests something for a movie/game/book, the approach should still be sophisticated. Never lose sight of the idea that this should be art, not something that's cartoony or amateur.
To create museum or magazine quality work, use the design philosophy as the foundation. Create one single page, highly visual, design-forward PDF or PNG output (unless asked for more pages). Generally use repeating patterns and perfect shapes. Treat the abstract philosophical design as if it were a scientific bible, borrowing the visual language of systematic observation—dense accumulation of marks, repeated elements, or layered patterns that build meaning through patient repetition and reward sustained viewing. Add sparse, clinical typography and systematic reference markers that suggest this could be a diagram from an imaginary discipline, treating the invisible subject with the same reverence typically reserved for documenting observable phenomena. Anchor the piece with simple phrase(s) or details positioned subtly, using a limited color palette that feels intentional and cohesive. Embrace the paradox of using analytical visual language to express ideas about human experience: the result should feel like an artifact that proves something ephemeral can be studied, mapped, and understood through careful attention. This is true art.
**Text as a contextual element**: Text is always minimal and visual-first, but let context guide whether that means whisper-quiet labels or bold typographic gestures. A punk venue poster might have larger, more aggressive type than a minimalist ceramics studio identity. Most of the time, font should be thin. All use of fonts must be design-forward and prioritize visual communication. Regardless of text scale, nothing falls off the page and nothing overlaps. Every element must be contained within the canvas boundaries with proper margins. Check carefully that all text, graphics, and visual elements have breathing room and clear separation. This is non-negotiable for professional execution. **IMPORTANT: Use different fonts if writing text. Search the `./canvas-fonts` directory. Regardless of approach, sophistication is non-negotiable.**
Download and use whatever fonts are needed to make this a reality. Get creative by making the typography actually part of the art itself -- if the art is abstract, bring the font onto the canvas, not typeset digitally.
To push boundaries, follow design instinct/intuition while using the philosophy as a guiding principle. Embrace ultimate design freedom and choice. Push aesthetics and design to the frontier.
**CRITICAL**: To achieve human-crafted quality (not AI-generated), create work that looks like it took countless hours. Make it appear as though someone at the absolute top of their field labored over every detail with painstaking care. Ensure the composition, spacing, color choices, typography - everything screams expert-level craftsmanship. Double-check that nothing overlaps, formatting is flawless, every detail perfect. Create something that could be shown to people to prove expertise and rank as undeniably impressive.
Output the final result as a single, downloadable .pdf or .png file, alongside the design philosophy used as a .md file.
------------------------------------------------------------------------------------------------------------------------
\## FINAL STEP
**IMPORTANT**: The user ALREADY said "It isn't perfect enough. It must be pristine, a masterpiece if craftsmanship, as if it were about to be displayed in a museum."
**CRITICAL**: To refine the work, avoid adding more graphics; instead refine what has been created and make it extremely crisp, respecting the design philosophy and the principles of minimalism entirely. Rather than adding a fun filter or refactoring a font, consider how to make the existing composition more cohesive with the art. If the instinct is to call a new function or draw a new shape, STOP and instead ask: "How can I make what's already here more of a piece of art?"
Take a second pass. Go back to the code and refine/polish further to make this a philosophically designed masterpiece.
## MULTI-PAGE OPTION
To create additional pages when requested, create more creative pages along the same lines as the design philosophy but distinctly different as well. Bundle those pages in the same .pdf or many .pngs. Treat the first page as just a single page in a whole coffee table book waiting to be filled. Make the next pages unique twists and memories of the original. Have them almost tell a story in a very tasteful way. Exercise full creative freedom.
包含执行步骤、设计理念的核心理解、哲学实例、画布生成等操作说明。
重新启动Claude Code CLI,若想查看当前所有可用的技能,可以在互动式命令行中直接咨询 Claude Code CLI:
List all available Skills
Claude Code CLI 将搜索所有可用的 Skill
使用 Skill 也非常简便,只需直接输入提示语:
「流浪猫领养公益海报,视觉主体是 3 只不同毛色的流浪猫(橘猫、三花猫、黑猫,姿态温顺,睁着圆眼看向镜头),趴在铺着柔软灰色毛毯的木质平台上,背景是浅薄荷绿纯色背景,角落点缀小型白色爱心图案,风格为清新治愈的扁平插画风,
色调以薄荷绿、奶白、橘色为主,顶部用圆润字体写‘给它一个家 —— 流浪猫领养日’,下方标注时间(10.1-10.7)和地点(城市中心广场),画面无尖锐元素,整体温暖柔和,传递‘关爱生命’的氛围」,根据上面提示词生成对应内容海报
Claude Code CLI 会依据 Skill 的需求先行设计哲学创作,并保存至 tender_sanctuary_philosophy.md 文件
接着根据设计文件编写 Python 脚本来生成图像
图像生成后,效果如下,效果略显不尽人意,存在中文支持问题,中文未能正确显示
最终替换为英文版本,效果如下:
自定义 Skill
以一个简单的待办事项为例,自定义 Skill 首先需建立一个 skills 文件夹,既可手动创建,也可通过以下命令创建:
$ mkdir -p .claude/skills/my-skill-name
在 my-skill-name 文件夹下创建 SKILL.md 文件,首先建立一个简单的 Skill 输入提示语内容:
---
name: my-first-skill
description: 调用个人工作流。当用户需要执行个人工作流时调用该Skill
allowed-tools: Read,Grep,Glob
---
## 执行步骤
1. 查找项目中 task.md 文件:
```bash
find . -name "task.md"
```
- 没有查找到输出 “项目中不存在task.md”
- 执行下一步
2. 输出 task.md 文件中的未读项
调用同样很简单,直接输入提示语:
调用个人工作流Skill
Claude Code CLI 会依照指定的 Shell 命令查找 task.md 文件,未找到则最终输出“项目中无此 task.md”
我们在项目根目录创建一个 task.md 文件
再次运行自定义 Skill,可以看到输出结果如下:
我们也可以调整 task.md 文件的查找和输出逻辑,以完善和优化 Skill
name: my-first-skill
description: 调用个人工作流。当用户需要执行个人工作流时调用该Skill
allowed-tools: Read,Grep,Glob
-----------------------------
## 执行步骤
1. 查找项目根目录是否存在 task.md 文件, 参考 [reference.md](./reference.md):
- 没有查找到输出 “项目中不存在task.md”
- 找到执行下一步
2. 输出 task.md 文件中的未读项
- 没有未读项输出 “没有未读项”
- 输出未读项,输出格式参考 [templates.md](./templates/templates.md)
reference.md
# task.md文件查找规则
```bash
find . -name "task.md"
```
templates.md
# 任务未读项格式
- 【任务1】(未完成)
- 【任务2】(未完成)
再次运行 Skill 任务,可以看到 AI 按照我们设定的规则输出了结果
当然,Skill 还能实现更多强大的功能扩展,上述仅为简要介绍。
友情提示
见原文:
Claude 推出新功能 Agent Skills,提升你的 Agent 专业性

雷达卡


京公网安备 11010802022788号







