Coding & Developmentš¤claudeāØļøcursoršuniversal
C2C - Cursor to Claude Code
Convert Cursor IDE rules (.mdc files) to Claude AI markdown format with intelligent metadata parsing and categorization.
Quick Start
Install this Skill
npx skills add Vooster-AI/cursorrules-to-claudemd# C2C - Cursor to Claude Code
Convert Cursor IDE rules (`.mdc` files) to Claude AI markdown format with intelligent metadata parsing and categorization.
## Demo
> **Note**: If the video doesn't play, download `assets/demo.mp4` to view the demonstration.
https://github.com/user-attachments/assets/407cd34e-c4c0-4a1b-981d-817b85decf20
## Installation
```bash
npx @vooster/c2c
```
## Features
- š **Automatic Discovery**: Recursively finds all `.cursor` directories in your project
- š **Metadata Parsing**: Extracts YAML frontmatter (alwaysApply, description, globs) from `.mdc` files
- šļø **Smart Categorization**: Organizes rules by priority (always apply ā description ā globs)
- š **Separate Directories**: Creates `c2c-rules` directories next to each `.cursor` directory
- š **Auto-linking**: Generates `_root.md` index files with proper relative paths
- š **CLAUDE.md Integration**: Automatically updates or creates CLAUDE.md with `<c2c-rules>` sections
## Usage
Run the command in any directory containing `.cursor` folders:
```bash
npx @vooster/c2c
```
The tool will:
1. Recursively find all `.cursor` directories in your project tree
2. Locate all `*.mdc` files within them (including nested subdirectories)
3. Parse YAML metadata from each file's frontmatter
4. Create `c2c-rules` directories next to each `.cursor` directory
5. Convert files to markdown format (stripping metadata)
6. Generate `_root.md` index files with categorized references
7. Update or create `CLAUDE.md` files with proper rule references
### Result Screenshots
**Found Files:**

**Generated Content:**

## Example
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`:
```markdown
# 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.md
```
Each `CLAUDE.md` will be updated with:
```markdown
<c2c-rules>
- @c2c-rules/_root.md
</c2c-rules>
```
## Metadata Format
`.mdc` files can include YAML frontmatter:
```yaml
---
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...
```
## Development
```bash
# 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:npm
```
## Architecture
This tool uses a layered architecture:
- **Presentation Layer**: CLI interface using Commander.js
- **Application Layer**: Core business logic services
- `FileExplorerService`: Finds `.cursor` directories and `.mdc` files
- `MetadataParserService`: Extracts YAML frontmatter
- `FileConverterService`: Converts files and manages output directories
- `AdvancedRootFileGeneratorService`: Generates categorized index files
- `ClaudeMdService`: Updates CLAUDE.md files
- **Domain Layer**: Type definitions for `FileInfo` and `CursorRuleMetadata`
- **Infrastructure Layer**: File system operations
## Testing
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](./docs/TESTING.md) for detailed testing guide.
## Cross-Platform Support
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)
## License
MIT
Repository
26stars
5forks
Details
Related Skills
More coding & development skills you might like
Reticle
Coding & DevelopmentAI agents can generate code, but still struggle to understand what they build. Reticle brings Jev-style machine-native runtime perception to web & desktop applications.
š¤claudešuniversal
1.2k
190
View
agentscope-java
Coding & DevelopmentExpert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or Java agent development. Specializes in non-blocking code, tool integration, hooks, pipelines, and production-ready agent applications.
šuniversal
6.0k
1.5k
View
ospec
Coding & DevelopmentDocument-driven OSpec workflow for initialization, change/goal routing, validation, archiving, and durable project knowledge.
āØgeminiš¤claudeš¬gptšuniversal
524
34
View
misakanet-failure-memory
Coding & Developmentš A zero-dependency, git-backed micro-lesson library for AI Agents to asynchronously share and search verified debugging experience. Python stdlib only. | https://misakanet.org
š¤claudeāØļøcursoršuniversal
424
158
View