skill-optimizer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Creator

Skill 创建指南

This skill provides guidance for creating effective skills.
本Skill为创建高效技能提供指导。

About Skills

Skill 介绍

Skills are modular, self-contained packages that extend Claude's capabilities by providing specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific domains or tasks—they transform Claude from a general-purpose agent into a specialized agent equipped with procedural knowledge that no model can fully possess.
Skills follow the Agent Skills open standard, with Claude Code extensions for invocation control, subagent execution, and dynamic context injection.
Skill是模块化、独立的包,通过提供专业知识、工作流和工具来扩展Claude的能力。可以将其视为特定领域或任务的“入门指南”——它们将Claude从通用型Agent转变为具备过程知识的专业Agent,而这类知识是任何模型都无法完全拥有的。
Skill遵循Agent Skills开放标准,并针对Claude Code扩展了调用控制、子Agent执行和动态上下文注入功能。

What Skills Provide

Skill 提供的能力

  1. Specialized workflows - Multi-step procedures for specific domains
  2. Tool integrations - Instructions for working with specific file formats or APIs
  3. Domain expertise - Company-specific knowledge, schemas, business logic
  4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks
  1. 专业工作流 - 特定领域的多步骤流程
  2. 工具集成 - 处理特定文件格式或API的操作说明
  3. 领域专业知识 - 公司特定的知识、架构、业务逻辑
  4. 捆绑资源 - 用于复杂重复任务的脚本、参考资料和资产

Anatomy of a Skill

Skill 的结构

Every skill consists of a required SKILL.md file and optional bundled resources:
skill-name/
├── SKILL.md (required)
│   ├── YAML frontmatter metadata
│   └── Markdown instructions
└── Bundled Resources (optional)
    ├── scripts/          - Executable code (Python/Bash/etc.)
    ├── references/       - Documentation loaded into context as needed
    └── assets/           - Files used in output (templates, icons, fonts)
每个Skill都包含一个必填的SKILL.md文件和可选的捆绑资源:
skill-name/
├── SKILL.md (required)
│   ├── YAML frontmatter metadata
│   └── Markdown instructions
└── Bundled Resources (optional)
    ├── scripts/          - Executable code (Python/Bash/etc.)
    ├── references/       - Documentation loaded into context as needed
    └── assets/           - Files used in output (templates, icons, fonts)

SKILL.md (required)

SKILL.md(必填)

Metadata Quality: The
name
and
description
in YAML frontmatter determine when Claude will use the skill. Be specific about what the skill does and when to use it. Use the third-person (e.g. "This skill should be used when..." instead of "Use this skill when...").
Frontmatter Fields:
FieldRequiredDescription
name
NoDisplay name (max 64 chars, lowercase + hyphens). Defaults to directory name.
description
RecommendedWhat the skill does and when to use it (max 1024 chars).
argument-hint
NoHint shown during autocomplete (e.g.,
[issue-number]
).
disable-model-invocation
No
true
= only user can invoke via
/name
.
user-invocable
No
false
= hide from
/
menu (Claude-only background knowledge).
allowed-tools
NoRestrict tools when skill is active (e.g.,
Read, Grep, Glob
).
model
NoModel override when skill is active.
context
No
fork
= run in isolated subagent.
agent
NoSubagent type:
Explore
,
Plan
,
general-purpose
, or custom from
.claude/agents/
.
hooks
NoScoped hooks for skill lifecycle. See Hooks docs.
Example with all fields:
yaml
---
name: deploy-production
description: Deploy the application to production. Use after all tests pass.
argument-hint: [environment]
disable-model-invocation: true
allowed-tools: Bash(deploy:*), Read
context: fork
agent: general-purpose
---
元数据质量: YAML前置元数据中的
name
description
决定了Claude何时使用该Skill。请明确说明Skill的功能和适用场景。使用第三人称表述(例如:“当...时应使用本Skill”而非“当...时使用本Skill”)。
前置元数据字段:
字段是否必填描述
name
显示名称(最多64个字符,小写+连字符)。默认值为目录名称。
description
推荐Skill的功能和适用场景(最多1024个字符)。
argument-hint
自动补全时显示的提示(例如:
[issue-number]
)。
disable-model-invocation
true
= 仅用户可通过
/name
调用。
user-invocable
false
= 从
/
菜单中隐藏(仅Claude可作为背景知识使用)。
allowed-tools
限制Skill激活时可使用的工具(例如:
Read, Grep, Glob
)。
model
Skill激活时的模型覆盖设置。
context
fork
= 在独立的子Agent中运行。
agent
子Agent类型:
Explore
Plan
general-purpose
,或来自
.claude/agents/
的自定义类型。
hooks
Skill生命周期的作用域钩子。参见Hooks文档
包含所有字段的示例:
yaml
---
name: deploy-production
description: Deploy the application to production. Use after all tests pass.
argument-hint: [environment]
disable-model-invocation: true
allowed-tools: Bash(deploy:*), Read
context: fork
agent: general-purpose
---

