Skip to main content
Agent Skills is a lightweight, markdown-based framework introduced by Anthropic for defining modular, reusable agent capabilities. Skills enable you to specialize agents without modifying code by loading skill definitions from simple SKILL.md files.

What are Agent Skills?

Agent Skills are:
  • Markdown-based: Written in simple Markdown format with YAML frontmatter
  • Modular: Each skill is a self-contained capability
  • Reusable: Skills can be shared across agents and projects
  • Context-aware: Automatically loaded based on task similarity
  • Code-free: No code changes needed to add new capabilities

Skills Directory Structure

SKILL.md Format

Basic Structure

Each SKILL.md file has two parts:
  1. YAML Frontmatter: Metadata about the skill
  2. Markdown Content: Instructions and methodology

Example: Financial Analysis Skill

Using Agent Skills

Static Loading (Load All Skills)

Load all skills from a directory when creating the agent:

Dynamic Loading (Task-Based)

Dynamically load only relevant skills based on task similarity:

Creating Custom Skills

Step 1: Create Directory

Step 2: Write SKILL.md

Step 3: Use the Skill

Skill Examples

Data Visualization Skill

Dynamic Skills Loader

Best Practices

1. Keep Skills Focused

2. Include Examples

Always provide concrete examples in your skills:

3. Use Clear Instructions

4. Provide Guidelines

Sharing Skills

Skills can be easily shared across projects and teams:

Next Steps

Structured Outputs

Get structured responses from agents

Creating Agents

Learn how to create agents

Reference

  • Skills handling: swarms/structs/agent.py:705-783
  • Dynamic skills loader: swarms/structs/dynamic_skills_loader.py
  • Example skills: examples/single_agent/agent_skill_examples/
  • Anthropic Agent Skills: Agent Skills Documentation