npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@hostingglobal/c2c

v1.0.6

Published

Convert Cursor IDE rules to Claude AI markdown format

Downloads

19

Readme

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

npx @hostingglobal/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:

npx @hostingglobal/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: Found Files

Generated Content: 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 @hostingglobal/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.md

Each CLAUDE.md will be updated with:

<c2c-rules>
- @c2c-rules/_root.md
</c2c-rules>

Metadata Format

.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...

Development

# 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

# 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

License

MIT