$npx -y skills add stvlynn/dingtalk-wukong-skills --skill skill-creator用于创建或更新技能包的完整指南。适用于用户希望将对话中的方法、经验、偏好沉淀为可复用技能,或对已有技能进行结构化优化的场景(含脚本、工作流、资源组织与打包发布)。
| 1 | # 技能创建助手 |
| 2 | |
| 3 | This skill provides guidance for creating effective skills. |
| 4 | |
| 5 | ## About Skills |
| 6 | |
| 7 | Skills are modular, self-contained packages that extend Claude's capabilities by providing |
| 8 | specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific |
| 9 | domains or tasks—they transform Claude from a general-purpose agent into a specialized agent |
| 10 | equipped with procedural knowledge that no model can fully possess. |
| 11 | |
| 12 | ### What Skills Provide |
| 13 | |
| 14 | 1. Specialized workflows - Multi-step procedures for specific domains |
| 15 | 2. Tool integrations - Instructions for working with specific file formats or APIs |
| 16 | 3. Domain expertise - Company-specific knowledge, schemas, business logic |
| 17 | 4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks |
| 18 | |
| 19 | ## Core Principles |
| 20 | |
| 21 | ### Concise is Key |
| 22 | |
| 23 | The context window is a public good. Skills share the context window with everything else Claude needs: system prompt, conversation history, other Skills' metadata, and the actual user request. |
| 24 | |
| 25 | **Default assumption: Claude is already very smart.** Only add context Claude doesn't already have. Challenge each piece of information: "Does Claude really need this explanation?" and "Does this paragraph justify its token cost?" |
| 26 | |
| 27 | Prefer concise examples over verbose explanations. |
| 28 | |
| 29 | ### Set Appropriate Degrees of Freedom |
| 30 | |
| 31 | Match the level of specificity to the task's fragility and variability: |
| 32 | |
| 33 | **High freedom (text-based instructions)**: Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach. |
| 34 | |
| 35 | **Medium freedom (pseudocode or scripts with parameters)**: Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior. |
| 36 | |
| 37 | **Low freedom (specific scripts, few parameters)**: Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed. |
| 38 | |
| 39 | Think of Claude as exploring a path: a narrow bridge with cliffs needs specific guardrails (low freedom), while an open field allows many routes (high freedom). |
| 40 | |
| 41 | ### Anatomy of a Skill |
| 42 | |
| 43 | Every skill consists of a required SKILL.md file and optional bundled resources: |
| 44 | |
| 45 | ``` |
| 46 | skill-name/ |
| 47 | ├── SKILL.md (required) |
| 48 | │ ├── YAML frontmatter metadata (required) |
| 49 | │ │ ├── name: (required) |
| 50 | │ │ ├── description: (required) |
| 51 | │ │ └── compatibility: (optional, rarely needed) |
| 52 | │ └── Markdown instructions (required) |
| 53 | └── Bundled Resources (optional) |
| 54 | ├── scripts/ - Executable code (Python/Bash/etc.) |
| 55 | ├── references/ - Documentation intended to be loaded into context as needed |
| 56 | └── assets/ - Files used in output (templates, icons, fonts, etc.) |
| 57 | ``` |
| 58 | |
| 59 | #### SKILL.md (required) |
| 60 | |
| 61 | Every SKILL.md consists of: |
| 62 | |
| 63 | - **Frontmatter** (YAML): Contains `name` and `description` fields (required), plus optional fields like `license`, `metadata`, and `compatibility`. Only `name` and `description` are read by Claude to determine when the skill triggers, so be clear and comprehensive about what the skill is and when it should be used. The `compatibility` field is for noting environment requirements (target product, system packages, etc.) but most skills don't need it. |
| 64 | - **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all). |
| 65 | |
| 66 | #### Bundled Resources (optional) |
| 67 | |
| 68 | ##### Scripts (`scripts/`) |
| 69 | |
| 70 | Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten. |
| 71 | |
| 72 | - **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed |
| 73 | - **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks |
| 74 | - **Benefits**: Token efficient, deterministic, may be executed without loading into context |
| 75 | - **Note**: Scripts may still need to be read by Claude for patching or environment-specific adjustments |
| 76 | |
| 77 | ##### References (`references/`) |
| 78 | |
| 79 | Documentation and reference material intended to be loaded as needed into context to inform Claude's process and thinking. |
| 80 | |
| 81 | - **When to include**: For documentation that Claude should reference while working |
| 82 | - **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 |
| 83 | - **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides |
| 84 | - **Benefits**: Keeps SKILL.md lean, loaded only when Claude determines it's needed |
| 85 | - **Best practice**: If files are large (>10k words), include grep search patterns in SKILL.md |
| 86 | - **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 w |