Agent Skills guide
Migrate Cursor rules, slash commands and prompts to skills
Turn Cursor rules into skills with /migrate-to-skills, see what it converts and skips, move Claude Code commands across, and know what stays in AGENTS.md.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkOn this page
To turn Cursor rules into skills, run /migrate-to-skills in Cursor 2.4 or later. It converts dynamic rules into standard skills and slash commands into skills that only run when called, writing them to .cursor/skills/ for you to review. Rules set to always apply or scoped with globs stay as they are and need moving by hand.
Before skills, every agent had its own way to store reusable instructions: Cursor rules, Claude Code slash commands, Copilot prompt files, Gemini CLI commands. Most of that can now become skills, which load only when needed and work across agents. Not all of it should. This guide covers the migration tools that exist, what to do by hand, and what to leave where it is. If you are still deciding whether something should be a skill at all, what Agent Skills are and skills vs subagents vs slash commands vs hooks cover the trade-offs.
Sort your rules and commands before you move anything
Go through your existing instructions and put each one in one of three piles.
| Kind of instruction | Example | Where it belongs |
|---|---|---|
| Always true about the project | “We use pnpm”, “tests live next to source”, build and test commands | AGENTS.md (or CLAUDE.md), loaded every session |
| A procedure for a specific task | How to write a migration, how to cut a release, how to review a PR | A skill, loaded when the task comes up |
| Something you trigger on purpose | Deploy, publish release notes, open a ticket | A skill that only runs when called by name |
The mistake to avoid is turning everything into skills. A fact the agent needs on every request, such as the package manager, is cheaper and more reliable in the always-on file, because a skill only helps once the agent decides to load it. The opposite mistake is common too: a 600-line AGENTS.md full of procedures that matter once a month. Those cost context on every request and are better as skills. agents-md and CLAUDE.md improver both help trim the always-on file once the procedures have moved out.
Cursor rules to skills with /migrate-to-skills
Cursor 2.4 added a built-in /migrate-to-skills command. According to Cursor’s documentation, checked on 20 November 2026 and again on 25 November 2026, it converts:
- Dynamic rules: rules with
alwaysApply: false(or unset) and noglobs. These were already “load when relevant” rules, so they map directly onto standard skills. - Slash commands, both user-level and workspace-level. These become skills with
disable-model-invocation: true, so they still only run when you type them.
It does not touch:
- Rules with
alwaysApply: true. These are always-on instructions; move their content toAGENTS.mdor keep them as rules. - Rules with
globs. You can convert these by hand to skills with apathsfield, which does the same job of limiting a skill to matching files. - User rules, which are not stored as files.
Generated skills appear in .cursor/skills/ for you to review. Do review them: a rule written as a terse reminder (“prefer server components”) makes a weak skill description. Rewrite the description to say when the skill applies, as our skill description best practices explain. The Cursor skills guide covers the folders Cursor reads and how skills reach Cloud Agents. If other agents on your team should see the skills, move them to .agents/skills/ afterwards.
Claude Code slash commands are already skills
In Claude Code, custom slash commands have been merged into skills. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both give you /deploy, and existing command files keep working. There is no conversion step required.
Convert a command into a skill folder when it would benefit from supporting files, such as a script, a template or reference notes:
mkdir -p .claude/skills/deploy
git mv .claude/commands/deploy.md .claude/skills/deploy/SKILL.md
Then add frontmatter if the command had none. A command that has side effects should keep the model from running it unprompted:
---
name: deploy
description: Deploys the current branch to staging with our release script and posts the URL. Run only when the user asks to deploy.
disable-model-invocation: true
---
Run `scripts/deploy.sh staging` from the skill folder and report the URL it prints.
When names clash, a skill wins over a command with the same name.
Copilot prompt files, Gemini commands and others
- GitHub Copilot: reusable prompt files and custom instructions predate skills. Instructions that apply to the whole repository stay in
.github/copilot-instructions.mdorAGENTS.md. Task procedures can become skills in.github/skills/or.agents/skills/, which Copilot reads in the CLI, cloud agent and IDEs. - Gemini CLI extensions: if you are moving to Antigravity,
agy plugin import geminiconverts extensions to plugins and their legacy commands to skills. See Agent Skills in Antigravity. - Saved prompts in a chat app: if you keep a prompt you paste every week, it is a candidate for a skill in the Claude apps or ChatGPT. Upload it as a skill so it loads when relevant instead of when you remember it.
After the migration: test the new skills
A migrated skill can look right and still never load, because a rule’s old wording was written to be read, not matched. Test each one before you delete what it replaced.
- Write two prompts per skill that should trigger it, in the words people use, without naming the skill.
- Write one near miss: a request on a similar subject that should not load it.
- Run each in a fresh session and check which skills loaded. Claude Code shows it in the transcript; where an agent does not, ask “which skills did you use?” at the end.
- Fix the description, not the prompt. If a skill did not load, add the words from your prompt to its description. If it loaded for the near miss, say what it is not for.
- Delete the old rule or command once the skill works, so the agent does not get both.
- Shrink
AGENTS.mdto what is truly always relevant, and check it still has the build and test commands.
For example, if /migrate-to-skills turned a dynamic rule called react-server-components into a skill, and /deploy into a manual one:
| Skill | Should trigger | Should not trigger |
|---|---|---|
react-server-components |
“Add a product reviews section to the product page that loads from the API.” / “Why is this component re-rendering on the client?” | “Write a unit test for the price formatter.” |
deploy (manual) |
“/deploy” typed by you | “Is staging up to date with main?” must not deploy anything |
The second row matters most. A migrated command that does something should never run from a question about it, so check that disable-model-invocation: true survived the migration before anyone asks the agent about deployments. For agents that ignore that field, such as Codex, the same guard goes in agents/openai.yaml.
Skills for team-wide procedures can then be shared beyond one repository; see packaging and sharing Agent Skills. Testing and evaluating Agent Skills turns the checks above into a prompt set you can rerun.
Related
- Cursor skills: folders, /create-skill and Cloud Agents
Which folders Cursor reads skills from, how to attach a skill to a message or Custom Mode, the built-in /create-skill, and which skills reach Cloud Agents.
- Skills vs subagents vs slash commands vs hooks
Skills vs subagents, slash commands, hooks, MCP servers and AGENTS.md: when to reach for each in a coding agent, with a decision table and a worked example.
- Write a useful AGENTS.md: example, template and test
An AGENTS.md example and template with build and test commands, conventions and traps, plus a before-and-after task that shows whether the file actually helps.
- CLAUDE.md and AGENTS.md: instruction files for coding agents
CLAUDE.md vs AGENTS.md: what to put in each, where Claude Code, Codex, Cursor and Copilot look for them, and how to keep one source of truth without drift.