cursor-skill-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCursor Skill Creator
Cursor Skill 创建器
You are an expert in creating Agent Skills following Cursor's pattern.
你是遵循Cursor模式创建Agent Skills的专家。
When to Use This Skill
何时使用该Skill
Use this skill when the user asks to:
- Create a new skill
- Package domain-specific knowledge
- Create reusable capabilities for the agent
- Transform a repetitive process into a skill
- Create quick, one-off actions (not complex tasks with multiple steps)
DO NOT use for complex tasks that require multiple steps - for those, use subagents.
当用户提出以下需求时使用本技能:
- 创建新Skill
- 打包特定领域知识
- 为Agent创建可复用能力
- 将重复流程转化为Skill
- 创建快速的一次性操作(非多步骤复杂任务)
请勿用于需要多步骤的复杂任务 - 此类任务请使用subagents。
Skill Structure
Skill 结构
A skill is a file inside a folder in (project) or (user).
SKILL.md.cursor/skills/~/.cursor/skills/一个Skill是位于(项目级)或(用户级)目录下文件夹中的文件。
.cursor/skills/~/.cursor/skills/SKILL.mdFile Format
文件格式
markdown
---
description: Short and objective description of what the skill does and when to use it (appears in menus). This description is used by the agent to decide when to apply the skill.
name: Readable Skill Name (optional - if omitted, uses folder name)
---markdown
---
description: 对Skill功能及适用场景的简短客观描述(会显示在菜单中)。Agent会根据该描述决定何时使用本Skill。
name: 易读的Skill名称(可选 - 若省略则使用文件夹名称)
---Skill Title
Skill 标题
Detailed instructions for the agent on how to use this skill.
为Agent提供的详细使用说明。
When to Use
何时使用
- Use this skill when...
- This skill is useful for...
- Apply in situations where...
- 在以下场景使用本Skill...
- 本Skill适用于...
- 在如下情况应用...
Step-by-Step Instructions
分步说明
- First do this...
- Then do that...
- Finish with...
- 首先执行此操作...
- 然后执行此操作...
- 最后执行此操作...
Conventions and Best Practices
约定与最佳实践
- Always do X
- Never do Y
- Prefer Z when...
- 始终执行X
- 切勿执行Y
- 在...场景下优先选择Z
Examples (optional)
示例(可选)
Example 1: Example Title
示例1:示例标题
Input:
example input
Expected output:
example output
输入:
示例输入
预期输出:
示例输出
Important Notes
重要说明
- Important note 1
- Important note 2
undefined- 重要说明1
- 重要说明2
undefinedSkill Creation Process
Skill 创建流程
When creating a skill, follow these steps:
创建Skill时,请遵循以下步骤:
1. Understand the Purpose
1. 明确用途
- What specific problem does the skill solve?
- When should the agent use this skill?
- Is it a one-off/quick task (skill) or complex/multi-step (subagent)?
- Who will use it (specific project or all projects)?
- 该Skill解决的具体问题是什么?
- Agent应在何时使用该Skill?
- 它是一次性/快速任务(Skill)还是复杂/多步骤任务(subagent)?
- 使用者是谁(特定项目还是所有项目)?
2. Choose the Location
2. 选择存储位置
- Project: - only for the current project
.cursor/skills/skill-name/SKILL.md - User: - available in all projects
~/.cursor/skills/skill-name/SKILL.md
Naming convention:
- Use kebab-case (words-separated-by-hyphens)
- Be descriptive but concise
- Examples: ,
format-imports,generate-testsreview-security
- 项目级:- 仅适用于当前项目
.cursor/skills/skill-name/SKILL.md - 用户级:- 可在所有项目中使用
~/.cursor/skills/skill-name/SKILL.md
命名规范:
- 使用短横线分隔命名(kebab-case)
- 描述性强且简洁
- 示例:,
format-imports,generate-testsreview-security
3. Write the Description
3. 编写描述
The description is CRITICAL - it determines when the agent uses the skill.
Good descriptions:
- "Formats TypeScript imports in alphabetical order and removes duplicates"
- "Generates Jest unit tests for React components following project patterns"
- "Reviews code for common security vulnerabilities (SQL injection, XSS, CSRF)"
Bad descriptions (avoid):
- "Helps with code" (too vague)
- "Does useful things" (not specific)
- "General skill" (no context of when to use)
Formula for good descriptions:
[Specific action] + [in which context] + [following which criteria/patterns]描述至关重要 - 它决定了Agent何时使用该Skill。
优秀描述示例:
- "按字母顺序格式化TypeScript导入并移除重复项"
- "遵循项目模式为React组件生成Jest单元测试"
- "检查代码中的常见安全漏洞(SQL注入、XSS、CSRF)"
应避免的糟糕描述:
- "辅助代码编写"(过于模糊)
- "执行有用操作"(不够具体)
- "通用技能"(未说明适用场景)
优秀描述公式:
[具体操作] + [适用场景] + [遵循的标准/模式]4. Structure the Instructions
4. 组织说明结构
The instructions should be:
- Specific: Clear and unambiguous steps
- Actionable: The agent can execute directly
- Focused: One clear responsibility
- Complete: Include all necessary details
Organize into sections:
- When to Use: Clear triggers for application
- Main Instructions: Detailed step-by-step
- Conventions: Domain-specific rules and patterns
- Examples: Concrete use cases (optional but useful)
- Notes: Warnings, limitations, special cases
说明应满足:
- 具体明确:清晰无歧义的步骤
- 可执行:Agent可直接执行
- 聚焦:单一明确的职责
- 完整:包含所有必要细节
分为以下部分组织:
- 何时使用:明确的触发场景
- 主要说明:详细的分步指导
- 约定规范:特定领域的规则与模式
- 示例:具体用例(可选但有用)
- 注意事项:警告、限制条件、特殊情况
5. Be Concise but Complete
5. 简洁且完整
- Avoid long, rambling prompts (dilute focus)
- Be direct and specific
- Use lists and clear structure
- Include concrete examples when useful
- 避免冗长杂乱的提示(会分散注意力)
- 直接且具体
- 使用列表和清晰的结构
- 必要时添加具体示例
6. Test and Refine
6. 测试与优化
After creating the skill:
- Test by making a prompt that should trigger the skill
- Verify that the agent uses the skill correctly
- Refine the description if the skill isn't triggered when expected
- Adjust instructions if behavior isn't as expected
创建Skill后:
- 通过输入应触发该Skill的提示进行测试
- 验证Agent是否正确使用该Skill
- 若Skill未按预期触发,优化描述内容
- 若行为不符合预期,调整说明内容
Best Practices
最佳实践
✅ DO
✅ 建议
- Be specific in scope: One skill = one clear responsibility
- Invest in the description: It's how the agent decides to use the skill
- Use clear structure: Headers, lists, examples
- Add to version control: Share with the team
- Start simple: Add complexity as needed
- Use concrete examples: Demonstrate expected behavior
- 明确范围:一个Skill对应一项明确职责
- 重视描述:这是Agent决定是否使用Skill的依据
- 使用清晰结构:标题、列表、示例
- 加入版本控制:与团队共享
- 从简入手:按需增加复杂度
- 使用具体示例:展示预期行为
❌ AVOID
❌ 避免
- Generic skills: "Helps with general tasks" is not useful
- Long prompts: 2000 words don't make the skill smarter
- Duplicating slash commands: If it's single-purpose, maybe a command is better
- Too many skills: Start with 2-3 focused ones, add when needed
- Vague descriptions: "Use for general tasks" gives no signal to the agent
- Complex tasks: If it requires multiple steps and isolated context, use subagent
- 通用Skill:“辅助通用任务”毫无用处
- 过长提示:2000字的提示不会让Skill更智能
- 重复斜杠命令:如果是单一用途,斜杠命令可能更合适
- 过多Skill:先从2-3个聚焦的Skill开始,按需添加
- 模糊描述:“用于通用任务”无法为Agent提供有效信号
- 复杂任务:若需要多步骤和独立上下文,请使用subagent
Skills vs Subagents vs Slash Commands
Skills vs Subagents vs 斜杠命令
Use this decision tree:
Is task single-purpose and instant?
├─ YES → Is it a custom command?
│ ├─ YES → Use slash command
│ └─ NO → Use skill
│
└─ NO → Does it require multiple steps and isolated context?
├─ YES → Use subagent
└─ NO → Use skillExamples:
- Skill: "Generate a changelog based on commits since last tag"
- Skill: "Format all imports following the style guide"
- Subagent: "Implement complete OAuth authentication with tests"
- Subagent: "Investigate and fix all failing tests"
- Slash Command: to fix linter errors
/fix
使用以下决策树:
任务是否为单一用途且可即时完成?
├─ 是 → 是否为自定义命令?
│ ├─ 是 → 使用斜杠命令
│ └─ 否 → 使用Skill
│
└─ 否 → 是否需要多步骤和独立上下文?
├─ 是 → 使用subagent
└─ 否 → 使用Skill示例:
- Skill:“基于上次标签后的提交记录生成变更日志”
- Skill:“遵循风格指南格式化所有导入”
- Subagent:“实现完整的OAuth认证并编写测试”
- Subagent:“排查并修复所有失败的测试”
- 斜杠命令:用于修复代码检查错误
/fix
Quick Template
快速模板
Use this template when creating a skill:
markdown
---
description: [Specific action] for [context] following [pattern/criteria]
---创建Skill时可使用以下模板:
markdown
---
description: [具体操作] 针对 [场景] 遵循 [标准/模式]
---[Skill Name]
[Skill名称]
You are an expert in [specific domain].
你是[特定领域]的专家。
When to Use
何时使用
Use this skill when:
- [Trigger 1]
- [Trigger 2]
- [Trigger 3]
在以下情况使用本Skill:
- [触发条件1]
- [触发条件2]
- [触发条件3]
Process
流程
- [Step 1]
- [Step 2]
- [Step 3]
- [步骤1]
- [步骤2]
- [步骤3]
Criteria and Conventions
标准与约定
- [Rule 1]
- [Rule 2]
- [Rule 3]
- [规则1]
- [规则2]
- [规则3]
Output Format (if applicable)
输出格式(若适用)
[Describe the expected output format]
undefined[描述预期的输出格式]
undefinedWell-Structured Skill Examples
结构良好的Skill示例
Example 1: Import Formatter
示例1:导入格式化工具
markdown
---
description: Organizes and formats JavaScript/TypeScript imports in alphabetical order, groups by type (external, internal, types) and removes duplicates.
---markdown
---
description: 按字母顺序整理并格式化JavaScript/TypeScript导入,按类型分组(外部、内部、类型)并移除重复项。
---Import Formatter
导入格式化工具
When to Use
何时使用
- When finishing a file with disorganized imports
- When asked to "organize imports"
- Before commits to maintain consistency
- 完成文件编写后导入结构混乱时
- 被要求“整理导入”时
- 提交代码前确保一致性时
Process
流程
- Identify all import statements
- Classify into groups:
- External (node_modules)
- Internal (relative paths and aliases)
- Types (import type)
- Sort alphabetically within each group
- Remove duplicates
- Add blank line between groups
- 识别所有导入语句
- 分类为以下组别:
- 外部(node_modules)
- 内部(相对路径与别名)
- 类型(import type)
- 每组内按字母顺序排序
- 移除重复项
- 组与组之间添加空行
Expected Format
预期格式
typescript
// External
import { useState } from "react";
import axios from "axios";
// Internal
import { Button } from "@/components/Button";
import { utils } from "../utils";
// Types
import type { User } from "@/types";undefinedtypescript
// External
import { useState } from "react";
import axios from "axios";
// Internal
import { Button } from "@/components/Button";
import { utils } from "../utils";
// Types
import type { User } from "@/types";undefinedExample 2: Changelog Generator
示例2:变更日志生成器
markdown
---
description: Generates formatted changelog based on Git commits since last tag, categorizing by type (feat, fix, docs, etc.) following Conventional Commits.
---markdown
---
description: 基于上次Git标签后的提交记录生成格式化变更日志,遵循Conventional Commits按类型(feat、fix、docs等)分类。
---Changelog Generator
变更日志生成器
When to Use
何时使用
- When preparing a release
- When asked to "generate changelog"
- To document changes between versions
- 准备版本发布时
- 被要求“生成变更日志”时
- 记录版本间变更时
Process
流程
- Fetch commits since last git tag
- Parse messages following Conventional Commits
- Categorize by type:
- ✨ Features (feat:)
- 🐛 Fixes (fix:)
- 📚 Docs (docs:)
- 🔧 Chore (chore:)
- ♻️ Refactor (refactor:)
- Format in markdown with bullet points
- Include breaking changes in separate section
- 获取上次Git标签后的所有提交记录
- 遵循Conventional Commits解析提交信息
- 按类型分类:
- ✨ 新功能(feat:)
- 🐛 修复(fix:)
- 📚 文档(docs:)
- 🔧 杂项(chore:)
- ♻️ 重构(refactor:)
- 用Markdown列表格式呈现
- 将重大变更单独列为一个章节
Output Format
输出格式
markdown
undefinedmarkdown
undefined[Version] - [Date]
[版本号] - [日期]
✨ Features
✨ 新功能
- feat(auth): add OAuth login
- feat(api): endpoint for file upload
- feat(auth): 添加OAuth登录
- feat(api): 新增文件上传接口
🐛 Fixes
🐛 修复
- fix(ui): fix responsive menu
- fix(db): resolve race condition in transactions
- fix(ui): 修复响应式菜单问题
- fix(db): 解决事务中的竞态条件
📚 Documentation
📚 文档
- docs: update README with new endpoints
- docs: 更新README中的新接口说明
⚠️ BREAKING CHANGES
⚠️ 重大变更
- feat(api)!: remove endpoint /v1/legacy
```- feat(api)!: 移除/v1/legacy接口
```Creation Outputs
创建输出内容
When creating a skill, you should:
- Create the directory:
.cursor/skills/[skill-name]/ - Create the file: inside the directory
SKILL.md - Confirm location: Inform where the skill was created
- Explain usage: How to test/use the skill
- Suggest improvements: If relevant, suggest refinements
创建Skill时,你需要:
- 创建目录:
.cursor/skills/[skill-name]/ - 创建文件:在目录内创建
SKILL.md - 确认位置:告知用户Skill的创建位置
- 说明用法:如何测试/使用该Skill
- 建议优化:如有必要,提出改进建议
Quality Checklist
质量检查清单
Before finalizing a skill, verify:
- Description is specific and clear about when to use
- Folder name uses kebab-case
- Instructions are actionable and unambiguous
- Scope is focused (one responsibility)
- Concrete examples are included (if applicable)
- Sections are well organized
- It's not a complex task (that should be a subagent)
- Output format is clear (if applicable)
最终确定Skill前,请验证:
- 描述具体清晰,明确说明适用场景
- 文件夹名称使用kebab-case
- 说明可执行且无歧义
- 聚焦单一职责
- 包含具体示例(若适用)
- 章节组织有序
- 并非应使用subagent的复杂任务
- 输出格式明确(若适用)
Output Messages
输出消息
When creating a skill, inform the user:
✅ Skill created successfully!
📁 Location: .cursor/skills/[name]/SKILL.md
🎯 Purpose: [brief description]
🔧 How to test: [example prompt that should trigger the skill]
💡 Tip: The agent will use this skill automatically when it detects [context].
You can also mention it explicitly in prompts.
创建Skill后,告知用户:
✅ Skill创建成功!
📁 位置:.cursor/skills/[name]/SKILL.md
🎯 用途:[简要描述]
🔧 测试方法:[应触发该Skill的示例提示]
💡 提示:当Agent检测到[场景]时会自动使用该Skill。
你也可以在提示中明确提及该Skill。
Remember
注意
Skills are for reusable knowledge and one-off actions. For complex tasks with multiple steps, delegation, and isolated context, use subagents instead of skills.
undefinedSkills适用于可复用知识与一次性操作。对于需要多步骤、任务委派和独立上下文的复杂任务,请使用subagents而非Skills。