String Substitutions

字符串替换

Skills support dynamic value substitution in the markdown content:
VariableDescription
$ARGUMENTS
All arguments passed when invoking (e.g.,
/my-skill arg1 arg2
)
${CLAUDE_SESSION_ID}
Current session ID for logging or session-specific files
If
$ARGUMENTS
is not present in content, arguments are appended as
ARGUMENTS: <value>
.
Example:
markdown
---
name: fix-issue
description: Fix a GitHub issue
disable-model-invocation: true
---

Fix GitHub issue $ARGUMENTS following our coding standards.

Log progress to logs/${CLAUDE_SESSION_ID}.log
Skill支持在Markdown内容中进行动态值替换:
变量描述
$ARGUMENTS
调用时传递的所有参数(例如:
/my-skill arg1 arg2
${CLAUDE_SESSION_ID}
当前会话ID,用于日志或会话特定文件
如果内容中未包含
$ARGUMENTS
,参数将以
ARGUMENTS: <value>
的形式追加到内容末尾。
示例:
markdown
---
name: fix-issue
description: Fix a GitHub issue
disable-model-invocation: true
---

Fix GitHub issue $ARGUMENTS following our coding standards.

Log progress to logs/${CLAUDE_SESSION_ID}.log

Dynamic Context Injection

动态上下文注入

The exclamation-backtick syntax runs shell commands before skill content reaches Claude. The command output replaces the placeholder.
Syntax: exclamation mark followed by backtick-wrapped command:
EXCLAIM
+
BACKTICK command BACKTICK
Example skill content:
undefined
感叹号+反引号语法会在Skill内容传递给Claude之前执行Shell命令,命令输出将替换占位符。
语法: 感叹号后跟反引号包裹的命令:
!
+
`command`
Skill内容示例:
undefined

PR Context

PR 上下文

  • Diff: EXCLAIM-BACKTICK gh pr diff BACKTICK
  • Comments: EXCLAIM-BACKTICK gh pr view --comments BACKTICK
  • Changed files: EXCLAIM-BACKTICK gh pr diff --name-only BACKTICK
Summarize this pull request...

(Replace EXCLAIM with the exclamation mark character and BACKTICK with the backtick character in real skills)

When this skill runs:
1. Each exclamation-backtick command executes immediately (before Claude sees anything)
2. The output replaces the placeholder in the skill content
3. Claude receives the fully-rendered prompt with actual data

This is preprocessing, not something Claude executes. Claude only sees the final result.
  • 差异:!
    gh pr diff
  • 评论:!
    gh pr view --comments
  • 修改文件:!
    gh pr diff --name-only
总结本次拉取请求...

(在实际Skill中,将EXCLAIM替换为感叹号字符,BACKTICK替换为反引号字符)

当该Skill运行时:
1. 每个感叹号+反引号命令会立即执行(在Claude看到任何内容之前)
2. 输出会替换Skill内容中的占位符
3. Claude会收到包含实际数据的完整渲染提示

这是预处理步骤,并非由Claude执行。Claude仅能看到最终结果。

Invocation Control

调用控制

By default, both users and Claude can invoke any skill. Two frontmatter fields control this:
FrontmatterUser can invokeClaude can invokeIn context
(default)YesYesDescription always visible
disable-model-invocation: true
YesNoDescription hidden from Claude
user-invocable: false
NoYesDescription always visible
When to use each:
  • disable-model-invocation: true
    : For workflows with side effects (deploy, commit, send-message). Prevents Claude from triggering automatically.
  • user-invocable: false
    : For background knowledge that isn't a meaningful command (e.g.,
    legacy-system-context
    ). Claude should know this when relevant, but
    /legacy-system-context
    isn't useful for users.
默认情况下,用户和Claude都可以调用任何Skill。两个前置元数据字段可控制这一权限:
前置元数据用户可调用Claude可调用上下文可见性
默认描述始终可见
disable-model-invocation: true
描述对Claude隐藏
user-invocable: false
描述始终可见
适用场景:
  • disable-model-invocation: true
    :适用于有副作用的工作流(部署、提交、发送消息)。防止Claude自动触发。
  • user-invocable: false
    :适用于非命令型的背景知识(例如:
    legacy-system-context
    )。Claude在相关场景下需要知晓,但
    /legacy-system-context
    对用户无实际用途。

