packages/desktop/apps/electron/resources/docs/skills.md
This guide explains how to create and configure skills in Qwen Code.
CLI-first workflow (recommended): Use
craft-agent skill ...commands instead of editingSKILL.mdfiles directly.
craft-agent skill --help- Canonical command reference: craft-cli.md
Skills are specialized instructions that extend the agent for specific tasks. They use a simple SKILL.md format with frontmatter and markdown instructions.
Key points:
/commit, /review-pr)Qwen Code uses a SKILL.md file for each skill. This means:
name, description, globs, alwaysAllow, requiredSourcesWhat Qwen Code adds:
When a skill is invoked (e.g., /commit):
~/.craft-agent/workspaces/{id}/skills/commit/SKILL.md exists, it's usedThis allows you to:
Skills are stored as folders:
~/.craft-agent/workspaces/{workspaceId}/skills/{slug}/
├── SKILL.md # Required: Skill definition
├── icon.svg # Recommended: Skill icon for UI display
├── icon.png # Alternative: PNG icon
└── (other files) # Optional: Additional resources
The skill file uses frontmatter plus markdown instructions:
---
name: "Skill Display Name"
description: "Brief description shown in skill list"
globs: ["*.ts", "*.tsx"] # Optional: file patterns that trigger skill
alwaysAllow: ["Bash"] # Optional: tools to always allow
requiredSources: # Optional: sources to auto-enable on invocation
- linear
---
# Skill Instructions
Your skill content goes here. This is injected into the agent context
when the skill is active.
## Guidelines
- Specific instructions for the agent
- Best practices to follow
- Things to avoid
## Examples
Show the agent how to perform the task correctly.
Display name for the skill. Shown in the UI and skill list.
Brief description (1-2 sentences) explaining what the skill does.
Array of glob patterns. When a file matching these patterns is being worked on, the skill may be automatically suggested or activated.
globs:
- "*.test.ts" # Test files
- "*.spec.tsx" # React test files
- "**/__tests__/**" # Test directories
Array of tool names that are automatically allowed when this skill is active. Useful for skills that require specific tools without prompting.
alwaysAllow:
- "Bash" # Allow bash commands
- "Write" # Allow file writes
Array of source slugs to auto-enable when this skill is invoked. When a user mentions the skill, the listed sources are enabled for the session before the agent starts — so tools from those sources are available from the first turn.
Sources must exist in the workspace and be authenticated. Unauthenticated or missing sources are silently skipped (the existing runtime auto-enable handles them as a fallback).
requiredSources:
- linear # Auto-enable Linear source
- github # Auto-enable GitHub source
mkdir -p ~/.craft-agent/workspaces/{ws}/skills/my-skill
---
name: "Code Review"
description: "Review code changes for quality, security, and best practices"
globs: ["*.ts", "*.tsx", "*.js", "*.jsx"]
---
# Code Review Skill
When reviewing code, focus on:
## Quality Checks
- Consistent code style
- Clear naming conventions
- Appropriate abstractions
## Security Checks
- Input validation
- Authentication/authorization
- Sensitive data handling
## Best Practices
- Error handling
- Performance considerations
- Test coverage
Every skill should have a visually relevant icon. This helps users quickly identify skills in the UI.
Icon requirements:
icon.svg, icon.png, icon.jpg, or icon.jpegHow to get an icon:
Search online icon libraries:
Use WebFetch to download:
# Find an appropriate icon URL and download it
WebFetch to get SVG content, then save to icon.svg
Match the skill's purpose:
IMPORTANT: Always validate after creating or editing a skill:
skill_validate({ skillSlug: "my-skill" })
This validates:
---
name: "Commit"
description: "Create well-formatted git commit messages"
alwaysAllow: ["Bash"]
---
# Commit Message Guidelines
When creating commits:
1. **Format**: Use conventional commits
- `feat:` New feature
- `fix:` Bug fix
- `docs:` Documentation
- `refactor:` Code refactoring
- `test:` Adding tests
2. **Style**:
- Keep subject line under 72 characters
- Use imperative mood ("Add feature" not "Added feature")
- Explain why, not what (the diff shows what)
3. **Co-authorship**:
Always include the project-approved co-author trailer.
Recommended icon: Git commit icon from Heroicons or Simple Icons
---
name: "Team Standards"
description: "Enforce team coding conventions and patterns"
globs: ["src/**/*.ts", "src/**/*.tsx"]
---
# Team Coding Standards
## File Organization
- One component per file
- Co-locate tests with source files
- Use barrel exports (index.ts)
## Naming Conventions
- Components: PascalCase
- Hooks: camelCase with `use` prefix
- Constants: SCREAMING_SNAKE_CASE
## Import Order
1. External packages
2. Internal packages (@company/*)
3. Relative imports
Recommended icon: Clipboard list or checklist icon
---
name: "Linear Triage"
description: "Triage and prioritize Linear issues"
requiredSources:
- linear
---
# Linear Triage
When triaging issues:
1. List unassigned issues from the current sprint
2. Categorize by severity
3. Suggest assignees based on expertise
Recommended icon: Kanban board or list icon
When this skill is invoked, the linear source is automatically enabled for the
session — no manual toggle needed.
To customize a built-in SDK skill like /commit:
~/.craft-agent/workspaces/{ws}/skills/commit/SKILL.mdskill_validate({ skillSlug: "commit" })Your skill will be used instead of the SDK's built-in version.
This is useful for:
skill_validate after creating or editingSkill not loading:
skill_validate for detailed errorsSkill not triggering:
Icon not showing:
icon.{ext} (not my-icon.svg)