Create, install, or update skills in the workspace. Use when (1) installing a skill from a URL or remote source, (2) creating a new skill from scratch, (3) updating or restructuring existing skills. Always use this skill for any skill installation or creation task.
This skill provides guidance for creating effective skills using the existing tool system.
Skills are modular, self-contained packages that extend the agent's capabilities by providing specialized knowledge, workflows, and tools. They transform a general-purpose agent into a specialized agent equipped with procedural knowledge.
Concise is Key: Only add context the agent doesn't already have. Challenge each piece of information: "Does this justify its token cost?" Prefer concise examples over verbose explanations.
Every skill consists of a required SKILL.md file and optional bundled resources:
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter metadata (required)
│ │ ├── name: (required)
│ │ └── description: (required)
│ └── Markdown instructions (required)
└── Bundled Resources (optional)
├── scripts/ - Executable code (Python/Bash/etc.)
├── references/ - Documentation intended to be loaded into context as needed
└── assets/ - Files used in output (templates, icons, fonts, etc.)
Frontmatter (YAML) - Required fields:
weather-api, pdf-editor)"PDF document processing with rotation, merging, splitting, and text extraction. Use when user needs to: (1) Rotate PDF pages, (2) Merge multiple PDFs, (3) Split PDF files, (4) Extract text from PDFs."Body (Markdown) - Loaded after skill triggers:
scripts/ - When to include:
references/ - When to include:
assets/ - When to include:
Important: Most skills don't need all three. Choose based on actual needs.
Do NOT create auxiliary documentation files:
Critical Rule: Only create files that the agent will actually execute (scripts) or that are too large for SKILL.md (references). Documentation, examples, and guides ALL belong in SKILL.md.
name from YAML frontmatter<workspace>/skills/<name>/ and save content as SKILL.mdThe <workspace> is the working directory from the "工作空间" section.
plan-mode).gh-address-comments, linear-address-issue).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:
Planning Checklist:
Example: When building a pdf-editor skill to handle queries like "Help me rotate this PDF," the analysis shows:
scripts/rotate_pdf.py script would be helpful to store in the skillreferences/api-docs.md - put API info in SKILL.md insteadExample: When designing a frontend-webapp-builder skill for queries like "Build me a todo app" or "Build me a dashboard to track my steps," the analysis shows:
assets/hello-world/ template containing the boilerplate HTML/React project files would be helpful to store in the skillreferences/usage-examples.md - put examples in SKILL.md insteadExample: When building a big-query skill to handle queries like "How many users have logged in today?" the analysis shows:
references/schema.md file documenting the table schemas would be helpful to store in the skill (ONLY because schemas are very large)references/query-examples.md - put examples in SKILL.md insteadTo establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets. Default to putting everything in SKILL.md unless there's a compelling reason to separate it.
At this point, it is time to actually create the skill.
Skip this step only if the skill being developed already exists, and iteration is needed. In this case, continue to the next step.
When creating a new skill from scratch, always run the init_skill.py script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.
Usage:
scripts/init_skill.py <skill-name> --path <output-directory> [--resources scripts,references,assets] [--examples]
Examples:
scripts/init_skill.py my-skill --path <workspace>/skills
scripts/init_skill.py my-skill --path <workspace>/skills --resources scripts,references
scripts/init_skill.py my-skill --path <workspace>/skills --resources scripts --examples
Where <workspace> is your workspace directory shown in the "工作空间" section of the system prompt.
The script:
--resources--examples is setAfter initialization, customize the SKILL.md and add resources as needed. If you used --examples, replace or delete placeholder files.
Important: Always create skills in workspace skills directory (<workspace>/skills), NOT in project directory. Check the "工作空间" section for the actual workspace path.
When editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of the agent to use. Include information that would be beneficial and non-obvious to the agent. Consider what procedural knowledge, domain-specific details, or reusable assets would help another agent instance execute these tasks more effectively.
Workflow patterns — For complex tasks, break operations into sequential steps or conditional branches:
# Sequential: list numbered steps with scripts
1. Analyze the form (run analyze_form.py)
2. Create field mapping (edit fields.json)
3. Fill the form (run fill_form.py)
# Conditional: guide through decision points
1. Determine the modification type:
**Creating new content?** → Follow "Creation workflow"
**Editing existing content?** → Follow "Editing workflow"
Output patterns — When consistent output format matters, provide a template or input/output examples in SKILL.md so the agent can follow the desired style.
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/.
Available Base Tools:
The agent has access to these core tools that you can leverage in your skill:
Minimize Dependencies:
Important Guidelines:
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.
If you used --examples, delete any placeholder files that are not needed for the skill. Only create resource directories that are actually required.
Writing Guidelines: Always use imperative/infinitive form.
Write the YAML frontmatter with name, description, and optional metadata:
name: The skill namedescription: This is the primary triggering mechanism for your skill, and helps the agent 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 the agent 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"metadata: (Optional) Specify requirements and configuration
requires.bins: Required binaries (e.g., ["curl", "jq"])requires.env: Required environment variables — all must be set (e.g., ["MYAPI_KEY"])requires.anyEnv: Alternative environment variables — at least one must be set (e.g., ["OPENAI_API_KEY", "LINKAI_API_KEY"])requires.anyBins: Alternative binaries — at least one must be presentalways: Set to true to always load regardless of requirementsemoji: Skill icon (optional)category — it defaults to skill and is managed by the systemAPI Key Requirements:
If your skill needs a single API key, declare it in requires.env:
---