Loading...
Loading...
Complete Guide for Migrating from Cursor Development Mode to Claude Code Development Mode. Use this skill when projects need to switch from Cursor AI IDE to Claude Code CLI, including configuration migration, document structure conversion, workflow adaptation, etc.
npx skill4agent add plolink/cursor-to-claude-code migration-skill| Cursor Mode | Claude Code Mode | Description |
|---|---|---|
| | Agent configuration file |
| | Configuration directory |
| Inline Rules | Progressive Disclosure | Configuration files point to detailed documents |
| Single Rule File | Hierarchical Document System | Configuration + Rules + Documentation |
| Implicit Knowledge | Explicit Knowledge Base | Experience accumulation in AGENTS.md |
Task: Explore subagent_type=Explore
Explore the current project:
- Tech stack and framework types
- Directory structure and module division
- Existing configuration files (.cursorrules, .cursor/, etc.)
- Completeness of documentation system
Return: Project structure report and existing configuration listTask: Explore subagent_type=Explore
Analyze existing development specifications:
- Code style rules
- Architecture patterns and conventions
- Testing strategies
- Git workflows
Return: Summary of existing specifications and improvement suggestionsTask: Grep pattern="TODO|FIXME|HACK|NOTE"
Extract implicit knowledge from code:
- Temporary solutions in comments
- Pitfalls requiring documentation
- Team conventions (naming, patterns, etc.)
Return: Implicit knowledge list and classificationTask: Write file CLAUDE.md
Content structure:
## Project Overview (WHAT)
- Tech stack: [Framework] + [Language] + [Database] + [Other key dependencies]
- Key directories: Responsibilities of src/, tests/, docs/, etc.
## Core Architecture Decisions (WHY)
- Why was this architecture chosen?
- What are the technical debts?
- Which design decisions must Agents follow?
## Development Workflow (HOW)
- How to run the project?
- How to test?
- How to verify changes?
## Core Constraints (5-10 items)
- Most critical rules (marked with CRITICAL)
- Each rule links to detailed documentation
## Detailed Document Index
- Themed document linksTask: Edit/Migrate
Migrate .cursorrules content to:
- CLAUDE.md (brief description)
- rules/ (detailed documentation)
- agent_docs/ (technical documentation)
Follow the principle of progressive disclosureTask: Write files in rules/
Create independent documents for each core rule:
- rule-name.md
- Problem description and importance
- Comparison of correct and incorrect examples
- Common mistakes
- Reference code (using file:line references)Task: General-purpose
Verify configuration migration quality:
- CLAUDE.md has < 500 lines
- All rules have detailed documentation
- Cross-document references are correct
- No configuration errors during runtimeTask: Write file AGENTS.md
Content structure:
## Code Style
- Naming conventions
- Import order
- Language feature preferences
## Known Pitfalls
- Common error patterns
- Practices to avoid
- Framework-specific pitfalls
## Success Patterns
- Standard workflows
- Reusable templates
- Best practice examples
## Compounding Engineering Practices
- Improvement checklist after bug fixes
- Specification updates after code reviewsTask: Grep + Read
Extract from code history and comments:
- Fix records in Git commit history
- Common issues in code reviews
- "Why" explanations in comments
- Team conventions and patterns
Classify and organize into AGENTS.mdTask: General-purpose
Verify experience accumulation quality:
- AGENTS.md covers major pitfalls
- Each pitfall has specific code examples
- Success patterns are actionable
- Compounding engineering checklist is completeagent_docs/
├── architecture/ # Architecture documentation
│ ├── overview.md # System architecture overview
│ ├── modules.md # Module division and responsibilities
│ └── decisions.md # Architecture decision records (ADR)
├── workflows/ # Workflows
│ ├── development.md # Development process
│ ├── testing.md # Testing process
│ └── deployment.md # Deployment process
├── troubleshooting.md # Troubleshooting guide
└── api/ # API documentation (if needed)
└── README.md
rules/
├── rule-1.md # Detailed explanation of core rules
├── rule-2.md
└── ...Task: Write + Explore
Generate architecture documentation:
- System hierarchy
- Module dependencies
- Data flow diagrams
- Reasons for technology selectionTask: Write
Standardize workflows:
- New feature addition process
- Bug fix process
- Code review process
- Release processTask: Write
Resolve common issues:
- Environment configuration problems
- Dependency issues
- Performance issues
- Debugging techniquesTask: Edit CLAUDE.md
Ensure configuration files:
- Have < 500 lines (the shorter the better)
- Only contain universally applicable content
- Detailed content links to independent documents
- Avoid code style guidelines (leave to linters)Task: Reorganize docs/
Implement three-level loading:
1. CLAUDE.md (metadata, automatically loaded)
2. rules/ (detailed rule explanations, loaded on demand)
3. agent_docs/ (technical documentation, for in-depth reference)Task: Edit all .md files
Uniformly use file:line references:
- Do not copy code snippets
- Use "See src/module/file.ts:123"
- Keep documentation synchronized with codeMain Agent Strategy:
- Continue when single conversation < 100K tokens
- Start new conversations after completing subtasks
- Reset when Agent shows "drunk" symptoms
- Treat "starting new conversations" as normal workflowTask: Write scripts/
Create automation scripts:
- pre-commit: Check document updates
- commit-msg: Verify commit message format
- post-merge: Remind to update documentsTask: Write templates/
Standardize improvement processes:
- Bug fix report template
- Code review feedback template
- New specification proposal templateTask: Write CHECKLIST.md
Check after each change:
- [ ] Have new pitfalls been discovered?
- [ ] Have new patterns been summarized?
- [ ] Do specifications need to be updated?
- [ ] Have tests been added to prevent regression?## Rule N: [Rule Name] [Priority]
**Problem Description**:
Why is this rule needed?
**Correct Practice** (✅):
[Code Example]
**Incorrect Practice** (❌):
[Code Example]
**Common Mistakes**:
- [Mistake 1]
- [Mistake 2]
**Reference Documentation**:
- Detailed explanation: rules/rule-name.md
- Example code: src/module/file.ts:123## Code Style
- Language feature preferences
- Naming and formatting conventions
## Known Pitfalls
- Framework-specific pitfalls
- Common error patterns
- Practices to avoid
## Success Patterns
- Standard workflows
- Reusable templates
- Best practice examples
## Compounding Engineering
- Bug fixes → Specification updates
- Code reviews → Pattern extraction
- Experience → Permanent knowledge1. Main Agent analyzes requirements
↓
2. Split into SubAgent tasks
↓
3. Execute multiple Tasks in parallel
↓
4. Summarize and analyze results
↓
5. Initiate Verification Task for inspection
↓
6. Adjust based on feedback
↓
7. Proceed to the next phaseTask: General-purpose
Final Verification:
1. Documentation structure completeness
- CLAUDE.md and AGENTS.md exist
- rules/ and agent_docs/ are well-organized
- All references are accessible
2. Content quality check
- Rules have correct and incorrect examples
- Pitfalls have specific code examples
- Workflows are actionable
3. Practicality verification
- New developers can get started quickly
- Agents can understand specifications
- Knowledge is reusable
4. Compounding engineering verification
- Bug fix process includes document updates
- Code reviews include specification extraction
- Experience accumulation mechanism existsCLAUDE.md.templateAGENTS.md.templaterules/agent_docs/context-engineering-best-practices.mdcompounding-engineering.mddocumentation-structure.mdanalyze_project.pyvalidate_migration.pycheck_docs_consistency.py