Subagent Integration

子Agent集成

Add
context: fork
to run skills in isolation. The skill content becomes the subagent's prompt (no conversation history access).
yaml
---
name: deep-research
description: Research a topic thoroughly
context: fork
agent: Explore
---

Research $ARGUMENTS thoroughly:
1. Find relevant files using Glob and Grep
2. Read and analyze the code
3. Summarize findings with specific file references
Agent options:
AgentDescription
Explore
Read-only codebase exploration (Glob, Grep, Read)
Plan
Architecture planning and design
general-purpose
Full capabilities (default)
CustomAny agent from
.claude/agents/
Note:
context: fork
only makes sense for skills with explicit instructions. Guidelines-only skills (e.g., "use these API conventions") receive no actionable prompt and return without meaningful output.
添加
context: fork
可在独立环境中运行Skill。Skill内容将作为子Agent的提示(无法访问对话历史)。
yaml
---
name: deep-research
description: Research a topic thoroughly
context: fork
agent: Explore
---

Research $ARGUMENTS thoroughly:
1. Find relevant files using Glob and Grep
2. Read and analyze the code
3. Summarize findings with specific file references
Agent选项:
Agent描述
Explore
只读代码库探索(Glob、Grep、Read)
Plan
架构规划与设计
general-purpose
完整能力(默认)
Custom
.claude/agents/
中的任何自定义Agent
注意:
context: fork
仅适用于包含明确指令的Skill。仅含指南的Skill(例如:“使用这些API约定”)因无可行提示,将无意义输出并返回。

Skill Locations

Skill 存储位置

Where a skill is stored determines who can use it:
LocationPathApplies toPriority
EnterpriseManaged settingsAll org usersHighest
Personal
~/.claude/skills/<name>/SKILL.md
All your projectsHigh
Project
.claude/skills/<name>/SKILL.md
This project onlyMedium
Plugin
<plugin>/skills/<name>/SKILL.md
Where plugin enabledNamespaced
When skills share the same name, higher-priority locations win. Plugin skills use
plugin-name:skill-name
namespace, so they cannot conflict.
Nested discovery: When editing files in subdirectories (e.g.,
packages/frontend/
), Claude Code also discovers skills from nested
.claude/skills/
directories. This supports monorepos where packages have their own skills.
Legacy commands: Files in
.claude/commands/
still work with the same frontmatter. Skills are recommended since they support additional features like supporting files.
Skill以目录形式存在于本地文件系统中,Claude通过Bash命令和文件操作与之交互。
Claude访问Skill内容的方式:
  1. 读取指令: 当Skill被触发时,Claude通过Bash从文件系统读取SKILL.md,将其指令带入上下文
  2. 加载参考资料: 如果指令引用了其他文件(如
    references/api_docs.md
    或数据库架构),Claude会通过额外的Bash命令读取这些文件
  3. 执行脚本: 当指令提到可执行脚本时,Claude通过Bash运行它们。仅脚本输出会进入上下文,代码本身不会
这带来的能力:
  • 按需文件访问: Claude仅读取每个任务所需的文件。一个Skill可以包含数十个参考文件,但如果您的任务仅需要一个架构,Claude只会加载该文件。其余文件不会消耗任何令牌
  • 高效脚本执行: 当Claude运行
    validate_form.py
    时,仅输出会消耗令牌,而非200行的脚本。这使得脚本比Claude实时生成等效代码高效得多
  • 捆绑内容无实际限制: 因为文件在被访问前不会消耗上下文,所以Skill可以包含全面的文档、数据集、示例或参考资料,而不会产生上下文开销
工作流示例:
1. 用户:“处理此PDF并提取表格”
2. Claude:bash: read pdf-skill/SKILL.md
3. SKILL.md提到scripts/extract_tables.py
4. Claude:bash: python scripts/extract_tables.py input.pdf
5. 脚本输出:“提取了3个表格:[表格数据...]”
6. Claude使用提取的数据继续处理(脚本代码从未进入上下文)

Bundled Resources (optional)

Skill 创建流程

Scripts (
scripts/
)
Content Type: Code - Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.
  • When to include: When the same code is being rewritten repeatedly or deterministic reliability is needed
  • Example:
    scripts/rotate_pdf.py
    for PDF rotation tasks
  • Benefits: Token efficient, deterministic, script code never enters context - only output does
  • Key advantage: A 200-line script only costs ~20 tokens (the output), not 2000+ tokens (the code)
  • Note: Scripts may still need to be read by Claude for patching or environment-specific adjustments
