Skip to main content

Creating Skill Extensions

Skills are specialized capabilities that the AI can automatically invoke when relevant to the user’s request. Unlike commands (which users explicitly call), skills are model-invoked based on their descriptions and the current context.

What are Skills?

Skills are:
  • Capabilities the AI automatically uses when appropriate
  • Defined in SKILL.md files with YAML frontmatter
  • Discovered automatically by the AI
  • Useful for adding domain-specific expertise
  • Available via /skills command to view/manage

Skill vs Command vs Agent

Skill:
  • AI decides when to use it
  • Single-purpose capability
  • No conversation context
  • Provides instructions/guidance
Command:
  • User explicitly invokes with /command
  • Can be multi-step workflow
  • Immediate execution
Agent:
  • User explicitly invokes
  • Multi-turn conversation
  • Complex, stateful interactions
  • Has tool access

Skill File Format

Skills are Markdown files with YAML frontmatter:

Frontmatter Fields

Required:
  • name - Unique identifier (lowercase, dashes)
  • description - When and why to use this skill (crucial for AI discovery)
Optional:
  • license - License information

Description is Critical

The description field determines when the AI invokes your skill. Make it specific and context-rich:

Extension Structure

Place skill files in a skills/ directory:
Each skill is in its own subdirectory with a SKILL.md file.

Configure in Manifest

Update qwen-extension.json:
The skills field specifies the directory (defaults to "skills" if not specified).

Example: Synonyms Skill

From the built-in examples:

Example: Code Analyzer Skill

Example: Performance Profiler Skill

Medium Impact

[Similar format]

Low Impact

[Similar format] Trade-offs:
  • [Optimization]: [benefit] vs [cost]
Recommendations: Prioritized list of improvements to implement.

Best Practices

  • Measure before optimizing
  • Focus on actual bottlenecks
  • Consider maintainability vs performance
  • Provide complexity analysis
  • Show concrete improvements
  • Mention trade-offs
GET /resources # List all GET /resources/ # Get one POST /resources # Create PUT /resources/ # Replace PATCH /resources/ # Update DELETE /resources/ # Delete
GET /users//posts # User’s posts GET /posts//comments # Post’s comments
GET /resources?page=2&limit=20 GET /resources?status=active&sort=-created_at
Response Example:
Considerations:
  • [Security concern]
  • [Performance consideration]
  • [Scalability note]

Best Practices

  • Version APIs: /v1/resources
  • Use HTTPS only
  • Implement rate limiting
  • Provide clear error messages
  • Document thoroughly
  • Follow HATEOAS when appropriate
  • Consider caching headers

2. Rich Descriptions

Help the AI understand when to use your skill:

3. Clear Instructions

Provide step-by-step guidance:

4. Include Examples

Show expected inputs and outputs:

5. Output Structure

Define consistent output format:

Skill Discovery

Users can view available skills:
Extension skills appear in the skills list with their descriptions.

Testing Skills

During development:
  1. Link your extension: qwen extensions link .
  2. Restart Qwen Code
  3. Ask questions that should trigger your skill
  4. Verify the AI uses the skill appropriately
  5. Refine description and instructions based on results

Multiple Skills

You can include multiple related skills:
Each skill should remain focused on its specific capability.

Next Steps