Skills

A skill is a reusable, task-specific instruction bundle that an agent activates when the current task matches the skill’s description. Skills are structured natural language — not compiled code, not deterministic scripts. They hand the agent a playbook (context, constraints, steps, scoped tools) while leaving execution to the model.

Instruction files define project-wide behavior. Skills decompose specialized workflows — migrations, deployments, releases, code review — into self-contained units that load only when relevant. Without that split, every specialized procedure has to live in the root instruction file, bloating context and drowning signal.


Universal Structure

graph TD
    S["SKILL.md<br/><i>Instructions + YAML frontmatter</i><br/><b>Always loaded on activation</b>"]
    SC["scripts/<br/><i>Executable automation</i>"]
    RF["references/<br/><i>Docs loaded on demand</i><br/>NOT in main context"]
    AS["assets/<br/><i>Templates, boilerplate</i>"]

    S --> SC
    S --> RF
    S --> AS

    T["Task matches description"] -->|"auto-activate"| S
    U["/skill-name"] -->|"manual invoke"| S

    style S fill:#eef2ff,stroke:#c7d2fe
    style RF fill:#fefce8,stroke:#fde68a

SKILL.md is the only required file. scripts/ holds deterministic operations the agent should run rather than improvise. references/ holds detailed docs pulled in only when needed. assets/ stores templates the skill points at as starting points.


Cross-Platform Mapping

SystemPrimitiveActivation
Claude Code.claude/skills/ + SKILL.mdDescription match or /skill-name
OpenAI Responses APISkills (since Feb 2026, via hosted shell tool)API config: tools[].environment.skills
Google ADKSkills (SkillToolset runtime)Inline or directory-based SKILL.md
LangGraphSubgraphs + tools (no skills primitive)Conditional edges route to subgraphs
CrewAITools (within a Skills/Apps/MCPs/Knowledge stack, but tools in practice)Role-based matching inside a crew

The agentskills.io SKILL.md spec is shared by Anthropic, OpenAI, and Google ADK — the same skill directory is portable across all three.


Key Properties


SKILL.md Anatomy

YAML frontmatter defines metadata and behavior; the markdown body defines the workflow.

---
name: db-migration
description: >
  Generate and validate database migration files for PostgreSQL schema changes.
  Handles column additions, table creation, index management, and enum
  modifications. Always generates both up and down migrations.
allowed-tools:
  - Read
  - Edit
  - Write
  - Bash(alembic *)
  - Bash(psql *)
  - Bash(make db-*)
context: fork
paths:
  - "services/api/models/**/*.py"
  - "services/api/migrations/**/*.py"
disable-model-invocation: false
---

The body is plain markdown: numbered pre-flight checks, generation steps with embedded shell calls (!alembic heads), @references/schema-conventions.md pulls for conditional context, and a final report-back step. Keep it short; push depth into references/.


Best Practices


A Note on Slash Commands

.claude/commands/<name>.md (project) and ~/.claude/commands/<name>.md (user) markdown files still work — body becomes the prompt, $ARGUMENTS placeholder supported. Custom slash commands are increasingly being subsumed into Skills; new work should prefer Skills, treating the commands directory as legacy-adjacent.