要创建Skill,请按“Skill创建流程”顺序执行步骤,仅在明确某步骤不适用时才可跳过。
References (
references/
)

步骤1:通过具体示例理解Skill

Content Type: Instructions - Documentation and reference material intended to be loaded as needed into context to inform Claude's process and thinking.
  • When to include: For documentation that Claude should reference while working
  • Examples:
    references/finance.md
    for financial schemas,
    references/mnda.md
    for company NDA template,
    references/policies.md
    for company policies,
    references/api_docs.md
    for API specifications
  • Use cases: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides
  • Benefits: Keeps SKILL.md lean, loaded only when Claude determines it's needed
  • Best practice: If files are large (>10k words), include grep search patterns in SKILL.md
  • Avoid duplication: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.
仅当Skill的使用模式已清晰理解时,才可跳过此步骤。即使处理现有Skill,此步骤仍有价值。
要创建有效的Skill,需清晰理解Skill的具体使用示例。这种理解可来自直接的用户示例,或经用户反馈验证的生成示例。
例如,在构建图像编辑器Skill时,相关问题包括:
  • “图像编辑器Skill应支持哪些功能?编辑、旋转,或其他功能?”
  • “能否提供一些该Skill的使用示例?”
  • “我可以想象用户会要求‘去除这张图片的红眼’或‘旋转这张图片’。您认为用户还会以哪些方式使用该Skill?”
  • “用户说什么话时应该触发该Skill?”
为避免使用户不知所措,请勿在一条消息中提出过多问题。从最重要的问题开始,根据需要跟进以提高效率。
当明确Skill应支持的功能时,即可结束此步骤。
Assets (
assets/
)

步骤2:规划可复用的Skill内容

Content Type: Resources - Files not intended to be loaded into context, but rather used within the output Claude produces.
  • When to include: When the skill needs files that will be used in the final output
  • Examples:
    assets/logo.png
    for brand assets,
    assets/slides.pptx
    for PowerPoint templates,
    assets/frontend-template/
    for HTML/React boilerplate,
    assets/font.ttf
    for typography
  • Use cases: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified
  • Benefits: Separates output resources from documentation, enables Claude to use files without loading them into context
要将具体示例转化为有效的Skill,请通过以下方式分析每个示例:
  1. 考虑如何从头开始执行该示例
  2. 确定在重复执行这些工作流时,哪些脚本、参考资料和资源文件会有帮助
示例:当构建
pdf-editor
Skill以处理“帮我旋转此PDF”等查询时,分析结果如下:
  1. 旋转PDF需要重复编写相同的代码
  2. 在Skill中存储
    scripts/rotate_pdf.py
    脚本会很有帮助
示例:当设计
frontend-webapp-builder
Skill以处理“帮我构建一个待办事项应用”或“帮我构建一个步骤跟踪仪表板”等查询时,分析结果如下:
  1. 构建前端Web应用需要重复编写相同的HTML/React样板代码
  2. 在Skill中存储包含HTML/React项目样板代码的
    assets/hello-world/
    模板会很有帮助
示例:当构建
big-query
Skill以处理“今天有多少用户登录?”等查询时,分析结果如下:
  1. 查询BigQuery需要重复发现表架构和关系
  2. 在Skill中存储记录表架构的
    references/schema.md
    文件会很有帮助
要确定Skill的内容,请分析每个具体示例,创建要包含的可复用资源列表:脚本、参考资料和资源文件。

Progressive Disclosure Design Principle

步骤3:初始化Skill

Skills use a three-level loading system to manage context efficiently:
LevelWhen LoadedToken CostContent
Level 1: MetadataAlways (at startup)~100 tokens per Skill
name
and
description
from YAML frontmatter
Level 2: InstructionsWhen Skill is triggeredUnder 5k tokensSKILL.md body with instructions and guidance
Level 3+: ResourcesAs neededEffectively unlimited*Bundled files executed via bash without loading into context
*Scripts are executed without loading code into context (only output enters context). Reference files and assets are loaded only when Claude explicitly accesses them via bash commands.
Key insight: You can install dozens of Skills with minimal context penalty. Claude only knows each Skill exists and when to use it until one is triggered.
Context budget: Skill descriptions are loaded into context so Claude knows what's available. If you have many skills, they may exceed the character budget (default 15,000 characters). Run
/context
to check for excluded skills. To increase the limit, set
SLASH_COMMAND_TOOL_CHAR_BUDGET
environment variable.
此时,应实际创建Skill。
仅当正在开发的Skill已存在,且需要迭代或打包时,才可跳过此步骤。在这种情况下,继续执行下一步。
从头开始创建新Skill时,请始终运行
init_skill.py
脚本。该脚本会方便地生成一个新的模板Skill目录,自动包含Skill所需的所有内容,使Skill创建过程更加高效和可靠。
使用方法:
bash
scripts/init_skill.py <skill-name> --path <output-directory>
该脚本会:
  • 在指定路径创建Skill目录
  • 生成包含正确前置元数据和TODO占位符的SKILL.md模板
  • 创建示例资源目录:
    scripts/
    references/
    assets/
  • 在每个目录中添加可自定义或删除的示例文件
