codegen-diagram
基于当前项目/代码生成 Draw.io 图表,支持技术栈图、系统架构图、数据结构图、E-R 图四种类型。输出符合 Draw.io 语法的 .drawio 文件(mxGraph…
Guides users through creating effective Agent Skills for Cursor. Use when the user wants to create, write, or author a new skill, or asks about skill structure, best practices, or SKILL.md format.
$ npx -y skills add xstongxue/best-skills --skill skill-create --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/skill-createContext preview
The summary Claude sees to decide when to auto-load this skill.
Guides users through creating effective Agent Skills for Cursor. Use when the user wants to create, write, or author a new skill, or asks about skill structure, best practices, or SKILL.md format.
name: create-skill description: Guides users through creating effective Agent Skills for Cursor. Use when the user wants to create, write, or author a new skill, or asks about skill structure, best practices, or SKILL.md format.
This skill guides you through creating effective Agent Skills for Cursor. Skills are markdown files that teach the agent how to perform specific tasks: reviewing PRs using team standards, generating commit messages in a preferred format, querying database schemas, or any specialized workflow.
Before creating a skill, gather essential information from the user about:
1. **Purpose and scope**: What specific task or workflow should this skill help with? 2. **Target location**: Should this be a personal skill (~/.cursor/skills/) or project skill (.cursor/skills/)? 3. **Trigger scenarios**: When should the agent automatically apply this skill? 4. **Key domain knowledge**: What specialized information does the agent need that it wouldn't already know? 5. **Output format preferences**: Are there specific templates, formats, or styles required? 6. **Existing patterns**: Are there existing examples or conventions to follow?
If you have previous conversation context, infer the skill from what was discussed. You can create skills based on workflows, patterns, or domain knowledge that emerged in the conversation.
If you need clarification, use the AskQuestion tool when available:
Example AskQuestion usage: - "Where should this skill be stored?" with options like ["Personal (~/.cursor/skills/)", "Project (.cursor/skills/)"] - "Should this skill include executable scripts?" with options like ["Yes", "No"]
If the AskQuestion tool is not available, ask these questions conversationally.
---
Skills are stored as directories containing a `SKILL.md` file:
skill-name/
├── SKILL.md # Required - main instructions
├── reference.md # Optional - detailed documentation
├── examples.md # Optional - usage examples
└── scripts/ # Optional - utility scripts
├── validate.py
└── helper.sh| Type | Path | Scope | | -------- | ---------------------------- | --------------------------------------- | | Personal | ~/.cursor/skills/skill-name/ | Available across all your projects | | Project | .cursor/skills/skill-name/ | Shared with anyone using the repository |
**IMPORTANT**: Never create skills in `~/.cursor/skills-cursor/`. This directory is reserved for Cursor's internal built-in skills and is managed automatically by the system.
Every skill requires a `SKILL.md` file with YAML frontmatter and markdown body:
--- name: your-skill-name description: Brief description of what this skill does and when to use it --- # Your Skill Name ## Instructions Clear, step-by-step guidance for the agent. ## Examples Concrete examples of using this skill.
| Field | Requirements | Purpose | | ------------- | ---------------------------------------------------- | ------------------------------------------ | | `name` | Max 64 chars, lowercase letters/numbers/hyphens only | Unique identifier for the skill | | `description` | Max 1024 chars, non-empty | Helps agent decide when to apply the skill |
---
The description is **critical** for skill discovery. The agent uses it to decide when to apply your skill.
1. **Write in third person** (the description is injected into the system prompt):
2. **Be specific and include trigger terms**:
3. **Include both WHAT and WHEN**:
# PDF Processing description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction. # Excel Analysis description: Analyze Excel spreadsheets, create pivot tables, generate charts. Use when analyzing Excel files, spreadsheets, tabular data, or .xlsx files. # Git Commit Helper description: Generate descriptive commit messages by analyzing git diffs. Use when the user asks for help writing commit messages or reviewing staged changes. # Code Review description: Review code for quality, security, and best practices following team standards. Use when reviewing pull requests, code changes, or when the user asks for a code review.
---
The context window is shared with conversation history, other skills, and requests. Every token competes for space.
**Default assumption**: The agent is already very smart. Only add context it doesn't already have.
Challenge each piece of information:
**Good (concise)**:
## Extract PDF text
Use pdfplumber for text extraction:
\`\`\`python
import pdfplumber
with pdfplumber.open("file.pdf") as pdf:
text = pdf.pages[0].extract_text()
\`\`\`**Bad (verbose)**:
通用高质量 Skill 合集,可安装到 Cursor、Claude Code、Codex、OpenClaw 等 Agent 工具的 skills 目录使用。 与 best-prompts 的区别:best-prompts 是面向聊天框的 Prompt,需手动复制粘贴;best-skills 是面向 Agent 的 SKILL.md,Agent 会根据 description 中的关键词与触发场景自动判断是否调用,无需每次手动选择。
Repo: xstongxue/best-skills
基于当前项目/代码生成 Draw.io 图表,支持技术栈图、系统架构图、数据结构图、E-R 图四种类型。输出符合 Draw.io 语法的 .drawio 文件(mxGraph…
基于当前项目/代码生成各类文档,支持论文章节、项目梳理、重点问题、简历项目描述四种类型。当用户提到生成论文章节、项目梳理、技术难点、简历项目描述时使用。要给新同事看的上手文档(新人文档、架…
基于文字说明或结构信息,生成可直接在 Excalidraw 中打开的手绘风 `.excalidraw` 图表;支持系统架构图、流程图、数据结构图与自由白板草图,输出标准…
创建具有高设计品质、可交付生产的前端界面。当用户要求构建 Web 组件、页面、海报或应用(如官网、落地页、仪表盘、React/Vue 组件、HTML/CSS 布局,或对任意 Web UI…