docs/cli/skills-best-practices.md
Create high-quality, reliable Agent Skills by following these established design principles and patterns.
The most important part of a skill is its description. This is the only
information the model has before activation.
The "context window" is a shared resource. Use a three-level loading system to manage context efficiently.
SKILL.md body: Loaded only after the skill triggers (<5k words).Best practice: Keep the SKILL.md body focused on core procedural
instructions. Move detailed reference material, schemas, and examples into
separate files in a references/ directory.
Match the level of instruction specificity to the task's fragility.
Leverage the skill's ability to include scripts and assets to extend the agent's capabilities.
scripts/ folder.assets/ folder to ensure the agent produces consistent output.A well-structured skill directory organizes its resources into specialized sub-folders.
my-skill/
├── SKILL.md (Required) Core instructions and metadata
├── scripts/ (Optional) Executable logic (Node.js, Python, etc.)
├── references/ (Optional) Documentation to be loaded as needed
└── assets/ (Optional) Templates and non-executable resources
Design your skills with security in mind to protect your workspace and data.
SKILL.md and scripts of any skill
before installing it from an untrusted source.