协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
skill-creator【开发与工程】Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
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. A skill provides specialized workflows, tool integrations, domain expertise, and bundled resources (scripts, references, assets) for complex and repetitive tasks.
The procedure comes first below; design detail lives in references/ (see
Reference files).
Skill creation involves these steps:
.skill file is needed)Follow these steps in order, skipping only if there is a clear reason why they are not applicable.
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:
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.
To turn concrete examples into an effective skill, analyze each example by:
Examples:
pdf-editor skill ("Help me rotate this PDF"): rotating a PDF means re-writing the same code each time, so store a scripts/rotate_pdf.py.frontend-webapp-builder skill ("Build me a todo app"): every webapp needs the same boilerplate, so store an assets/hello-world/ template project.big-query skill ("How many users have logged in today?"): every query re-discovers the table schemas, so store a references/schema.md.To establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets. What each kind is for, and what to leave out: references/skill-anatomy.md.
Skip this step if the skill already exists and only iteration or packaging is needed.
This copy of skill-creator bundles no scripts (Anthropic's upstream skill-creator has since dropped its init_skill.py). Create the skeleton by hand:
mkdir -p <skill-name>/scripts <skill-name>/references <skill-name>/assets
Then write <skill-name>/SKILL.md: frontmatter with name (matching the directory: lowercase letters, digits and hyphens, at most 64 characters) and description, then the body. Keep only the resource directories the skill uses, unless the host repository requires all three (some keep them with a .gitkeep).
When editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of Claude to use. Include 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.
Consult these helpful guides based on your skill's needs:
Pro tips for complex tasks:
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/.
Added scripts must be tested by actually running them to ensure there are no bugs and that the output matches what is expected. If there are many similar scripts, only a representative sample needs to be tested to ensure confidence that they all work while balancing time to completion.
Writing Guidelines: Always use imperative/infinitive form.
Write the YAML frontmatter with name and description:
name: The skill namedescription: This is the primary triggering mechanism for your skill, and helps Claude understand when to use the skill.
docx skill: "Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. Use when Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks"Do not include any other fields in YAML frontmatter.
Write instructions for using the skill and its bundled resources. Keep the body under 500 lines and under ~5,000 tokens: after auto-compaction Claude Code keeps only the first 5,000 tokens of an invoked skill, so put the procedure and hard rules first and move detail into references.
Package only when the user needs a distributable .skill file (for example, to upload to claude.ai). Skills follow the Agent Skills open standard for portability across AI platforms. A .skill file is a zip archive of the skill folder with a .skill extension, named after the skill (e.g., my-skill.skill).
Validate before zipping:
name and description presentname matches the folder name; description is non-empty and at most 1,024 charactersname, description, license, compatibility, metadata, allowed-tools) - claude.ai uploads and the Skills API reject any other key, so strip extras from the packaged copyThe spec's reference validator checks the frontmatter: skills-ref validate <path/to/skill-folder> (skills-ref). Anthropic's upstream skill-creator ships a scripts/package_skill.py that validates and zips in one step; this copy does not bundle it.
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:
Concise is key. 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. 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?" Prefer concise examples over verbose explanations.
Set appropriate degrees of freedom. Match the level of specificity to the task's fragility and variability:
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).
| File | Read when |
|---|---|
| references/skill-anatomy.md | Planning contents (Step 2): the layout, what scripts, references and assets are each for, what not to include |
| references/progressive-disclosure.md | SKILL.md nears 500 lines or ~5,000 tokens, or the skill covers several variants: loading levels, size limits, three splitting patterns |
| references/workflows.md | The skill encodes a multi-step process: sequential, conditional, parallel, subagent and checklist patterns |
| references/output-patterns.md | The skill must produce a specific format or quality bar: templates, examples, layered verbosity |
Official resources: Agent Skills repository · Skill authoring best practices · Agent Skills specification · Claude Code skills · Creating custom skills · The Complete Guide to Building Skills for Claude (PDF)
Adapted from Anthropic's skill-creator (github.com/anthropics/skills, Apache-2.0, see
LICENSE.txt). Changed for claude-mods: procedure moved first and design detail moved to
references to fit the size budget; Steps 3 and 5 rewritten because no scripts are bundled;
Contents lists added to the longer references.