How to Migrate from Cursor Rules to Agent Skills
Why migrate?
Cursor rules live only in Cursor's tree. Copilot wants .github/copilot-instructions.md. Claude Code reads CLAUDE.md. Maintaining the same conventions in four places doesn't scale. Agent Skills provide one portable package. See what are Agent Skills for the full picture.
What you're migrating from
- Legacy
.cursorrulesor.cursor/rules/*.mdc - Ad-hoc pasted instructions in chat
CONTRIBUTING.mdsections nobody reads
What you're migrating to
.codehabits/conventions.json- structured, confidence-ranked.cursor/skills/codehabits-team-intel/SKILL.md- Agent Skill auto-discovered by Cursor and compatible toolsAGENTS.md- fallback for agents that readAGENTS.md
Migration path (manual audit + auto-generate)
Audit existing rules
Export your current.cursor/rulesfiles. Mark each rule as either:- Evidence-backed - appears in PR review
- Aspirational - you wish the team did it but PRs don't enforce it
Automated extraction handles evidence-backed patterns; keep aspirational rules as short manual additions if needed.
Run Codehabits enable
npx @codehabits/cli login npx @codehabits/cli enableCompare generated conventions against your audit. You'll often find rules you forgot to document - and gaps where your written rules didn't match PR reality.
Commit intelligence to git
git add .codehabits/ .cursor/skills/ AGENTS.md git commit -m "chore: migrate team conventions to Agent Skills" git pushDeprecate duplicate rule files
Remove or slim down hand-written rules that now live in the generated skill. Keep only temporary or project-specific rules in.cursor/rules/. Document the change in your team channel so engineers know to pull latest.Keep intelligence fresh
Set up CI auto-sync so merged PRs update conventions and regenerate the skill. Manual rules drift; PR-derived intelligence compounds.
Before and after
| Hand-written Cursor rules | Codehabits Agent Skills |
|---|---|
| You write and maintain | Extracted from PR evidence |
| Cursor-only | Portable across 16+ tools |
| Static until someone edits | Syncs after each merged PR |
| No confidence scores | Ranked by review frequency |
Related guides
- Cursor rules not working? Common fixes
- Configure every major AI tool for team conventions
- Codehabits quickstart
Originally published at codehabits.dev.
Comments
No comments yet. Start the discussion.