SKILL.md
SKILL.mdBrowse 3 files
4,078 tokens
19,079 bytes
Token encoding: o200k_base
Snapshot 229ffef
1---2name: skill-creator3description: "Guide for creating effective skills that extend agent capabilities with specialized knowledge, workflows, or tool integrations. Use this skill when the user asks to: (1) create a new skill, (2) make a skill, (3) build a skill, (4) set up a skill, (5) initialize a skill, (6) scaffold a skill, (7) update or modify an existing skill, (8) validate a skill, (9) learn about skill structure, (10) understand how skills work, or (11) get guidance on skill design patterns. Trigger on phrases like \"create a skill\", \"new skill\", \"make a skill\", \"skill for X\", \"how do I create a skill\", or \"help me build a skill\"."4---5 6# Skill Creator7 8### Skill Location for Deepagents9 10The deepagents CLI loads skills from four directories, listed here from lowest to highest precedence:11 12| # | Directory | Scope | Notes |13|---|-----------|-------|-------|14| 1 | `~/.deepagents/<agent>/skills/` | User (deepagents alias) | Default for `deepagents skills create` |15| 2 | `~/.agents/skills/` | User | Shared across agent tools |16| 3 | `.deepagents/skills/` | Project (deepagents alias) | Default for `deepagents skills create --project` |17| 4 | `.agents/skills/` | Project | Shared across agent tools |18 19`<agent>` is the agent configuration name (default: `agent`). When two directories contain a skill with the same name, the higher-precedence version wins — project skills override user skills.20 21Example directory layout:22 23```24~/.deepagents/agent/skills/ # user skills (lowest precedence)25├── skill-name-1/26│ └── SKILL.md27└── ...28 29<project-root>/.deepagents/skills/ # project skills (higher precedence)30├── skill-name-2/31│ └── SKILL.md32└── ...33```34 35## Core Principles36 37### Concise is Key38 39The context window is a public good. Skills share the context window with everything else the agent needs: system prompt, conversation history, other Skills' metadata, and the actual user request.40 41**Default assumption: The agent is already very capable.** Only add context the agent doesn't already have. Challenge each piece of information: "Does the agent really need this explanation?" and "Does this paragraph justify its token cost?"42 43Prefer concise examples over verbose explanations.44 45### Set Appropriate Degrees of Freedom46 47Match the level of specificity to the task's fragility and variability:48 49**High freedom (text-based instructions)**: Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach.50 51**Medium freedom (pseudocode or scripts with parameters)**: Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior.52 53**Low freedom (specific scripts, few parameters)**: Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed.54 55Think of the agent as exploring a path: a narrow bridge with cliffs needs specific guardrails (low freedom), while an open field allows many routes (high freedom).56 57### Anatomy of a Skill58 59Every skill consists of a required SKILL.md file and optional bundled resources:60 61```62skill-name/63├── SKILL.md (required)64│ ├── YAML frontmatter metadata (required)65│ │ ├── name: (required)66│ │ └── description: (required)67│ └── Markdown instructions (required)68└── Bundled Resources (optional)69 ├── scripts/ - Executable code (Python/Bash/etc.)70 ├── references/ - Documentation intended to be loaded into context as needed71 └── assets/ - Files used in output (templates, icons, fonts, etc.)72```73 74#### SKILL.md (required)75 76Every SKILL.md consists of:77 78- **Frontmatter** (YAML): Contains `name` and `description` fields. These are the only fields that the agent reads to determine when the skill gets used, thus it is very important to be clear and comprehensive in describing what the skill is, and when it should be used.79- **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all).80 81#### Bundled Resources (optional)82 83##### Scripts (`scripts/`)84 85Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.86 87- **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed88- **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks89- **Benefits**: Token efficient, deterministic, may be executed without loading into context90- **Note**: Scripts may still need to be read by the agent for patching or environment-specific adjustments91 92##### References (`references/`)93 94Documentation and reference material intended to be loaded as needed into context to inform the agent's process and thinking.95 96- **When to include**: For documentation that the agent should reference while working97- **Examples**: `references/finance.md` for financial schemas, `references/mnda.md` for company NDA template, `references/policies.md` for company policies, `references/api_docs.md` for API specifications98- **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides99- **Benefits**: Keeps SKILL.md lean, loaded only when the agent determines it's needed100- **Best practice**: If files are large (>10k words), include search patterns in SKILL.md101- **Avoid duplication**: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.102 103##### Assets (`assets/`)104 105Files not intended to be loaded into context, but rather used within the output the agent produces.106 107- **When to include**: When the skill needs files that will be used in the final output108- **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for PowerPoint templates, `assets/frontend-template/` for HTML/React boilerplate, `assets/font.ttf` for typography109- **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified110- **Benefits**: Separates output resources from documentation, enables the agent to use files without loading them into context111 112#### What to Not Include in a Skill113 114A skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:115 116- README.md117- INSTALLATION_GUIDE.md118- QUICK_REFERENCE.md119- CHANGELOG.md120- etc.121 122The skill should only contain the information needed for an AI agent to do the job at hand. It should not contain auxilary context about the process that went into creating it, setup and testing procedures, user-facing documentation, etc. Creating additional documentation files just adds clutter and confusion.123 124### Progressive Disclosure Design Principle125 126Skills use a three-level loading system to manage context efficiently:127 1281. **Metadata (name + description)** - Always in context (~100 words)1292. **SKILL.md body** - When skill triggers (<5k words)1303. **Bundled resources** - As needed by the agent (Unlimited because scripts can be executed without reading into context window)131 132#### Progressive Disclosure Patterns133 134Keep SKILL.md body to the essentials and under 500 lines to minimize context bloat. SKILL.md files exceeding 10 MB are silently skipped by the agent runtime. Split content into separate files when approaching the line limit. When splitting out content into other files, it is very important to reference them from SKILL.md and describe clearly when to read them, to ensure the reader of the skill knows they exist and when to use them.135 136**Key principle:** When a skill supports multiple variations, frameworks, or options, keep only the core workflow and selection guidance in SKILL.md. Move variant-specific details (patterns, examples, configuration) into separate reference files.137 138**Pattern 1: High-level guide with references**139 140```markdown141# PDF Processing142 143## Quick start144 145Extract text with pdfplumber:146[code example]147 148## Advanced features149 150- **Form filling**: See [FORMS.md](FORMS.md) for complete guide151- **API reference**: See [REFERENCE.md](REFERENCE.md) for all methods152- **Examples**: See [EXAMPLES.md](EXAMPLES.md) for common patterns153```154 155The agent loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed.156 157**Pattern 2: Domain-specific organization**158 159For Skills with multiple domains, organize content by domain to avoid loading irrelevant context:160 161```162bigquery-skill/163├── SKILL.md (overview and navigation)164└── reference/165 ├── finance.md (revenue, billing metrics)166 ├── sales.md (opportunities, pipeline)167 ├── product.md (API usage, features)168 └── marketing.md (campaigns, attribution)169```170 171When a user asks about sales metrics, the agent only reads sales.md.172 173Similarly, for skills supporting multiple frameworks or variants, organize by variant:174 175```176cloud-deploy/177├── SKILL.md (workflow + provider selection)178└── references/179 ├── aws.md (AWS deployment patterns)180 ├── gcp.md (GCP deployment patterns)181 └── azure.md (Azure deployment patterns)182```183 184When the user chooses AWS, the agent only reads aws.md.185 186**Pattern 3: Conditional details**187 188Show basic content, link to advanced content:189 190```markdown191# DOCX Processing192 193## Creating documents194 195Use docx-js for new documents. See [DOCX-JS.md](DOCX-JS.md).196 197## Editing documents198 199For simple edits, modify the XML directly.200 201**For tracked changes**: See [REDLINING.md](REDLINING.md)202**For OOXML details**: See [OOXML.md](OOXML.md)203```204 205The agent reads REDLINING.md or OOXML.md only when the user needs those features.206 207**Important guidelines:**208 209- **Avoid deeply nested references** - Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md.210- **Structure longer reference files** - For files longer than 100 lines, include a table of contents at the top so the agent can see the full scope when previewing.211 212## Skill Creation Process213 214Skill creation involves these steps:215 2161. Understand the skill with concrete examples2172. Plan reusable skill contents (scripts, references, assets)2183. Initialize the skill (run init_skill.py)2194. Edit the skill (implement resources and write SKILL.md)2205. Validate the skill (run quick_validate.py)2216. Iterate based on real usage222 223Follow these steps in order, skipping only if there is a clear reason why they are not applicable.224 225### Step 1: Understanding the Skill with Concrete Examples226 227Skip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.228 229To 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.230 231For example, when building an image-editor skill, relevant questions include:232 233- "What functionality should the image-editor skill support? Editing, rotating, anything else?"234- "Can you give some examples of how this skill would be used?"235- "I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?"236- "What would a user say that should trigger this skill?"237 238To 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.239 240Conclude this step when there is a clear sense of the functionality the skill should support.241 242### Step 2: Planning the Reusable Skill Contents243 244To turn concrete examples into an effective skill, analyze each example by:245 2461. Considering how to execute on the example from scratch2472. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly248 249Example: When building a `pdf-editor` skill to handle queries like "Help me rotate this PDF," the analysis shows:250 2511. Rotating a PDF requires re-writing the same code each time2522. A `scripts/rotate_pdf.py` script would be helpful to store in the skill253 254Example: 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:255 2561. Writing a frontend webapp requires the same boilerplate HTML/React each time2572. An `assets/hello-world/` template containing the boilerplate HTML/React project files would be helpful to store in the skill258 259Example: When building a `big-query` skill to handle queries like "How many users have logged in today?" the analysis shows:260 2611. Querying BigQuery requires re-discovering the table schemas and relationships each time2622. A `references/schema.md` file documenting the table schemas would be helpful to store in the skill263 264To establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.265 266### Step 3: Initializing the Skill267 268At this point, it is time to actually create the skill.269 270Skip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.271 272There are two ways to create a new skill:273 274#### Option A: `init_skill.py` (recommended for rich skills)275 276When creating a new skill from scratch, run the `init_skill.py` script. The script generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.277 278Usage:279 280```bash281scripts/init_skill.py <skill-name> --path <output-directory>282```283 284For deepagents CLI, use any of the skill directories listed in "Skill Location for Deepagents" above:285 286```bash287# User skills (default)288scripts/init_skill.py <skill-name> --path ~/.deepagents/agent/skills289 290# Project skills291scripts/init_skill.py <skill-name> --path .deepagents/skills292```293 294The script:295 296- Creates the skill directory at the specified path297- Generates a SKILL.md template with proper frontmatter and TODO placeholders298- Creates example resource directories: `scripts/`, `references/`, and `assets/`299- Adds example files in each directory that can be customized or deleted300 301After initialization, customize or remove the generated SKILL.md and example files as needed.302 303#### Option B: `deepagents skills create` (quick start)304 305The built-in CLI command creates a minimal skill with just a `SKILL.md` template — no resource directories. Use this for simple skills that only need instructions and no bundled scripts, references, or assets.306 307```bash308# Create in user skills directory309deepagents skills create <skill-name>310 311# Create in project skills directory312deepagents skills create <skill-name> --project313```314 315Use `init_skill.py` when the skill will include bundled resources (`scripts/`, `references/`, `assets/`). Use `deepagents skills create` for a quick, minimal starting point.316 317### Step 4: Edit the Skill318 319When editing the (newly-generated or existing) skill, remember that the skill is being created for an 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 the agent execute these tasks more effectively.320 321#### Learn Proven Design Patterns322 323Consult these helpful guides based on your skill's needs:324 325- **Multi-step processes**: See references/workflows.md for sequential workflows and conditional logic326- **Specific output formats or quality standards**: See references/output-patterns.md for template and example patterns327 328These files contain established best practices for effective skill design.329 330#### Start with Reusable Skill Contents331 332To 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/`.333 334Added 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.335 336Any example files and directories not needed for the skill should be deleted. The initialization script creates example files in `scripts/`, `references/`, and `assets/` to demonstrate structure, but most skills won't need all of them.337 338#### Update SKILL.md339 340**Writing Guidelines:** Always use imperative/infinitive form.341 342##### Frontmatter343 344Write the YAML frontmatter with `name` and `description`:345 346- `name`: The skill name347- `description`: This is the primary triggering mechanism for your skill, and helps the agent understand when to use the skill.348 - Include both what the Skill does and specific triggers/contexts for when to use it.349 - Include all "when to use" information here - Not in the body. The body is only loaded after triggering, so "When to Use This Skill" sections in the body are not helpful to the agent.350 - Example description for a `docx` skill: "Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. Use when working 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"351 352Do not include any other fields in YAML frontmatter.353 354##### Body355 356Write instructions for using the skill and its bundled resources.357 358### Step 5: Validate the Skill359 360Once development of the skill is complete, validate it to ensure it meets all requirements:361 362```bash363scripts/quick_validate.py <path/to/skill-folder>364```365 366The validation script checks:367 368- YAML frontmatter format and required fields369- Skill naming conventions (hyphen-case, max 64 characters)370- Description completeness (no angle brackets, max 1024 characters)371- Required fields: `name` and `description`372- Allowed frontmatter properties only: `name`, `description`, `license`, `compatibility`, `allowed-tools`, `metadata`373 374If validation fails, fix the reported errors and run the validation command again.375 376### Step 6: Iterate377 378After testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.379 380**Iteration workflow:**381 3821. Use the skill on real tasks3832. Notice struggles or inefficiencies3843. Identify how SKILL.md or bundled resources should be updated3854. Implement changes and test again386 Discovery context
Discovered by repository scan. No exact path reference found in the snapshot’s root AGENTS.md.