初始化完成后,根据需要自定义或删除生成的SKILL.md和示例文件。

The Skills Filesystem Architecture

步骤4:编辑Skill

Skills exist as directories on the local filesystem, and Claude interacts with them using bash commands and file operations.
How Claude accesses Skill content:
  1. Reading instructions: When a Skill is triggered, Claude reads SKILL.md from the filesystem via bash, bringing its instructions into context
  2. Loading references: If instructions reference other files (like
    references/api_docs.md
    or database schemas), Claude reads those files using additional bash commands
  3. Executing scripts: When instructions mention executable scripts, Claude runs them via bash. Only the script output enters context, not the code itself
What this enables:
  • On-demand file access: Claude reads only the files needed for each task. A Skill can include dozens of reference files, but if your task only needs one schema, Claude loads just that file. The rest consume zero tokens
  • Efficient script execution: When Claude runs
    validate_form.py
    , only the output consumes tokens, not the 200-line script. This makes scripts far more efficient than having Claude generate equivalent code on the fly
  • No practical limit on bundled content: Because files don't consume context until accessed, Skills can include comprehensive documentation, datasets, examples, or reference materials without context penalty
Example workflow:
1. User: "Process this PDF and extract tables"
2. Claude: bash: read pdf-skill/SKILL.md
3. SKILL.md mentions scripts/extract_tables.py
4. Claude: bash: python scripts/extract_tables.py input.pdf
5. Script output: "Extracted 3 tables: [table data...]"
6. Claude proceeds using the extracted data (script code never entered context)
编辑(新生成或现有)Skill时,请记住该Skill是为另一个Claude实例创建的。重点包含对Claude有益且非显而易见的信息。考虑哪些过程知识、领域特定细节或可复用资源能帮助另一个Claude实例更有效地执行这些任务。

Skill Creation Process

从可复用Skill内容开始

To create a skill, follow the "Skill Creation Process" in order, skipping steps only if there is a clear reason why they are not applicable.
要开始实现,请从上述确定的可复用资源开始:
scripts/
references/
assets/
文件。请注意,此步骤可能需要用户输入。例如,在实现
brand-guidelines
Skill时,用户可能需要提供品牌资产或模板以存储在
assets/
中,或提供文档以存储在
references/
中。
此外,删除Skill不需要的任何示例文件和目录。初始化脚本会在
scripts/
references/
assets/
中创建示例文件以展示结构,但大多数Skill不需要所有这些文件。

Step 1: Understanding the Skill with Concrete Examples

从文档填充参考资料(可选)

Skip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.
To create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.
For example, when building an image-editor skill, relevant questions include:
  • "What functionality should the image-editor skill support? Editing, rotating, anything else?"
  • "Can you give some examples of how this skill would be used?"
  • "I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?"
  • "What would a user say that should trigger this skill?"
To avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.
Conclude this step when there is a clear sense of the functionality the skill should support.
对于基于现有框架、库或工具且具备在线文档的Skill,可使用Skill_Seekers(v2.0.0+)自动抓取并整理文档到
references/
目录。Skill_Seekers现在支持统一多源抓取,将文档网站、GitHub仓库和PDF文件合并为全面的参考资料。
适用场景:
  • 为具备全面在线文档的框架构建Skill(React、Django、FastAPI等)
  • 为游戏引擎创建Skill(Godot、Unity)
  • 为API或库编写具备Web文档的Skill
  • 直接从GitHub源代码提取API参考
  • 合并多个来源(文档+代码+PDF)以创建全面的Skill
  • 检测文档与实际实现之间的差异
快速开始:
bash
undefined

Step 2: Planning the Reusable Skill Contents

一次性设置

To turn concrete examples into an effective skill, analyze each example by:
  1. Considering how to execute on the example from scratch
  2. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly
Example: When building a
pdf-editor
skill to handle queries like "Help me rotate this PDF," the analysis shows:
  1. Rotating a PDF requires re-writing the same code each time
  2. A
    scripts/rotate_pdf.py
    script would be helpful to store in the skill
