$npx -y skills add langchain-ai/deepagents --skill skill-creatorGuide 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) scaff
| 1 | # Skill Creator |
| 2 | |
| 3 | ### Skill Location for Deepagents |
| 4 | |
| 5 | The deepagents CLI loads skills from four directories, listed here from lowest to highest precedence: |
| 6 | |
| 7 | | # | Directory | Scope | Notes | |
| 8 | |---|-----------|-------|-------| |
| 9 | | 1 | `~/.deepagents/<agent>/skills/` | User (deepagents alias) | Default for `deepagents skills create` | |
| 10 | | 2 | `~/.agents/skills/` | User | Shared across agent tools | |
| 11 | | 3 | `.deepagents/skills/` | Project (deepagents alias) | Default for `deepagents skills create --project` | |
| 12 | | 4 | `.agents/skills/` | Project | Shared across agent tools | |
| 13 | |
| 14 | `<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. |
| 15 | |
| 16 | Example directory layout: |
| 17 | |
| 18 | ``` |
| 19 | ~/.deepagents/agent/skills/ # user skills (lowest precedence) |
| 20 | ├── skill-name-1/ |
| 21 | │ └── SKILL.md |
| 22 | └── ... |
| 23 | |
| 24 | <project-root>/.deepagents/skills/ # project skills (higher precedence) |
| 25 | ├── skill-name-2/ |
| 26 | │ └── SKILL.md |
| 27 | └── ... |
| 28 | ``` |
| 29 | |
| 30 | ## Core Principles |
| 31 | |
| 32 | ### Concise is Key |
| 33 | |
| 34 | The 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. |
| 35 | |
| 36 | **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?" |
| 37 | |
| 38 | Prefer concise examples over verbose explanations. |
| 39 | |
| 40 | ### Set Appropriate Degrees of Freedom |
| 41 | |
| 42 | Match the level of specificity to the task's fragility and variability: |
| 43 | |
| 44 | **High freedom (text-based instructions)**: Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach. |
| 45 | |
| 46 | **Medium freedom (pseudocode or scripts with parameters)**: Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior. |
| 47 | |
| 48 | **Low freedom (specific scripts, few parameters)**: Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed. |
| 49 | |
| 50 | Think 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). |
| 51 | |
| 52 | ### Anatomy of a Skill |
| 53 | |
| 54 | Every skill consists of a required SKILL.md file and optional bundled resources: |
| 55 | |
| 56 | ``` |
| 57 | skill-name/ |
| 58 | ├── SKILL.md (required) |
| 59 | │ ├── YAML frontmatter metadata (required) |
| 60 | │ │ ├── name: (required) |
| 61 | │ │ └── description: (required) |
| 62 | │ └── Markdown instructions (required) |
| 63 | └── Bundled Resources (optional) |
| 64 | ├── scripts/ - Executable code (Python/Bash/etc.) |
| 65 | ├── references/ - Documentation intended to be loaded into context as needed |
| 66 | └── assets/ - Files used in output (templates, icons, fonts, etc.) |
| 67 | ``` |
| 68 | |
| 69 | #### SKILL.md (required) |
| 70 | |
| 71 | Every SKILL.md consists of: |
| 72 | |
| 73 | - **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. |
| 74 | - **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all). |
| 75 | |
| 76 | #### Bundled Resources (optional) |
| 77 | |
| 78 | ##### Scripts (`scripts/`) |
| 79 | |
| 80 | Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten. |
| 81 | |
| 82 | - **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed |
| 83 | - **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks |
| 84 | - **Benefits**: Token efficient, deterministic, may be executed without loading into context |
| 85 | - **Note**: Scripts may still need to be read by the agent for patching or environment-specific adjustments |
| 86 | |
| 87 | ##### References (`references/`) |
| 88 | |
| 89 | Documentation and reference material intended to be loaded as needed into context to inform the agent's process and thinking. |
| 90 | |
| 91 | - **When to include**: For documentation that the agent should reference while working |
| 92 | - **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 specifications |
| 93 | - |