Spaces:
Running
Running
File size: 9,033 Bytes
35437d7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | # Contributing Skills to Agent Zero
Welcome to the Agent Zero Skills ecosystem! This guide will help you create, test, and share skills with the community.
---
## What is a Skill?
A **Skill** is a contextual expertise module that provides the AI agent with specialized knowledge and procedures for specific tasks. Unlike tools (which are always loaded), skills are **surfaced via description/tag matching** when relevant, making them token-efficient and context-aware.
### Skills vs Tools vs Knowledge
| Aspect | Skills | Tools | Knowledge |
|--------|--------|-------|-----------|
| **Loading** | Description/tag matching | Always in prompt | Semantic recall |
| **Purpose** | Procedures & expertise | Actions & functions | Facts & data |
| **Format** | SKILL.md (YAML + Markdown) | Python/code | Text/documents |
| **When to use** | "How to do X" | "Do X now" | "What is X" |
### Cross-Platform Compatibility
The SKILL.md standard is compatible with:
- **Agent Zero** (this project)
- **Claude Code** (Anthropic)
- **Cursor** (AI IDE)
- **OpenAI Codex CLI**
- **GitHub Copilot**
- **Goose** (Block)
Skills you create here can be used in any of these platforms!
---
## Quick Start
### Using the CLI (Recommended)
```bash
# Create a new skill interactively
python -m helpers.skills_cli create my-skill-name
# List all available skills
python -m helpers.skills_cli list
# Validate a skill
python -m helpers.skills_cli validate my-skill-name
# Search skills
python -m helpers.skills_cli search "keyword"
```
### Manual Creation
1. Create a folder in `usr/skills/` with your skill name
2. Add a `SKILL.md` file with YAML frontmatter
3. Optionally add supporting scripts (`.py`, `.sh`, `.js`)
---
## SKILL.md Standard
Every skill must have a `SKILL.md` file with this structure:
```markdown
---
name: "skill-name"
description: "A clear, concise description of what this skill does and when to use it"
version: "1.0.0"
author: "Your Name <email@example.com>"
license: "MIT"
tags: ["category", "purpose", "technology"]
triggers:
- "keyword that activates this skill"
- "another trigger phrase"
allowed_tools:
- tool_name
- another_tool
metadata:
complexity: "beginner|intermediate|advanced"
category: "development|devops|data|productivity|creative"
estimated_time: "5 minutes"
---
# Skill Name
## Overview
Brief description of what this skill accomplishes.
## When to Use
- Situation 1 where this skill applies
- Situation 2 where this skill applies
## Instructions
### Step 1: First Step
Detailed instructions...
### Step 2: Second Step
More instructions...
## Examples
### Example 1: Basic Usage
\`\`\`python
# Code example
\`\`\`
### Example 2: Advanced Usage
\`\`\`python
# Advanced code example
\`\`\`
## Common Pitfalls
- Pitfall 1 and how to avoid it
- Pitfall 2 and how to avoid it
## Related Skills
- `related-skill-1`
- `related-skill-2`
```
### Required Fields
| Field | Description |
|-------|-------------|
| `name` | Unique identifier (lowercase, hyphens allowed) |
| `description` | What the skill does (used for semantic matching) |
### Optional Fields
| Field | Description |
|-------|-------------|
| `version` | Semantic version (e.g., "1.0.0") |
| `author` | Your name and email |
| `license` | License (MIT, Apache-2.0, etc.) |
| `tags` | Categories for discovery |
| `triggers` | Phrases that activate this skill |
| `allowed_tools` | Tools this skill can use |
| `metadata` | Additional structured data |
---
## Creating Your First Skill
### Step 1: Identify the Need
Ask yourself:
- What expertise would help the agent?
- When should this skill be activated?
- What steps should the agent follow?
### Step 2: Create the Structure
```bash
# Using CLI
python -m helpers.skills_cli create my-awesome-skill
# Or manually
mkdir -p usr/skills/my-awesome-skill
touch usr/skills/my-awesome-skill/SKILL.md
```
### Step 3: Write the SKILL.md
```markdown
---
name: "my-awesome-skill"
description: "Helps with [specific task] when [specific situation]"
version: "1.0.0"
author: "Your Name"
tags: ["category"]
---
# My Awesome Skill
## When to Use
Use this skill when you need to [specific task].
## Instructions
1. First, do this...
2. Then, do that...
3. Finally, verify by...
## Examples
### Example: Basic Case
[Show a complete example]
```
### Step 4: Add Supporting Files (Optional)
If your skill needs scripts:
```
my-awesome-skill/
βββ SKILL.md # Required
βββ helper.py # Optional Python script
βββ setup.sh # Optional shell script
βββ templates/ # Optional templates folder
βββ config.json
```
Reference them in your SKILL.md:
```markdown
## Scripts
This skill includes helper scripts:
- `helper.py` - Does X
- `setup.sh` - Sets up Y
```
### Step 5: Test Your Skill
```bash
# Validate the skill
python -m helpers.skills_cli validate my-awesome-skill
# Test in Agent Zero
# Start the agent and ask it to perform the task your skill handles
```
---
## Best Practices
### Writing Effective Descriptions
The `description` field is crucial for semantic matching. Make it:
**Good:**
```yaml
description: "Guides systematic debugging of Python applications using print statements, debugger, and logging to identify root causes"
```
**Bad:**
```yaml
description: "Helps with debugging"
```
### Structuring Instructions
1. **Be Specific** - Avoid vague instructions
2. **Use Steps** - Number your steps clearly
3. **Include Examples** - Show, don't just tell
4. **Anticipate Errors** - Include troubleshooting
### Semantic Triggers
Design your description and content so the skill is recalled when relevant:
```yaml
# Include synonyms and related terms
description: "Helps create REST APIs, web services, HTTP endpoints, and backend routes using FastAPI, Flask, or Express"
```
### Keep Skills Focused
One skill = one expertise area. If your skill is getting too long, split it:
- `api-design` - API structure and patterns
- `api-security` - API authentication and authorization
- `api-testing` - API testing strategies
---
## Testing Skills
### Local Testing
1. **Validate Structure:**
```bash
python -m helpers.skills_cli validate my-skill
```
2. **Test Semantic Recall:**
Start Agent Zero and ask questions that should trigger your skill.
3. **Verify Instructions:**
Follow your own instructions manually to ensure they work.
---
## Sharing Skills
### Contributing to Agent Zero
1. **Fork the Repository:**
```bash
git clone https://github.com/agent0ai/agent-zero.git
cd agent-zero
```
2. **Create Your Skill:**
```bash
python -m helpers.skills_cli create my-skill
# Edit usr/skills/my-skill/SKILL.md
```
3. **Move to Default (for contribution):**
```bash
mv usr/skills/my-skill skills/my-skill
```
4. **Create a Pull Request:**
- Branch: `feat/skill-my-skill-name`
- Title: `feat(skills): add my-skill-name skill`
- Description: Explain what the skill does and why it's useful
### Publishing Skills
Share your skills on [skillsmp.com](https://skillsmp.com) or [skills.sh](https://skills.sh):
1. Create a GitHub repository for your skill
2. Ensure it follows the SKILL.md standard
3. Submit via their contribution process
### Creating a Skills Collection
For multiple related skills, create a repository:
```
my-skills-collection/
βββ README.md
βββ skills/
β βββ skill-1/
β β βββ SKILL.md
β βββ skill-2/
β β βββ SKILL.md
β βββ skill-3/
β βββ SKILL.md
βββ LICENSE
```
---
## Community Guidelines
### Quality Standards
- **Tested** - Skills must be tested before submission
- **Documented** - Clear instructions and examples
- **Focused** - One expertise per skill
- **Original** - Don't duplicate existing skills
### Naming Conventions
- Use lowercase with hyphens: `my-skill-name`
- Be descriptive: `python-debugging` not `debug`
- Avoid generic names: `fastapi-crud` not `api`
### License
- Include a license (MIT recommended for maximum compatibility)
- Respect licenses of any code you include
- Don't include proprietary or copyrighted content
---
## FAQ
### Q: Where should I put my skills?
**A:** During development, use `usr/skills/`. For contribution, move to `skills/`.
### Q: How are skills discovered?
**A:** Skills are matched against their name, description, and tags for the current query. They are not indexed into vector memory.
### Q: Can I use skills from other platforms?
**A:** Yes! The SKILL.md standard is cross-platform. Skills from Claude Code, Cursor, or other compatible platforms can be copied directly to `usr/skills/`.
### Q: How do I update a skill?
**A:** Edit the SKILL.md file and increment the version number. Changes take effect on agent restart.
### Q: Can skills call other skills?
**A:** Skills don't directly call each other, but the agent may combine multiple skills when appropriate for a task.
---
Happy skill building! π
|