Skip to main content
Skills transform nanobot from a general-purpose agent into a specialized agent equipped with procedural knowledge for specific tasks.

Core Principles

Concise is Key

The context window is a public good. Skills share it with system prompts, conversation history, and user requests. Default assumption: the agent is already very smart. Only add context the agent doesn’t already have. Challenge each piece of information: β€œDoes the agent really need this explanation?” Prefer concise examples over verbose explanations.

Progressive Disclosure

Skills use a three-level loading system:
  1. Metadata (name + description) - Always in context (~100 words)
  2. SKILL.md body - When skill triggers (less than 5k words)
  3. Bundled resources - As needed (unlimited)

Skill Structure

Every skill consists of:
skill-name/
β”œβ”€β”€ SKILL.md (required)
β”‚   β”œβ”€β”€ YAML frontmatter (required)
β”‚   β”‚   β”œβ”€β”€ name: (required)
β”‚   β”‚   └── description: (required)
β”‚   └── Markdown instructions (required)
└── Bundled Resources (optional)
    β”œβ”€β”€ scripts/          - Executable code
    β”œβ”€β”€ references/       - Documentation loaded as needed
    └── assets/           - Files used in output

SKILL.md Frontmatter

The YAML frontmatter triggers your skill:
---
name: my-skill
description: "What the skill does and when to use it. Include all triggering conditions here."
---
Description guidelines:
  • Include both what the skill does AND when to use it
  • Include all β€œwhen to use” information in the description (not in the body)
  • The body is only loaded after triggering

Bundled Resources

Scripts (scripts/)

Executable code for tasks requiring deterministic reliability:
  • When to use: Repeatedly rewritten code or deterministic operations
  • Example: scripts/rotate_pdf.py for PDF rotation
  • Benefits: Token efficient, may execute without loading into context

References (references/)

Documentation loaded as needed:
  • When to use: Documentation the agent should reference while working
  • Examples: API docs, database schemas, company policies
  • Benefits: Keeps SKILL.md lean, loaded only when needed
  • Best practice: Include grep patterns in SKILL.md for large files (>10k words)

Assets (assets/)

Files used in output, not loaded into context:
  • When to use: Files that will be used in final output
  • Examples: Templates, images, boilerplate code, fonts
  • Benefits: Separates output resources from documentation

Creation Process

Step 1: Understand with Examples

Gather concrete examples of how the skill will be used:
  • What functionality should it support?
  • What would users say to trigger it?
  • Can you give specific usage examples?

Step 2: Plan Reusable Contents

Analyze examples to identify:
  1. What scripts would avoid rewriting code?
  2. What references would provide needed context?
  3. What assets would be used in output?

Step 3: Initialize the Skill

Run the initialization script:
scripts/init_skill.py my-skill --path skills/public
Options:
# With specific resources
scripts/init_skill.py my-skill --path skills/public --resources scripts,references

# With example files
scripts/init_skill.py my-skill --path skills/public --examples

Step 4: Edit the Skill

  1. Add reusable resources - Create scripts, references, and assets
  2. Test scripts - Run them to ensure they work
  3. Write SKILL.md - Include instructions for using the skill
  4. Keep it concise - Aim for less than 500 lines in SKILL.md
Writing guidelines:
  • Use imperative/infinitive form
  • Include only essential information
  • Link to references for detailed content

Step 5: Package the Skill

Package your skill for distribution:
scripts/package_skill.py path/to/skill-folder
The script validates and packages your skill into a .skill file (a zip with .skill extension).

Step 6: Iterate

  1. Use the skill on real tasks
  2. Notice struggles or inefficiencies
  3. Update SKILL.md or resources
  4. Test again

Progressive Disclosure Patterns

Keep SKILL.md under 500 lines. When approaching this limit:

Pattern 1: High-level guide with references

# PDF Processing

## Quick start
Extract text with pdfplumber:
[code example]

## Advanced features
- **Form filling**: See [FORMS.md](FORMS.md)
- **API reference**: See [REFERENCE.md](REFERENCE.md)

Pattern 2: Domain-specific organization

bigquery-skill/
β”œβ”€β”€ SKILL.md
└── reference/
    β”œβ”€β”€ finance.md
    β”œβ”€β”€ sales.md
    └── product.md

Pattern 3: Conditional details

# DOCX Processing

## Creating documents
Use docx-js. See [DOCX-JS.md](DOCX-JS.md).

## Editing documents
For simple edits, modify XML directly.

**For tracked changes**: See [REDLINING.md](REDLINING.md)

What NOT to Include

Do not create:
  • README.md
  • INSTALLATION_GUIDE.md
  • QUICK_REFERENCE.md
  • CHANGELOG.md
Skills should only contain information needed for the agent to do the job.

Skill Naming

  • Use lowercase letters, digits, and hyphens only
  • Keep under 64 characters
  • Prefer short, verb-led phrases
  • Namespace by tool when helpful (e.g., gh-address-comments)
  • Name the folder exactly after the skill name

Build docs developers (and LLMs) love