Example: When designing a
frontend-webapp-builder
skill for queries like "Build me a todo app" or "Build me a dashboard to track my steps," the analysis shows:
  1. Writing a frontend webapp requires the same boilerplate HTML/React each time
  2. An
    assets/hello-world/
    template containing the boilerplate HTML/React project files would be helpful to store in the skill
Example: When building a
big-query
skill to handle queries like "How many users have logged in today?" the analysis shows:
  1. Querying BigQuery requires re-discovering the table schemas and relationships each time
  2. A
    references/schema.md
    file documenting the table schemas would be helpful to store in the skill
To establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.
git clone https://github.com/yusufkaraaslan/Skill_Seekers.git ~/Skill_Seekers cd ~/Skill_Seekers pip install requests beautifulsoup4

Step 3: Initializing the Skill

选项1:仅文档抓取(经典方法)

At this point, it is time to actually create the skill.
Skip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.
When creating a new skill from scratch, always run the
init_skill.py
script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.
Usage:
bash
scripts/init_skill.py <skill-name> --path <output-directory>
The script:
  • Creates the skill directory at the specified path
  • Generates a SKILL.md template with proper frontmatter and TODO placeholders
  • Creates example resource directories:
    scripts/
    ,
    references/
    , and
    assets/
  • Adds example files in each directory that can be customized or deleted
