The shape of a skill
A skill is a directory whose name is the skill's identity, containing a SKILL.md file. Everything else is optional.
.agents/
└── skills/
└── deploy-app/
├── SKILL.md
├── scripts/
│ ├── deploy.sh
│ └── validate.py
├── references/
│ └── REFERENCE.md
└── assets/
└── config-template.jsonThe three optional directories have defined roles. scripts/ holds executable code the agent can run, in any language. references/ holds documentation loaded on demand. assets/ holds templates, images and data files.
That split matters for context economy. Skills load progressively, so a large reference document sitting in references/ costs nothing until the agent decides it needs it. The same content pasted into SKILL.md would be in context every single time the skill is considered.
The file itself
---
name: react-component-patterns
description: Conventions for writing React components in this codebase.
paths:
- "**/*.tsx"
- "packages/ui/**/*.ts"
---
# React component patterns
## When to use
- Use this skill when creating or editing a component.
## Instructions
- Step-by-step guidance for the agent
- Domain-specific conventionsTwo fields are required and one of them carries almost all the weight. The agent uses description to decide whether a skill is relevant, so it should read as a statement of what the skill does and when to reach for it. A description of "React stuff" will be ignored in situations where it would have helped.
Scoping, and why it is worth doing
The paths field limits a skill to files matching one or more globs. When set, the skill is only surfaced while the agent is working with matching files. This is not a small optimisation. In a repository with a dozen skills, unscoped guidance for Python conventions is competing for attention during a CSS change.
Nested directories give you the same effect for free. A .cursor/skills/ folder anywhere inside the repository is discovered, and skills found there are automatically scoped to files inside that directory. In a monorepo, putting a skill under apps/web/.cursor/skills/ scopes it to apps/web/ without any frontmatter at all.
Category folders are different: they are purely organisational. Grouping skills under shipping/ or debugging/ does not change scope, because a skill's identity comes from the folder containing SKILL.md, not from its parent.
Three ways a skill activates
- Automatically. The default. The agent sees the available skills and picks based on context.
- For one message. Type
/in Agent chat and select the skill by name. - For a whole session. Invoke it as a Custom Mode with Option Enter on Mac or Alt Enter on Windows. An active mode shows a badge in the chat input, styled by the
iconandcolorfields.
Setting disable-model-invocation: true removes the first option, turning the skill into a conventional slash command. That is the right choice for anything destructive, and the wrong choice for conventions you want applied consistently without having to remember them.
What travels and what does not
This trips people up when they first run a cloud agent. Project skills live in the repository and travel with it. Personal skills in ~/.cursor/skills/ stay on your machine until you turn on Sync Skills for Cloud Agents, and even then they stay private to you rather than being shared with your team.
Skills in ~/.agents/skills/ and unsynced local skills are not copied to cloud agents, remote SSH sessions in the Agents Window, or self-hosted workers at all. On a self-hosted worker, the documented options are project skills from the repository, or baking skills into the worker image.
Frontmatter fields, directory list and built-in skills transcribed from the Agent Skills documentation on 25 September 2026.