A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Convert editor rules between different AI coding assistants (Cursor, Windsurf, Claude Code, etc.)
A command-line tool for converting AI code editor rules between different formats. Work seamlessly across Cursor, Windsurf, Cline, VSCode, and other AI-powered development environments without losing your carefully crafted coding guidelines.
You've spent time crafting the perfect coding rules for Cursor, but now you want to try Windsurf. Or maybe your team uses different AI editors, and you need to share consistent guidelines across tools. Manually converting and maintaining rules across multiple editors is tedious and error-prone.
CrossRule automatically detects existing AI editor rules in your project and converts them to any other supported format. Your TypeScript conventions, React patterns, and testing requirements can follow you wherever you code.
CrossRule works with 9 major AI code editors:
.mdc files in .cursor/rules/.windsurf/rules/.clinerules/AGENTS.md project rulesCLAUDE.md guidance filesQWEN.md context filesInstall CrossRule globally to use it in any project:
npm install -g crossrule
Or run it directly without installing using npx:
npx crossrule init
Verify the installation:
crossrule --version
# Should output: 1.0.3
Navigate to your project directory and run:
crossrule init
CrossRule will:
Create and deploy rules across all your AI editors with a single command:
# Simple always-apply rule
crossrule add "Use strict TypeScript configuration" --type always --to all
# Pattern-based rule for specific file types
crossrule add "React components must use functional syntax" \
--type pattern --patterns "*.tsx,*.jsx" --to cursor,windsurf
# Complex multi-line rule from file
crossrule add --from-file team-standards.md \
--type pattern --patterns "*.ts,*.tsx" --to all
# AI-decision rule with context
crossrule add "Suggest performance optimizations" \
--type ai-decision --context "performance-critical" --to cursor,qoder
CrossRule supports four intelligent rule types:
--type always) - Applied to all conversations and code--type pattern) - Triggered when working with specific file types--type manual) - Invoked explicitly by name or command--type ai-decision) - Applied when AI determines relevanceHandle complex coding standards with full markdown support:
# Using heredoc for complex rules
crossrule add --type always --to all << 'EOF'
# TypeScript Best Practices
## Type Safety
- Enable all strict mode flags
- Use 'unknown' instead of 'any'
- Implement proper error boundaries
## Code Organization
- One component per file
- Index files for clean imports
- Separate types into .types.ts files
EOF
--type <type> - Rule type: always, pattern, manual, ai-decision--patterns <patterns> - File patterns (comma-separated) for pattern rules--to <editors> - Target editors: all, or comma-separated list--from-file <file> - Read rule content from markdown file--name <name> - Custom rule name (auto-generated if not provided)--description <desc> - Rule description for documentation--context <context> - Context hint for AI-decision rulesCrossRule understands the unique file structures and formats of each AI editor. It correctly parses YAML frontmatter, section delimiters, and trigger conditions to extract the semantic meaning of your rules.
When converting between formats, CrossRule maintains the intent of your rules:
Each editor has its own conventions:
alwaysApply and globs fieldsalways_on, glob, manual, model_decision)---- section-name ----CrossRule recognizes and converts between different rule activation patterns:
If you know exactly what you want to convert:
crossrule convert --from cursor --to windsurf
crossrule convert --from qoder --to "claude-code"
Convert to multiple formats at once:
crossrule convert --from cursor --to windsurf,cline,qoder
Specify where converted files should be saved:
crossrule convert --from cursor --to windsurf --output ./my-rules/
CrossRule looks for rules in these locations:
# Single-file formats
AGENTS.md # Codex CLI / OpenCode / VSCode Agents
CLAUDE.md # Claude Code
QWEN.md # QwenCoder
# Directory-based formats
.cursor/rules/ # Cursor .mdc files
.windsurf/rules/ # Windsurf markdown
.clinerules/ # Cline markdown
.qoder/rules/ # Qoder trigger-based rules
.trae/rules/ # Trae multilingual rules
Learn more about the shared AGENTS.md standard for Codex CLI, OpenCode, VSCode Agents, and other tools at https://agents.md.
Add CrossRule to your development workflow:
{
"scripts": {
"rules:sync": "crossrule init",
"rules:cursor": "crossrule convert --from claude-code --to cursor",
"rules:windsurf": "crossrule convert --from claude-code --to windsurf"
}
}
New team members can quickly set up their preferred AI editor:
git clone your-project
cd your-project
crossrule init # Convert existing rules to their preferred editor
---
description: TypeScript coding standards
alwaysApply: true
---
# TypeScript Rules
- Use strict mode configuration
- Prefer interfaces over type aliases
---
trigger: always_on
alwaysApply: true
description: Global coding standards
---
# Always Active Rules
- Write self-documenting code
- Use meaningful variable names
# Project Agent Rules
---- typescript ----
- Use strict TypeScript configuration
- Always provide return types
---- testing ----
- Write comprehensive unit tests
- Use Jest framework
CrossRule is open source and welcomes contributions:
Bug Reports: Found an issue with rule conversion? Please report it with sample files.
New Editor Support: Want to add support for another AI editor? Check out the parser and converter architecture in the source code.
Rule Format Improvements: Each AI editor evolves their rule formats. Help us keep up with the latest specifications.
Documentation: Improve examples, add use cases, or clarify installation instructions.
git clone https://github.com/your-username/crossrule
cd crossrule
npm install
npm run build
npm run dev # Test the CLI locally
npm test # All tests
npm run test:unit # Unit tests only
npm run test:integration # Integration tests only
npm run test:coverage # Coverage report
MIT License. See LICENSE file for details.
CrossRule was built to solve a real workflow problem in the AI-assisted coding era. Thanks to the teams behind all the supported AI editors for creating tools that enhance developer productivity.
The project maintains compatibility with the latest rule format specifications from each editor. As these tools evolve, CrossRule evolves with them.
Made for developers who love consistency across their AI coding tools.
Mission control for AI coding-agent skills on macOS. Search, edit, group, and sync rules and prompts for Claude Code, Cu
Advanced agent rules and prompt templates for AI coding assistants, focused on planning, security, memory-bank documenta
AI agent skill for Jest 29/30 — 28 rules: mocks, async, timers, snapshots, CI. Works with Claude Code, Cursor, Codex, Wi
Rules/instructions, prompts/commands/workflows, and skills for Copilot, Cursor, Windsurf, and Antigravity AI Dev Tools.