The goal is to consolidate rule and skill configurations into the .claude/ directory. This allows Claude Code and Cursor to share the same configuration files, eliminating the need to maintain separate copies in .cursor/rules/ and .cursor/skills/.
How Cursor Recognizes .claude/ Files
Skills: Native Support
Cursor can natively scan the .claude/skills/ directory. By enabling the "Include third-party Plugins, Skills, and other configs" option in Cursor's settings, the IDE automatically detects these files without any additional setup.
Rules: Sharing via Symbolic Links
Cursor is hard-coded to scan .cursor/rules/ and does not inherently recognize .claude/rules/. To bridge this gap, we use a symbolic link. By making .cursor/rules/ a symlink pointing to .claude/rules/, Cursor reads the files from the linked location while perceiving them as being in their expected directory.
Migarting Rules (Symlink Required)
Step 1: Transfer Content to .claude/rules/
First, copy the existing rule files to the new target directory.
# Ensure target directory exists
mkdir -p .claude/rules
# Copy existing rules
cp -r .cursor/rules/* .claude/rules/
Step 2: Replace Directory with Symlink
Remove the original directory and create a symbolic link in its place.
# Remove the physical directory
rm -rf .cursor/rules
# Create symbolic link pointing to .claude/rules
ln -s ../.claude/rules .cursor/rules
# Verify the link (should show the target path)
ls -la .cursor/rules
Step 3: Configure Git Ignore
Git should track the actual files, not the symlink itself. Add the symlink path to your .gitignore file.
# Add to .gitignore
echo ".cursor/rules" >> .gitignore
# Commit the changes
git add .claude/rules/ .gitignore
git commit -m "refactor: unify rules into .claude directory via symlink"
Migrating Skills (No Symlink Needed)
Step 1: Move Files to .claude/skills/
Create the destination folder and move the skill definitions.
mkdir -p .claude/skills
cp -r .cursor/skills/* .claude/skills/
Step 2: Clean Up Old Directory
Since Cursor will read directly from .claude/skills/, the old directory is no longer necessary.
rm -rf .cursor/skills
Step 3: Enable Native Detection in Cursor
Navigate to Cursor Settings, search for "Include third-party Plugins, Skills, and other configs", and enable the toggle. Cursor will now detect the skills in the .claude/ folder automatically.
Step 4: Commit Changes
git add .claude/skills/
git commit -m "refactor: unify skills into .claude directory"
Final Directory Structure
After migration, the project structure should resemble the following:
project-root/
├── .claude/
│ ├── rules/ # Real files, tracked by Git
│ │ ├── ts-rule.md
│ │ └── react-rule.md
│ └── skills/ # Real files, tracked by Git
│ ├── api-layer/
│ │ └── SKILL.md
│ └── ...
└── .cursor/
└── rules -> ../.claude/rules # Symlink (ignored by Git)
Going forward, maintain your definitions exclusively within the .claude/ directories.