Series: Deepagent (9/10)

The Skills System: Teach Your Agent Your Standards and Preferences
Have you ever run into this: every time you use an agent, you have to repeat "my project is TypeScript, don't use class components, output must have error handling" — and then say it again next time, because it doesn't remember.
Long-term memory can help retain these preferences, but for relatively fixed "behavioral standards," there's a more structured approach: Skills.
What Skills Are
Skills are a customization mechanism in Deep Agents that let you define the agent's behavioral guidelines in document form — not through repeated prompting, but by writing the guidelines down as "a guide the agent should follow," which takes effect as soon as it's loaded.
A skill typically includes:
- Trigger context: when this skill should be applied
- Behavioral guidelines: what to do, what not to do
- Examples: what good output looks like, what bad output looks like
- Tool list: which tools this skill might use
Think of Skills as a replacement for "prompt you have to re-explain every conversation" — locking down your preferences and standards so the agent operates as if it has a "work rulebook."
The Basic Structure of a Skill
A skill is a Markdown document, roughly structured like this:
# Python Development Standards
## When to Apply
Apply these standards whenever the user asks to write or modify Python code.
## Core Standards
**Code style:**
- Use type hints, don't skip type annotations
- Functions no longer than 30 lines; if longer, refactor
- Use f-strings, not % or .format()
**Error handling:**
- All I/O operations must have try/except
- Error messages should be specific, not "Something went wrong"
**Testing:**
- Every public function needs a corresponding unit test
- Test function naming: test_{function_name}_{scenario}
## Output Format
When returning code, also provide the corresponding test code.
## Don'ts
- Don't use global variables
- Don't use print statements for debugging in main logicOnce this skill is loaded, the agent will automatically follow these standards for Python-related tasks — no need to explain them again every conversation.
Loading Skills in Deep Agents CLI
If you're using Deep Agents CLI, specify the skills directory in your config file:
# ~/.deepagents/config.yaml
skills_dir: ~/.deepagents/skills/
skills:
- python-dev-standards
- code-review-checklist
- documentation-styleEach skill corresponds to a Markdown file under skills_dir. They're automatically loaded when the CLI starts and applied to all subsequent conversations.
Dynamically Loading Skills with the SDK
If you're creating agents with the SDK, you can add skills content to system_prompt at creation time, or pass them via the context parameter:
from deepagents import create_deep_agent
from pathlib import Path
def load_skill(skill_name: str) -> str:
skill_path = Path(f"./skills/{skill_name}.md")
return skill_path.read_text()
# Add skills content to system_prompt
python_skill = load_skill("python-dev-standards")
review_skill = load_skill("code-review-checklist")
agent = create_deep_agent(
tools=[...],
system_prompt=f"""You are a senior Python engineer.
Follow these standards:
{python_skill}
{review_skill}
""",
)When Building Skills Is Worth the Investment
Highly worth investing in:
- You have a fixed set of code style or architecture standards that apply to every task
- Your agent needs to be familiar with a specific tech stack or business logic
- You'll reuse the same agent across multiple similar tasks
Might not be worth it:
- You only use the agent occasionally, with varied and non-repeating tasks
- The standards are still in flux and changing frequently — every change means updating the skill too
- The standard is simple enough that one or two lines in a prompt cover it; no need for a standalone document
Skills vs. Long-Term Memory: Division of Responsibility
These two mechanisms solve different problems:
| Skills | Long-term memory | |
|---|---|---|
| Content type | Fixed standards and preferences | Dynamically accumulated knowledge |
| How it updates | Manually editing documents | Agent updates automatically |
| Good for storing | Dev standards, style guides, business rules | User preferences, project state, conversation history |
| Load timing | Fixed load at agent initialization | On-demand retrieval during conversation |
The best approach is to use both together — Skills manage "standards" (things you want the agent to always follow), Memory Store manages "memory" (things the agent has learned about you through use).
One Underappreciated Use Case for Skills: Teaching Agents to Work for Others
The Skills mechanism isn't just for your own use — if you're building an AI assistant product, you can create skills representing the standards and preferences of different users, letting the agent "understand" what different users need without relying on per-conversation prompt engineering.
This transforms "customizing agent behavior" from an operational problem into a configuration problem that can be managed systematically.
Previous: Long-Term Memory: Let the Agent Remember Important Information Across Conversations Next: Deep Agents CLI: A Coding Agent Right in Your Terminal