Convert Cursor IDE rules (.mdc files) to Claude AI markdown format with intelligent metadata parsing and categorization.
Note: If the video doesn't play, download
assets/demo.mp4to view the demonstration.
c2c-demo.mp4
npx @vooster/c2c- 🔍 Automatic Discovery: Recursively finds all
.cursordirectories in your project - 📝 Metadata Parsing: Extracts YAML frontmatter (alwaysApply, description, globs) from
.mdcfiles - 🗂️ Smart Categorization: Organizes rules by priority (always apply → description → globs)
- 📁 Separate Directories: Creates
c2c-rulesdirectories next to each.cursordirectory - 🔗 Auto-linking: Generates
_root.mdindex files with proper relative paths - 📄 CLAUDE.md Integration: Automatically updates or creates CLAUDE.md with
<c2c-rules>sections
Run the command in any directory containing .cursor folders:
npx @vooster/c2cThe tool will:
- Recursively find all
.cursordirectories in your project tree - Locate all
*.mdcfiles within them (including nested subdirectories) - Parse YAML metadata from each file's frontmatter
- Create
c2c-rulesdirectories next to each.cursordirectory - Convert files to markdown format (stripping metadata)
- Generate
_root.mdindex files with categorized references - Update or create
CLAUDE.mdfiles with proper rule references
Given this structure with metadata:
project/
├── .cursor/
│ └── global.mdc (with alwaysApply: true)
├── frontend/
│ └── .cursor/
│ ├── rules.mdc (with description: "React component guidelines")
│ └── components/
│ └── ui-rules.mdc (with globs: "**/*.tsx")
└── backend/
└── .cursor/
└── api/
└── guidelines.mdc (with globs: "**/api/**")
Running npx @vooster/c2c will create:
project/
├── CLAUDE.md (updated with <c2c-rules> section)
├── c2c-rules/
│ ├── _root.md
│ └── global.md
├── frontend/
│ ├── CLAUDE.md (updated with <c2c-rules> section)
│ └── c2c-rules/
│ ├── _root.md
│ ├── rules.md
│ └── components/
│ └── ui-rules.md
└── backend/
├── CLAUDE.md (updated with <c2c-rules> section)
└── c2c-rules/
├── _root.md
└── api/
└── guidelines.md
Each _root.md will contain categorized rules, for example in frontend/c2c-rules/_root.md:
# Rules Collection
read below rules if description matches with your requirement:
- rules
- description: React component guidelines
- path: rules.md
read below rules if glob pattern matches with requirement related files:
- ui-rules
- glob: \*_/_.tsx
- path: components/ui-rules.mdEach CLAUDE.md will be updated with:
<c2c-rules>
- @c2c-rules/_root.md
</c2c-rules>.mdc files can include YAML frontmatter:
---
alwaysApply: true # Rule always applies (highest priority)
description: string # Rule description for matching (medium priority)
globs: string # Glob pattern for file matching (lowest priority)
---
Your actual rule content goes here...# Install dependencies
pnpm install
# Build the project
pnpm build
# Run in development mode
pnpm dev
# Run tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with coverage
pnpm test:coverage
# Run end-to-end tests
pnpm test:e2e
# Run all tests (unit + e2e)
pnpm test:all
# Publish to npm
pnpm publish:npmThis tool uses a layered architecture:
- Presentation Layer: CLI interface using Commander.js
- Application Layer: Core business logic services
FileExplorerService: Finds.cursordirectories and.mdcfilesMetadataParserService: Extracts YAML frontmatterFileConverterService: Converts files and manages output directoriesAdvancedRootFileGeneratorService: Generates categorized index filesClaudeMdService: Updates CLAUDE.md files
- Domain Layer: Type definitions for
FileInfoandCursorRuleMetadata - Infrastructure Layer: File system operations
The project includes comprehensive testing:
- Unit Tests: 58 tests covering all services and utilities
- E2E Tests: 21 tests covering complete workflows and cross-platform compatibility
- Total: 79 tests with full coverage
See docs/TESTING.md for detailed testing guide.
The tool is designed to work on all major operating systems:
- ✅ Windows (handles backslashes and CRLF line endings)
- ✅ macOS (tested on Darwin)
- ✅ Linux (standard Unix compatibility)
MIT

