Guides creation, validation, and packaging of AI agent skills with token-efficient design, progressive disclosure patterns, and YAML frontmatter best practices. Use when building new skills, updating existing skills, validating skill structure against standards, or packaging for distribution—e.g., "create skill", "validate SKILL.md", "package skill for sharing", "check description format".
94
Does it follow best practices?
Validation for skill structure
Guide for creating effective, token-efficient skills for AI agents. Covers skill structure, progressive disclosure, validation, and packaging.
Context window is shared. Only add what the agent doesn't already know. Challenge every piece of content: "Is this essential?" Prefer examples over explanations.
Skills that enforce discipline or guide decisions should use persuasion principles from the research on LLM compliance (Cialdini 2021, Meincke et al. 2025). These techniques more than doubled compliance rates (33% → 72%).
Key principles for skills:
Skill type combinations:
| Skill Type | Use | Avoid |
|---|---|---|
| Discipline-enforcing | Authority + Commitment + Social Proof | Liking, Reciprocity |
| Guidance/technique | Moderate Authority + Unity | Heavy authority |
| Collaborative | Unity + Commitment | Authority, Liking |
| Reference | Clarity only | All persuasion |
Ethical test: Would this serve the user's genuine interests if they fully understood it?
See references/persuasion-principles.md for full details and examples.
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter (name, description)
│ └── Markdown instructions
└── Bundled Resources (optional)
├── scripts/ - Executable code
├── references/ - Loaded as needed
└── assets/ - Used in outputSKILL.md Frontmatter (YAML): name and description determine when skill loads.
Description template:
description: |
<What it does>. Use when <context>, <context>, or <context>—e.g., "<example>", "<example>".See references/skill-description-guide.md for full guidance.
Body (Markdown): Loaded AFTER skill triggers. Instructions for execution.
Scripts: Deterministic operations rewritten repeatedly. Token-efficient, tested, self-contained, and executable via shebang (never python <script>), without loading to context.
References: Documentation loaded on-demand. Keeps SKILL.md lean. Examples: schemas, API docs, policies, detailed guides.
Assets: Output files (templates, images, boilerplate). Not loaded to context.
Three-level loading:
Keep SKILL.md under 500 lines. Split content when approaching limit. Link references clearly with guidance on when to read them.
Patterns:
See references/effective-patterns.md for detailed patterns and anti-patterns.
All the scripts in skills/skill-creator/scripts/ are self-contained full scripts
with shebangs. They should be run directly (e.g. ./init_skill.py <args>) and made executable
(chmod +x <script>). Never run them via python <script>.
Gather concrete use cases. Ask:
For each example, identify reusable content:
skills/skill-creator/scripts/init_skill.py <skill-name> --path <output-directory>Creates template with SKILL.md, example directories.
Write for another AI agent instance. Include non-obvious procedural knowledge.
If the skill will produce recommendations or influence decisions, include ethical persuasion guidance and a self-review checklist. See references/persuasion-principles.md.
Consult:
Frontmatter:
name: Skill identifier (kebab-case)description: Determines when skill loads. Format: <What it does>. Use when <contexts>—e.g., "<examples>".
Body: Use imperative form. Write clear instructions. Link references with guidance.
Test scripts by running them directly (shebang). Delete unused example files.
skills/skill-creator/scripts/package_skill.py <path/to/skill-folder> [output-dir]Validates then packages as .skill file (zip with .skill extension).
Validation checks:
See references/validation-checklist.md for complete checklist.
Test on real tasks. Note inefficiencies. Update skill. Repeat.
Include this requirement in every skill you create.
DO:
skills/skill-creator/scripts/quick_validate.py on the skill folder after editspython <script>) and ensure they are executableDON'T:
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.