SKILL.md
SKILL.mdBrowse 3 files
4,138 tokens
19,309 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\"."4license: MIT5compatibility: designed for deepagents-code6---7 8# Skill Creator9 10### Skill Location for Deepagents11 12The deepagents CLI loads skills from five sources, listed here from lowest to highest precedence:13 14| # | Directory | Scope | Notes |15|---|-----------|-------|-------|16| 0 | `<package>/built_in_skills/` | Built-in | Ships with deepagents CLI |17| 1 | `$DEEPAGENTS_HOME/<agent>/skills/` | User (deepagents alias) | Default for `deepagents skills create` |18| 2 | `~/.agents/skills/` | User | Shared across agent tools |19| 3 | `.deepagents/skills/` | Project (deepagents alias) | Default for `deepagents skills create --project` |20| 4 | `.agents/skills/` | Project | Shared across agent tools |21 22`<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, and any user or project skill overrides built-in skills.23 24Example directory layout:25 26```27$DEEPAGENTS_HOME/agent/skills/ # user skills (lowest precedence)28├── skill-name-1/29│ └── SKILL.md30└── ...31 32<project-root>/.deepagents/skills/ # project skills (higher precedence)33├── skill-name-2/34│ └── SKILL.md35└── ...36```37 38## Core Principles39 40### Concise is Key41 42The 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.43 44**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?"45 46Prefer concise examples over verbose explanations.47 48### Set Appropriate Degrees of Freedom49 50Match the level of specificity to the task's fragility and variability:51 52**High freedom (text-based instructions)**: Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach.53 54**Medium freedom (pseudocode or scripts with parameters)**: Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior.55 56**Low freedom (specific scripts, few parameters)**: Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed.57 58Think 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).59 60### Anatomy of a Skill61 62Every skill consists of a required SKILL.md file and optional bundled resources:63 64```65skill-name/66├── SKILL.md (required)67│ ├── YAML frontmatter metadata (required)68│ │ ├── name: (required)69│ │ └── description: (required)70│ └── Markdown instructions (required)71└── Bundled Resources (optional)72 ├── scripts/ - Executable code (Python/Bash/etc.)73 ├── references/ - Documentation intended to be loaded into context as needed74 └── assets/ - Files used in output (templates, icons, fonts, etc.)75```76 77#### SKILL.md (required)78 79Every SKILL.md consists of:80 81- **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.82- **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all).83 84#### Bundled Resources (optional)85 86##### Scripts (`scripts/`)87 88Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.89 90- **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed91- **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks92- **Benefits**: Token efficient, deterministic, may be executed without loading into context93- **Note**: Scripts may still need to be read by the agent for patching or environment-specific adjustments94 95##### References (`references/`)96 97Documentation and reference material intended to be loaded as needed into context to inform the agent's process and thinking.98 99- **When to include**: For documentation that the agent should reference while working100- **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 specifications101- **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides102- **Benefits**: Keeps SKILL.md lean, loaded only when the agent determines it's needed103- **Best practice**: If files are large (>10k words), include search patterns in SKILL.md104- **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.105 106##### Assets (`assets/`)107 108Files not intended to be loaded into context, but rather used within the output the agent produces.109 110- **When to include**: When the skill needs files that will be used in the final output111- **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for PowerPoint templates, `assets/frontend-template/` for HTML/React boilerplate, `assets/font.ttf` for typography112- **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified113- **Benefits**: Separates output resources from documentation, enables the agent to use files without loading them into context114 115#### What to Not Include in a Skill116 117A skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:118 119- README.md120- INSTALLATION_GUIDE.md121- QUICK_REFERENCE.md122- CHANGELOG.md123- etc.124 125The skill should only contain the information needed for an AI agent to do the job at hand. It should not contain auxiliary 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.126 127### Progressive Disclosure Design Principle128 129Skills use a three-level loading system to manage context efficiently:130 1311. **Metadata (name + description)** - Always in context (~100 words)1322. **SKILL.md body** - When skill triggers (<5k words)1333. **Bundled resources** - As needed by the agent (Unlimited because scripts can be executed without reading into context window)134 135#### Progressive Disclosure Patterns136 137Keep 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.138 139**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.140 141**Pattern 1: High-level guide with references**142 143```markdown144# PDF Processing145 146## Quick start147 148Extract text with pdfplumber:149[code example]150 151## Advanced features152 153- **Form filling**: See [FORMS.md](FORMS.md) for complete guide154- **API reference**: See [REFERENCE.md](REFERENCE.md) for all methods155- **Examples**: See [EXAMPLES.md](EXAMPLES.md) for common patterns156```157 158The agent loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed.159 160**Pattern 2: Domain-specific organization**161 162For Skills with multiple domains, organize content by domain to avoid loading irrelevant context:163 164```165bigquery-skill/166├── SKILL.md (overview and navigation)167└── reference/168 ├── finance.md (revenue, billing metrics)169 ├── sales.md (opportunities, pipeline)170 ├── product.md (API usage, features)171 └── marketing.md (campaigns, attribution)172```173 174When a user asks about sales metrics, the agent only reads sales.md.175 176Similarly, for skills supporting multiple frameworks or variants, organize by variant:177 178```179cloud-deploy/180├── SKILL.md (workflow + provider selection)181└── references/182 ├── aws.md (AWS deployment patterns)183 ├── gcp.md (GCP deployment patterns)184 └── azure.md (Azure deployment patterns)185```186 187When the user chooses AWS, the agent only reads aws.md.188 189**Pattern 3: Conditional details**190 191Show basic content, link to advanced content:192 193```markdown194# DOCX Processing195 196## Creating documents197 198Use docx-js for new documents. See [DOCX-JS.md](DOCX-JS.md).199 200## Editing documents201 202For simple edits, modify the XML directly.203 204**For tracked changes**: See [REDLINING.md](REDLINING.md)205**For OOXML details**: See [OOXML.md](OOXML.md)206```207 208The agent reads REDLINING.md or OOXML.md only when the user needs those features.209 210**Important guidelines:**211 212- **Avoid deeply nested references** - Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md.213- **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.214 215## Skill Creation Process216 217Skill creation involves these steps:218 2191. Understand the skill with concrete examples2202. Plan reusable skill contents (scripts, references, assets)2213. Initialize the skill (run init_skill.py)2224. Edit the skill (implement resources and write SKILL.md)2235. Validate the skill (run quick_validate.py)2246. Iterate based on real usage225 226Follow these steps in order, skipping only if there is a clear reason why they are not applicable.227 228### Step 1: Understanding the Skill with Concrete Examples229 230Skip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.231 232To 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.233 234For example, when building an image-editor skill, relevant questions include:235 236- "What functionality should the image-editor skill support? Editing, rotating, anything else?"237- "Can you give some examples of how this skill would be used?"238- "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?"239- "What would a user say that should trigger this skill?"240 241To 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.242 243Conclude this step when there is a clear sense of the functionality the skill should support.244 245### Step 2: Planning the Reusable Skill Contents246 247To turn concrete examples into an effective skill, analyze each example by:248 2491. Considering how to execute on the example from scratch2502. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly251 252Example: When building a `pdf-editor` skill to handle queries like "Help me rotate this PDF," the analysis shows:253 2541. Rotating a PDF requires re-writing the same code each time2552. A `scripts/rotate_pdf.py` script would be helpful to store in the skill256 257Example: 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:258 2591. Writing a frontend webapp requires the same boilerplate HTML/React each time2602. An `assets/hello-world/` template containing the boilerplate HTML/React project files would be helpful to store in the skill261 262Example: When building a `big-query` skill to handle queries like "How many users have logged in today?" the analysis shows:263 2641. Querying BigQuery requires re-discovering the table schemas and relationships each time2652. A `references/schema.md` file documenting the table schemas would be helpful to store in the skill266 267To establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.268 269### Step 3: Initializing the Skill270 271At this point, it is time to actually create the skill.272 273Skip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.274 275There are two ways to create a new skill:276 277#### Option A: `init_skill.py` (recommended for rich skills)278 279When 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.280 281Usage:282 283```bash284scripts/init_skill.py <skill-name> --path <output-directory>285```286 287For deepagents CLI, use any of the skill directories listed in "Skill Location for Deepagents" above:288 289```bash290# User skills (default)291scripts/init_skill.py <skill-name> --path "${DEEPAGENTS_HOME:-$HOME/.deepagents}/agent/skills"292 293# Project skills294scripts/init_skill.py <skill-name> --path .deepagents/skills295```296 297The script:298 299- Creates the skill directory at the specified path300- Generates a SKILL.md template with proper frontmatter and TODO placeholders301- Creates example resource directories: `scripts/`, `references/`, and `assets/`302- Adds example files in each directory that can be customized or deleted303 304After initialization, customize or remove the generated SKILL.md and example files as needed.305 306#### Option B: `deepagents skills create` (quick start)307 308The 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.309 310```bash311# Create in user skills directory312deepagents skills create <skill-name>313 314# Create in project skills directory315deepagents skills create <skill-name> --project316```317 318Use `init_skill.py` when the skill will include bundled resources (`scripts/`, `references/`, `assets/`). Use `deepagents skills create` for a quick, minimal starting point.319 320### Step 4: Edit the Skill321 322When 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.323 324#### Learn Proven Design Patterns325 326Refer to the "Progressive Disclosure Design Principle" and "Core Principles" sections above for established patterns around sequential workflows, conditional logic, and output formatting.327 328#### Start with Reusable Skill Contents329 330To 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/`.331 332Added 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.333 334Any 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.335 336#### Update SKILL.md337 338**Writing Guidelines:** Always use imperative/infinitive form.339 340##### Frontmatter341 342Write the YAML frontmatter with `name` and `description`:343 344- `name`: The skill name345- `description`: This is the primary triggering mechanism for your skill, and helps the agent understand when to use the skill.346 - Include both what the Skill does and specific triggers/contexts for when to use it.347 - 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.348 - 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"349 350The only other allowed fields in YAML frontmatter are optional properties per the Agent Skills spec: `license`, `compatibility`, `allowed-tools`, and `metadata`. Do not include any fields beyond these.351 352##### Body353 354Write instructions for using the skill and its bundled resources.355 356### Step 5: Validate the Skill357 358Once development of the skill is complete, validate it to ensure it meets all requirements:359 360```bash361scripts/quick_validate.py <path/to/skill-folder>362```363 364The validation script checks:365 366- YAML frontmatter format and required fields367- Skill naming conventions (Unicode lowercase alphanumeric with hyphens, max 64 characters)368- Description completeness (no angle brackets, max 1024 characters)369- Required fields: `name` and `description`370- Allowed frontmatter properties only: `name`, `description`, `license`, `compatibility`, `allowed-tools`, `metadata`371 372If validation fails, fix the reported errors and run the validation command again.373 374### Step 6: Iterate375 376After testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.377 378**Iteration workflow:**379 3801. Use the skill on real tasks3812. Notice struggles or inefficiencies3823. Identify how SKILL.md or bundled resources should be updated3834. Implement changes and test again384 Discovery context
Discovered by repository scan. No exact path reference found in the snapshot’s root AGENTS.md.