Airsc is free for everyone. If it helps you, support it with $2–$20.

Support
Cursor ruleSafeAgent workflow & memorySome setup

rule-porter

nedcodes-ok · nedcodes-ok/rule-porter

Converts AI IDE rules between various formats like Cursor, Claude Code, GitHub Copilot, Windsurf, and AGENTS.md, allowing seamless migration of agent configurations.

Convert AI IDE rules between Cursor, Windsurf, CLAUDE.md, AGENTS.md, and Copilot. Bidirectional. Zero dependencies.

11 stars2License: MITUpdated 8 months ago0 opens

Preview

▍

What you can do with it

  • Migrate existing Cursor rules to Claude Code's `CLAUDE.md` format when switching AI coding environments.
  • Convert rules from an `AGENTS.md` file into individual `.mdc` files for Cursor.
  • Standardize AI agent instructions across multiple tools by converting a master rule set to different target formats.

Safety check

Safe

No risky patterns found in the files we scanned.

Automated scan of the repo files. Always review code you run.

From the README

rule-porter

Switch AI editors without rewriting all your rules.

Convert Cursor rules to Claude Code, GitHub Copilot, Windsurf, or AGENTS.md. And back. Bidirectional. Zero dependencies.

npx rule-porter --to agents-md

The problem

Your rules are locked into one tool's format. Cursor uses .mdc files with YAML frontmatter and glob patterns. Claude Code uses CLAUDE.md. Copilot uses .github/copilot-instructions.md. None of them understand each other.

What you get

$ npx rule-porter --to agents-md

Converting 12 Cursor rules → AGENTS.md

  ✓ 9 rules converted cleanly
  ⚠ 3 rules had glob patterns (preserved as comments)

Written: AGENTS.md

Converting back works too:

npx rule-porter --from agents-md --to cursor
# → 12 individual .mdc files with frontmatter and globs restored

Supported formats

FormatReadWriteFile
Cursor✅✅.cursor/rules/*.mdc
Cursor (legacy)✅—.cursorrules
AGENTS.md✅✅AGENTS.md
Claude Code✅✅CLAUDE.md
GitHub Copilot✅✅.github/copilot-instructions.md
Windsurf✅✅.windsurfrules

Common conversions

# Cursor → other formats
npx rule-porter --to agents-md
npx rule-porter --to claude-md
npx rule-porter --to copilot
npx rule-porter --to windsurf

# Other formats → Cursor
npx rule-porter --from agents-md --to cursor
npx rule-porter --from claude-md --to cursor

# Between any two formats
npx rule-porter --from agents-md --to claude-md

# Migrate legacy .cursorrules to .mdc
npx rule-porter --from cursorrules-legacy --to cursor

# Preview without writing
npx rule-porter --to agents-md --dry-run

What converts cleanly

  • Rule names, descriptions, and body content
  • Global vs conditional rule separation
  • alwaysApply rules become top-level sections
  • Globs are restored when converting back to Cursor

What gets flagged

  • Glob patterns become comments in flat formats (markdown doesn't support file scoping)
  • Manual-attach rules (no globs, not alwaysApply) get flagged for review
  • No silent data loss. Every non-1:1 conversion produces a warning.

Options

--to <format>       Target format (required)
--from <format>     Source format (default: auto-detect)
--out         Output file path
--dry-run           Preview without writing

Next step: check your converted rules

After converting, make sure they actually work:

npx cursor-doctor scan    # Health check with letter grade
npx cursor-doctor lint    # Detailed rule-by-rule linting

cursor-doctor catches broken frontmatter, conflicting instructions, and 100+ other issues. Also: rule-gen generates rules from your codebase using AI. npx rulegen-ai

License

MIT

View source on GitHub