Agents
Cursor Agent Skills: How to Use and Create Reusable Agent Commands
A Cursor Agent Skill is a folder with a SKILL.md file that teaches the agent a domain-specific workflow, such as generating a migration the way your project does it. Cursor discovers skills in .cursor/skills/, .agents/skills/ and their home-directory versions when it starts. The agent applies one when it fits, or you run it with /skill-name.

On this page
- What is a Cursor Agent Skill?
- How do I use a skill in Cursor?
- How do I create a new skill?
- When is the best time to create a skill?
- Where should I put skills, and which directories does Cursor scan?
- How do teams share and standardize skills?
- Can non-engineers use skills for domain knowledge?
- Skill, rule or command: how do I decide which to reach for?
What is a Cursor Agent Skill?
A skill is a version-controlled folder with a SKILL.md file and optional scripts. SKILL.md starts with a YAML frontmatter block (name and description), followed by Markdown instructions. Those instructions are what you might otherwise type into a long prompt, stored once and reused.
- SKILL.md
- Required. YAML frontmatter (name, description) plus Markdown instructions for the agent.
- scripts/
- Optional. Executable files the agent can run as part of the skill, such as shell, Python or node scripts.
- references/
- Optional. Reference files the skill loads on demand, which keeps base context small.
- assets/
- Optional. Templates, images or other non-code resources the skill uses.
A prompt in chat is gone after the session. A project skill is committed to your repo and versioned like code, so a teammate who clones the project gets the same skills.
Use the split between SKILL.md and scripts/ on purpose. Put the judgment in Markdown, where you want the agent to think. Put the part that must run identically every time in a script. As one field engineer put it, a skill combines a natural-language description for the agent with an explicit, deterministic executable script. Use a script when you don't want the agent inventing a fresh solution on every run.
This is covered hands-on in Agent Mode Foundations — 6 short Units, free to read.
Rather do it than read about it? Run 11 interactive Cursor walkthroughs in a simulated editor. Free, no account needed.
How do I use a skill in Cursor?
You can run a skill yourself or let the agent pick it up on its own. Either way, the agent loads the SKILL.md instructions and follows them.
Turn a repeated job into a project Skill
0:42 · narratedRead this demo as text
- Filter Rules, Skills, Subagents to this project. The changelog row is real discovery chrome — name plus trigger description, not an invented skill catalog.
- Open the file .cursor slash skills slash changelog slash SKILL dot md. Keep the trigger, ordered steps, and helper boundary together so the workflow is versioned with the repo.
- Invoke slash changelog. The Skill runs its local commit collector, groups the result, and hands back a bounded draft — no hidden procedure left in your head.
Practice next: Practice this yourself in the hands-on module.
Simulated Cursor 3.12 (macOS, light) — beta educational reconstruction, not the real product.
- 1Type
/in the agent chat and search for the skill name, for example/write-tests. - 2Select the skill to invoke it. The agent loads the SKILL.md instructions and runs the workflow.
- 3Or type
@and select a skill to attach it to your message as context.
The agent also applies skills without being asked. When a skill's description fits the task, the agent can use it on its own. To keep a skill out of that, set disable-model-invocation: true in its frontmatter, and it runs only when you invoke it by name.
How do I create a new skill?
You can write the SKILL.md file by hand, or convert a dynamic rule or a slash command with the built-in /migrate-to-skills skill. Cursor can also draft one for you, as the next section shows. The steps below are the manual path, plus the step that makes a skill shared instead of personal.
- 1Add a folder inside
.cursor/skills/(or.agents/skills/) and create aSKILL.mdinside it. - 2Already have a dynamic rule or a slash command that does the job? Convert it with the built-in
/migrate-to-skillsskill instead of starting from scratch. - 3Write YAML frontmatter at the top (a
nameand adescription), then add Markdown instructions below the---separator. - 4Commit the folder to your repo so the whole team shares the skill.
A minimal skill file looks like this:
yaml
---
name: write-tests
description: "Generate a test file for a module using the project's testing conventions."
---
When writing tests:
1. Look at existing tests in tests/ for patterns.
2. Use the same assertion library and file-naming convention.
3. Cover the happy path, one edge case and one error case.
When is the best time to create a skill?
Right after you finish a task. When the agent has just done something well, such as exploring a database, producing a report or working out a build, write it into a skill before the context is gone.
Presenters in Cursor's workshops follow a habit we call explore once, then codify. Let the agent spend tokens learning your system the slow way the first time. Then turn what it learned into a skill, so later runs start from that knowledge instead of rediscovering it.
One knowledge-work engineer gave the agent almost no schema and let it think long to learn the database through an MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition.. Then she asked it to write a skill for the lookup.
Once it actually learns the structure and figures out how to work, then I'll ask it to create a skill to do this. Now it runs a ton faster. Instead of looking through the entire database, it uses the skill and knows exactly where to look.
You don't have to write the file by hand. Run /create-skill in chat or in the CLI and describe the skill you want. Cursor's help page says this built-in skill walks you through naming, structuring and saving the new skill. In one workshop demo, it asked where to store the skill, which parts of the app it should cover and how deep to go before it generated anything. Answering "store this in my project" made it a project skill the team inherits.
Cursor knows a great deal about software engineering, but it won't decide the end goal for you. A skill is how you write that direction down once instead of explaining it again every session.
Where should I put skills, and which directories does Cursor scan?
Where you save a skill decides who else gets it and which files it applies to. A skill in the project's .cursor/skills/ ships with the repo for the whole team. One in ~/.cursor/skills/ stays personal and works across your projects on this machine. A nested folder like src/api/.cursor/skills/ scopes the skill to files under that folder.
- Location
- .cursor/skills/ (project root)
- Scope
- This project only
- Best for
- Project-specific workflows and conventions
- Location
- .agents/skills/ (project root)
- Scope
- This project only
- Best for
- The same, under a different folder name
- Location
- ~/.cursor/skills/ (home dir)
- Scope
- All your projects on this machine
- Best for
- Personal skills you use in every project, and the only folder you can sync to Cloud AgentsAgents that run in a Cursor-managed virtual machine, check out the repo, do the work and open a pull request, then shut down, with no load on your laptop. Press Enter for the full definition.
- Location
- ~/.agents/skills/ (home dir)
- Scope
- All your projects on this machine
- Best for
- Personal skills that stay on this machine
- Location
- Nested: src/api/.cursor/skills/
- Scope
- Files inside that subdirectory
- Best for
- Monorepo packages with their own conventions
| Location | Scope | Best for |
|---|---|---|
| .cursor/skills/ (project root) | This project only | Project-specific workflows and conventions |
| .agents/skills/ (project root) | This project only | The same, under a different folder name |
| ~/.cursor/skills/ (home dir) | All your projects on this machine | Personal skills you use in every project, and the only folder you can sync to Cloud AgentsAgents that run in a Cursor-managed virtual machine, check out the repo, do the work and open a pull request, then shut down, with no load on your laptop. Press Enter for the full definition. |
| ~/.agents/skills/ (home dir) | All your projects on this machine | Personal skills that stay on this machine |
| Nested: src/api/.cursor/skills/ | Files inside that subdirectory | Monorepo packages with their own conventions |
Skills in nested directories are automatically scoped to files inside that directory. Cursor picks up all locations on startup.
For compatibility, Cursor also loads skills from the Claude and Codex folders: .claude/skills/ and .codex/skills/, in the project and in your home directory.
How do teams share and standardize skills?
Check .cursor/skills/ into your repository, and everyone who clones it gets the same skill library. On Teams and Enterprise plans, you can also publish a personal skill to your team's marketplace, unless an admin has turned member publishing off. Each teammate then chooses whether to install it.
- Coding conventions
write-tests,add-migrationorformat-pr, so the agent follows team standards.- Runbook tasks
deploy-staging,rotate-secretsorcheck-sentry, which wrap multi-step ops into one command.- Domain knowledge
hipaa-revieworgdpr-checklist, which encode compliance checklists the agent runs before shipping.
Skills load reference material on demand, so it doesn't fill your context window on every prompt. Put heavy material, such as API specs or large runbooks, in a references/ subfolder and point to it from SKILL.md. The agent reads it when it needs it.
Can non-engineers use skills for domain knowledge?
Yes. A skill is a Markdown file, so any team can use one to pin down definitions, canonical sources or a design system the agent must respect.
Outside code, the gain is fewer invented answers. Without the right context, a model can go to the wrong place or make an answer up. A skill points it at the source of truth.
In a Cursor workshop on finance, Cursor's finance team described its finance assistant skill. It holds a definition for every internal term, along with the table that is the canonical source for each one.
Once the agent knows the shape of the business (self-service customers billed via Stripe, enterprise via ACH or wire), nobody re-explains it each session. The team describes the skill as heavily used and "super helpful".
A design team can fold its design system into a skill, with instructions like "every time you make changes, check the Figma design system in this skill and adhere to it", or "after any design change, use the browser and test it yourself".
Giving the agent icons, kerning and padding context this way makes it less likely to invent its own and quietly remake your design-system elements.
In Cursor's workshop for designers, a field engineer said Cursor supports a design.md file but advised referencing it from a skill, because a loose Markdown file is easy for the agent to overlook. Cursor's docs index lists no page for design.md. Skills can point to scripts or other Markdown files, so the design context gets pulled in when it is relevant.
Skill, rule or command: how do I decide which to reach for?
Reach for a rule when the agent should always follow a convention, a skill when only some tasks need a workflow, and a command when you want to start the job yourself. Cursor's docs say the agent uses each skill's description to decide when the skill is relevant, and that skills load their resources on demand. A short description costs little, and the rest arrives when the skill is used. If a skill isn't firing when you expect, rewrite its description to say exactly when it applies.
A skill is a how: an action or workflow the agent reaches for ("generate a migration", "run the security review").
A sub-agentA child agent a main agent spawns to work in parallel with its own context window, handing results back so the parent's context stays clean. Press Enter for the full definition. is a role: a separate worker you delegate to ("the reviewer", "the test-writer") that runs with its own context. Use a skill to teach one capability, and a sub-agent to hand a whole job to a specialist.
All three primitives are Markdown files. What changes is the role they play.
A rule is like "you should always wear your seat belt". A skill is "this is how you parallel park". And then a sub-agentA child agent a main agent spawns to work in parallel with its own context window, handing results back so the parent's context stays clean. Press Enter for the full definition. is your car is on autopilot and it's parking on its own.
- Mechanism
- Rule (.cursor/rules/)
- When it loads
- In every conversation, or every matching one
- Mental model
- A convention the agent must follow
- Mechanism
- Skill (.cursor/skills/)
- When it loads
- On demand, when the description matches or you invoke it
- Mental model
- A capability the agent reaches for when relevant
- Mechanism
- Command (/slash menu)
- When it loads
- When you explicitly start it
- Mental model
- A job you kick off yourself from the slash menu
| Mechanism | When it loads | Mental model |
|---|---|---|
| Rule (.cursor/rules/) | In every conversation, or every matching one | A convention the agent must follow |
| Skill (.cursor/skills/) | On demand, when the description matches or you invoke it | A capability the agent reaches for when relevant |
| Command (/slash menu) | When you explicitly start it | A job you kick off yourself from the slash menu |
A skill with disable-model-invocation set to true runs only when you invoke it, the way a command does.
A rule such as "use the development build profile" is guidance the agent may or may not follow. When you want the same steps every time, write a skill, and put the steps that must not vary in a script.
When in doubt, start with a skill. The write-tests example above shows the usual shape: a name, a description that says when it applies, and a few steps for the agent to follow. Write the SKILL.md, commit it, and switch to a rule or a sub-agentA child agent a main agent spawns to work in parallel with its own context window, handing results back so the parent's context stays clean. Press Enter for the full definition. only when a skill turns out to be the wrong fit.
Frequently asked questions
Skill or rule: which do I use?
Use a rule for a convention the agent should always follow, such as "use tabs" or "never edit generated files". Use a skill for a capability the agent should reach for only when relevant, such as generating a migration or running a release checklist. Rules are included in every matching conversation, while a skill loads when the agent or you invoke it.
Do skills cost tokens?
Some, even before one is used, because the agent is shown the available skills and judges relevance from each description. Cursor's docs say skills load their other resources on demand, which keeps context use efficient. Keep descriptions short and move heavy reference material into separate files.
Do Agent Skills work in the Cursor CLI as well as the editor?
Yes. Cursor discovers skills from the same directories in both the editor and the CLI. A skill you write for editor use is available when you run the agent command in your terminal.
Is there a built-in skills marketplace or registry?
Yes, through plugins. Plugins can carry skills, and the Cursor Marketplace lists official plugins that Cursor reviews by hand. On Teams and Enterprise plans, you can also publish a personal skill to your team's marketplace, unless an admin has turned member publishing off, and teammates choose whether to install it. To bring in skills from a GitHub repository, package them as a plugin and publish it through a marketplace.
Can I have a skill apply only to a specific file type or folder?
Yes. Add a paths field with one or more glob patterns to the skill's frontmatter, and the agent sees the skill only when it works with matching files. Skills in a nested folder, such as src/frontend/.cursor/skills/, are scoped to files inside that folder automatically.
Should I use a skill or a command for new workflows?
A skill. You invoke a command yourself, while a skill can be invoked by you or by the agent, and setting disable-model-invocation: true in a skill's frontmatter keeps it human-only. The commands page is gone from Cursor's docs, and the built-in /migrate-to-skills skill converts existing commands. Cursor's deeplinks reference still describes custom commands in .cursor/commands, but new workflows belong in .cursor/skills/.
Sources & last verified
- Cursor - Agent Skills
- Cursor - Skills (Help)
- Cursor Changelog - Subagents, Skills and Image Generation
- Cursor - Best Practices for Coding with Agents
- Cursor - Plugins
- Cursor CLI - Overview
- Cursor - Deeplinks
Cursor ships frequently. Last updated October 28, 2026.