技能 skill-developer
📦

skill-developer

安全

创建 Claude Code 技能

也可从以下获取: 0Chan-smc,0Chan-smc,diet103,Dimon94,DojoCodingLabs

学习使用触发器、钩子和最佳实践构建 Claude Code 技能。本技能提供全面的文档,帮助创建可自动激活的技能,以增强 Claude 的能力。

支持: Claude Codex Code(CC)
📊 71 充足
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“skill-developer”。 如何创建新的 Claude Code 技能?

预期结果:

要创建新的 Claude Code 技能:

1. 在 `.claude/skills/{skill-name}/` 中创建目录
2. 添加带有 YAML 头部信息的 `SKILL.md` 文件:
```markdown
---
name: my-skill
description: 带有触发器关键词的简要描述
---

# 我的技能

您的技能内容写在这里。
```
3. 将条目添加到 `.claude/skills/skill-rules.json`
4. 遵循 500 行规则,将 SKILL.md 保持在 500 行以下。

正在使用“skill-developer”。 有哪些不同的触发器类型?

预期结果:

Claude Code 技能支持四种触发器类型:

1. **关键词** - 提示词中的子字符串匹配(不区分大小写)
2. **意图模式** - 用于动作检测的正则表达式模式
3. **文件路径** - 用于基于位置激活的 glob 模式
4. **内容检测** - 文件内容中的正则表达式

每种类型服务于不同的激活场景。

安全审计

安全
v1 • 2/25/2026

This is a documentation-only skill containing markdown guides for creating Claude Code skills. The static scanner flagged patterns in documentation text (markdown code blocks, regex examples, keywords) as security issues. All findings are false positives - there is no executable code, no user input handling, and no malicious intent. The skill provides legitimate educational content about skill development.

7
已扫描文件
2,224
分析行数
6
发现项
1
审计总数
中风险问题 (6)
Ruby/Shell Backtick Execution (False Positive)
Scanner detected backtick syntax in markdown code blocks showing example commands. These are documentation examples, not actual code execution. Example: `echo 'test' | npx tsx` is a documentation example, not shell execution.
Weak Cryptographic Algorithm (False Positive)
Scanner detected regex patterns in documentation as cryptographic algorithms. Documentation shows regex examples like `(create|add).*?(table|database)` for skill trigger patterns.
Hardcoded URL (False Positive)
Scanner detected URLs in documentation text. URLs like regex101.com appear in troubleshooting sections explaining how to test regex patterns.
Certificate/Key Files (False Positive)
Scanner detected 'keywords' in skill-rules.json configuration reference and flagged it as certificate access.
System Reconnaissance (False Positive)
Scanner flagged documentation showing how to test hooks manually using echo and cat commands.
Critical Heuristic: Code Execution + Network + Credentials (False Positive)
Scanner combined multiple documentation patterns to create a heuristic finding. The combination is from showing example commands (code blocks), mentioning URLs (documentation), and referencing configuration (keywords).
审计者: claude

质量评分

38
架构
100
可维护性
87
内容
50
社区
75
安全
100
规范符合性

你能构建什么

构建您的第一个 Claude Code 技能

学习技能创建的基础知识,包括文件结构、YAML 头部信息和触发器配置。

配置高级技能触发器

掌握意图模式、基于正则表达式的触发器、文件路径匹配和内容检测,以实现精确的技能激活。

设置技能钩子

实现 UserPromptSubmit 和 Stop 钩子,用于主动建议和错误处理提醒。

试试这些提示

技能入门
如何创建新的 Claude Code 技能?需要什么基本的文件结构和 YAML 头部信息?
了解触发器类型
解释技能的不同触发器类型:关键词、意图模式、文件路径和内容检测。分别给出示例。
钩子实现指南
如何设置 UserPromptSubmit 钩子以根据用户输入推荐相关技能?请展示一个钩子实现示例。
排查技能激活问题
我的技能在应该激活时没有激活。如何排查技能触发器问题并测试我的配置?

最佳实践

  • 遵循 500 行规则:将 SKILL.md 保持在 500 行以下,并使用参考文件存储详细内容
  • 使用渐进式披露:在 SKILL.md 中提供概述,并链接到详细的参考文档
  • 包含全面的触发器关键词:在描述中添加所有相关术语、文件类型和用例
  • 发布前测试触发器:验证技能在各种提示词模式下能正确激活

避免

  • 不要创建超过 500 行的技能——使用参考文件来保持可读性
  • 避免使用过于通用的关键词,以免导致意外的激活
  • 不要对非关键技能使用阻塞性执行(block 级别)
  • 避免深度嵌套的参考结构——将参考保持在一层深度

常见问题

什么是 500 行规则?
500 行规则是 Anthropic 推荐的最佳实践,建议将 SKILL.md 文件保持在 500 行以下。超过此限制的详细内容包括在参考文件(如 ADVANCED.md、TROUBLESHOOTING.md)中。
技能触发器是如何工作的?
技能触发器使用四种机制:关键词(子字符串匹配)、意图模式(正则表达式)、文件路径(glob 模式)和内容检测(文件中的正则表达式)。这些在 skill-rules.json 中配置。
什么是技能钩子?
钩子是位于 .claude/hooks/ 中的 TypeScript 文件,在特定时间运行。UserPromptSubmit 在看到用户输入之前运行(用于建议),Stop 在响应之后运行(用于提醒)。
有哪些可用的执行级别?
三种执行级别:BLOCK(以代码 2 退出,仅用于关键错误)、SUGGEST(注入上下文,最常见)和 WARN(咨询通知)。
如何测试我的技能触发器?
使用 TROUBLESHOOTING.md 中显示的手动测试命令:echo JSON payload | npx tsx .claude/hooks/skill-activation-prompt.ts。也可以在 regex101.com 测试正则表达式模式。
什么是渐进式披露?
渐进式披露是一种设计模式,您在 SKILL.md(<500 行)中提供基本信息,并为需要深入了解的用户链接到详细的参考文件。