After initialization, customize or remove the generated SKILL.md and example files as needed.
python3 cli/doc_scraper.py --config configs/react.json cp -r output/react/references/* /path/to/your-skill/references/

Step 4: Edit the Skill

选项2:仅GitHub抓取(从源代码提取API)

When editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of Claude to use. Focus on including information that would be beneficial and non-obvious to Claude. Consider what procedural knowledge, domain-specific details, or reusable assets would help another Claude instance execute these tasks more effectively.
python3 cli/github_scraper.py --repo facebook/react --extract-api cp -r output/react_github/references/* /path/to/your-skill/references/

Start with Reusable Skill Contents

选项3:统一多源抓取(推荐)

将文档+GitHub代码+PDF合并为一个全面的Skill

To begin implementation, start with the reusable resources identified above:
scripts/
,
references/
, and
assets/
files. Note that this step may require user input. For example, when implementing a
brand-guidelines
skill, the user may need to provide brand assets or templates to store in
assets/
, or documentation to store in
references/
.
Also, delete any example files and directories not needed for the skill. The initialization script creates example files in
scripts/
,
references/
, and
assets/
to demonstrate structure, but most skills won't need all of them.
python3 cli/unified_scraper.py --config configs/react_unified.json cp -r output/react_complete/references/* /path/to/your-skill/references/

Populating References from Documentation (Optional)

选项4:自定义统一配置

For skills based on existing frameworks, libraries, or tools with online documentation, use Skill_Seekers (v2.0.0+) to automatically scrape and organize documentation into the
references/
directory. Skill_Seekers now supports unified multi-source scraping, combining documentation websites, GitHub repositories, and PDF files into comprehensive reference materials.
When to use this approach:
  • Building skills for frameworks with comprehensive online docs (React, Django, FastAPI, etc.)
  • Creating skills for game engines (Godot, Unity)
  • Documenting APIs or libraries with web-based documentation
  • Extracting API references directly from GitHub source code
  • Combining multiple sources (docs + code + PDFs) for comprehensive skills
  • Detecting discrepancies between documentation and actual implementation
Quick Start:
bash
undefined
python3 cli/config_validator.py configs/myframework_unified.json python3 cli/unified_scraper.py --config configs/myframework_unified.json

**替代方案:** 对于简单需求或非Web文档,手动在`references/`目录中创建参考文件。

有关Skill_Seekers的详细文档,请参见`references/documentation-scraping.md`。

One-time setup

更新SKILL.md

git clone https://github.com/yusufkaraaslan/Skill_Seekers.git ~/Skill_Seekers cd ~/Skill_Seekers pip install requests beautifulsoup4
写作风格: 使用祈使/不定式形式(动词开头的指令)编写整个Skill,而非第二人称。使用客观的说明性语言(例如:“要完成X,请执行Y”而非“您应该做X”或“如果您需要做X”)。这保持了AI消费的一致性和清晰度。避免使用全大写字母强调——改用粗体Markdown或章节标题。避免使用CRITICAL/MANDATORY/MUST等限定词;直接的祈使句对Claude 4.6已足够。
要完成SKILL.md,请回答以下问题:
  1. Skill的用途是什么?用几句话说明。
  2. 何时应使用该Skill?
  3. 实际上,Claude应如何使用该Skill?应引用上述开发的所有可复用Skill内容,以便Claude了解如何使用它们。

Option 1: Documentation-only scraping (classic approach)

Claude 4.6 提示对齐

python3 cli/doc_scraper.py --config configs/react.json cp -r output/react/references/* /path/to/your-skill/references/
编写或审核Skill指令时,请遵循以下模式:
语言校准:
  • 使用直接的祈使句,无需全大写强调。例如“使用Firecrawl进行网页抓取”而非“始终使用Firecrawl”或“您必须使用Firecrawl”。
  • 用普通标题替换CRITICAL/MANDATORY/MUST标记。Claude 4.6会遵循结构清晰的指令,无需强制框架。
  • 说明指令背后的原因。例如“使用--only-main-content以减少令牌消耗”而非“始终使用--only-main-content”。Claude从解释中泛化能力更强。
移除反懒惰提示:
  • 请勿包含“彻底完成”、“仔细思考”、“不要偷懒”或激励性框架。Claude 4.6本身已具备主动性——这些提示会将其放大为过度规划或写了又改的循环。
子Agent指导(针对编排Skill):
  • 包含明确的指导,说明何时不应生成Agent。Claude 4.6即使在直接方法更快的情况下,也倾向于使用子Agent。
  • 例如:“当任务可并行运行或需要隔离上下文时使用Agent。对于顺序任务、单文件编辑或可在5分钟内完成的工作,直接处理即可。”
防止过度积极:
  • 包含关于最小化解决方案的指导。事实质量标准(“遵循现有约定”)优于激励性框架(“对抗熵增”)。

Option 2: GitHub-only scraping (extract API from source code)

步骤5:打包Skill

python3 cli/github_scraper.py --repo facebook/react --extract-api cp -r output/react_github/references/* /path/to/your-skill/references/
Skill准备就绪后,应将其打包为可分发的ZIP文件,与用户共享。打包过程会先自动验证Skill,确保其符合所有要求:
bash
scripts/package_skill.py <path/to/skill-folder>
可选的输出目录指定:
bash
scripts/package_skill.py <path/to/skill-folder> ./dist
打包脚本会:
  1. 自动验证Skill,检查:
    • YAML前置元数据格式和必填字段
    • Skill命名约定和目录结构
    • 描述的完整性和质量
    • 文件组织和资源引用
  2. 打包Skill(如果验证通过),创建以Skill命名的ZIP文件(例如:
    my-skill.zip
    ),包含所有文件并保持正确的目录结构以便分发。
如果验证失败,脚本会报告错误并退出,不会创建包。修复所有验证错误后,重新运行打包命令。

Option 3: Unified multi-source scraping (RECOMMENDED)

步骤6:迭代

Combines documentation + GitHub code + PDFs into one comprehensive skill

python3 cli/unified_scraper.py --config configs/react_unified.json cp -r output/react_complete/references/* /path/to/your-skill/references/
测试Skill后,用户可能会要求改进。通常这会在使用Skill后立即发生,此时用户对Skill的表现有清晰的上下文。
迭代工作流:
  1. 在实际任务中使用Skill
  2. 注意遇到的困难或低效之处
  3. 确定应如何更新SKILL.md或捆绑资源
  4. 实施更改并再次测试

Option 4: Custom unified config

共享Skill

python3 cli/config_validator.py configs/myframework_unified.json python3 cli/unified_scraper.py --config configs/myframework_unified.json

**Alternative:** For simpler needs or when documentation is not web-based, manually create reference files in the `references/` directory.

For detailed Skill_Seekers documentation, see `references/documentation-scraping.md`.
Skill可在不同范围内分发:
  • 项目级Skill:
    .claude/skills/
    提交到版本控制系统
  • 插件:插件中创建
    skills/
    目录
  • 托管: 通过托管设置在组织内部署

Update SKILL.md

故障排除

Skill未触发

Writing Style: Write the entire skill using imperative/infinitive form (verb-first instructions), not second person. Use objective, instructional language (e.g., "To accomplish X, do Y" rather than "You should do X" or "If you need to do X"). This maintains consistency and clarity for AI consumption. Avoid ALL CAPS for emphasis — use bold markdown or section headings instead. Avoid CRITICAL/MANDATORY/MUST qualifiers; direct imperatives are sufficient for Claude 4.6.
To complete SKILL.md, answer the following questions:
  1. What is the purpose of the skill, in a few sentences?
  2. When should the skill be used?
  3. In practice, how should Claude use the skill? All reusable skill contents developed above should be referenced so that Claude knows how to use them.
如果Claude未在预期时使用Skill:
  1. 检查描述是否包含用户自然会使用的关键词
  2. 验证Skill在响应“What skills are available?”时是否显示
  3. 尝试重新表述请求,使其更匹配描述
  4. 如果Skill允许用户调用,直接使用
    /skill-name
    调用

Claude 4.6 Prompting Alignment

Skill触发过于频繁

When writing or reviewing skill instructions, follow these patterns:
Language calibration:
  • Use direct imperatives without ALL CAPS emphasis. "Use Firecrawl for web scraping" not "ALWAYS use Firecrawl" or "You MUST use Firecrawl."
  • Replace CRITICAL/MANDATORY/MUST markers with plain headings. Claude 4.6 follows well-structured instructions without coercive framing.
  • Explain WHY behind directives. "Use --only-main-content to reduce token consumption" not "ALWAYS use --only-main-content." Claude generalizes better from explanations.
Remove anti-laziness prompts:
  • Do not include "be thorough," "think carefully," "do not be lazy," or motivational framing. Claude 4.6 is already proactive — these amplify it into over-planning or write-then-rewrite loops.
Subagent guidance (for orchestration skills):
  • Include explicit guidance on when NOT to spawn agents. Claude 4.6 tends to reach for subagents even when a direct approach is faster.
  • "Use agents when tasks can run in parallel or require isolated context. For sequential tasks, single-file edits, or work completable in under 5 minutes, work directly."
Overeagerness prevention:
  • Include guidance about minimal solutions. Factual quality criteria ("maintain existing conventions") outperform motivational framing ("fight entropy").
如果Claude在不需要时使用Skill:
  1. 使描述更具体
  2. 如果仅需要手动调用,添加
    disable-model-invocation: true

Step 5: Packaging a Skill

Claude无法看到所有Skill

Once the skill is ready, it should be packaged into a distributable zip file that gets shared with the user. The packaging process automatically validates the skill first to ensure it meets all requirements:
bash
scripts/package_skill.py <path/to/skill-folder>
Optional output directory specification:
bash
scripts/package_skill.py <path/to/skill-folder> ./dist
The packaging script will:
  1. Validate the skill automatically, checking:
    • YAML frontmatter format and required fields
    • Skill naming conventions and directory structure
    • Description completeness and quality
    • File organization and resource references
  2. Package the skill if validation passes, creating a zip file named after the skill (e.g.,
    my-skill.zip
    ) that includes all files and maintains the proper directory structure for distribution.
If validation fails, the script will report the errors and exit without creating a package. Fix any validation errors and run the packaging command again.
Skill描述会加载到上下文中。如果有多个Skill,它们可能会超出字符预算(默认15000字符)。运行
/context
命令检查是否有关于排除Skill的警告。
要提高限制,设置
SLASH_COMMAND_TOOL_CHAR_BUDGET
环境变量。

Step 6: Iterate

相关资源

After testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.
Iteration workflow:
  1. Use the skill on real tasks
  2. Notice struggles or inefficiencies
  3. Identify how SKILL.md or bundled resources should be updated
  4. Implement changes and test again
  • 子Agent 将任务委托给专业Agent
  • 插件 将Skill与其他扩展一起打包和分发
  • Hooks 围绕工具事件自动化工作流
  • 内存 管理CLAUDE.md文件以实现持久上下文
  • 权限 控制工具和Skill的访问权限

Sharing Skills

Skills can be distributed at different scopes:
  • Project skills: Commit
    .claude/skills/
    to version control
  • Plugins: Create a
    skills/
    directory in your plugin
  • Managed: Deploy organization-wide through managed settings

Troubleshooting

Skill not triggering

If Claude doesn't use a skill when expected:
  1. Check the description includes keywords users would naturally say
  2. Verify the skill appears in response to "What skills are available?"
  3. Try rephrasing the request to match the description more closely
  4. Invoke it directly with
    /skill-name
    if the skill is user-invocable

Skill triggers too often

If Claude uses a skill when not wanted:
  1. Make the description more specific
  2. Add
    disable-model-invocation: true
    if only manual invocation is wanted

Claude doesn't see all skills

Skill descriptions are loaded into context. If there are many skills, they may exceed the character budget (default 15,000 characters). Run
/context
to check for a warning about excluded skills.
To increase the limit, set the
SLASH_COMMAND_TOOL_CHAR_BUDGET
environment variable.

Related Resources

  • Subagents: Delegate tasks to specialized agents
  • Plugins: Package and distribute skills with other extensions
  • Hooks: Automate workflows around tool events
  • Memory: Manage CLAUDE.md files for persistent context
  • Permissions: Control tool and skill access