Transfer your Cursor Composer prompts to Claude Code by converting reusable prompts into skill files in ~/.claude/skills/, migrating .cursorrules into a .claude.md project file, and using the -p flag for one-off prompts. The key adaptation is shifting from Cursor’s conversational prompt style to Claude Code’s imperative, declarative instruction format stored as Markdown skill definitions.
Understanding the Fundamental Differences
Cursor uses a chat-based interface with Composer where you compose prompts in conversation threads. Claude Code operates through a terminal using commands and a skill system. The key distinction is that Cursor prompts are conversational while Claude Code prompts become declarative instructions stored as skills or passed directly through command-line arguments.
Spend time reviewing your existing prompts in Cursor before migrating. Identify which ones define coding standards, which automate repetitive tasks, and which handle specific framework workflows. Categorizing your prompts helps you map them to the appropriate Claude Code mechanism.
Mapping Cursor Prompts to Claude Code Skills
Claude Code skills live in a ~/.claude/skills/ directory or within your project’s .claude/ folder. Each skill contains an skill.md file that defines what the skill does and how Claude Code should behave when activated.
Here is how to structure a migrated prompt as a Claude Code skill:
# Skill: react-component-generator
## Description
Generates React functional components with TypeScript, following our team's component patterns.
## Instructions
- Always use TypeScript for React components
- Include JSDoc comments for all props
- Use our internal UI component library
- Add basic prop validation with TypeScript types
- Include CSS Modules for styling
## Examples
User: Create a Button component
Claude: Generates a TypeScript React component with props, CSS Module, and JSDoc
This structure replaces the conversational prompt you might have used in Cursor’s Composer.
Converting Multi-Step Prompts to Skills
Cursor prompts often span multiple exchanges as you refine requirements. Claude Code skills work best when they capture the complete workflow in a single definition. Review your multi-turn conversations and consolidate them into a single skill instruction block.
For prompts that depend on context like file structure or project state, use Claude Code’s session context mechanism. Start a session with relevant context, then invoke the skill:
claude -p "Here is my project structure: $(find . -type f -name '*.ts' | head -20)"
Then inside your skill, reference that context with appropriate instructions.
Migrating Cursor Rules to Claude-md Files
Cursor rules live in .cursorrules files. Claude Code uses .claude.md for project-level instructions. The conversion is straightforward since both serve similar purposes—defining how the AI should behave within a project.
Transform your Cursor rules like this:
// .cursorrules
typescript: strict
tailwind: use @apply for complex classes
testing: vitest with react-testing-library
Into a Claude Code project file:
<!-- .claude.md -->
# Project Context
- TypeScript strict mode enabled
- Use Tailwind CSS with @apply for complex utility combinations
- Write tests with Vitest and react-testing-library
- Follow our component folder structure
Place this file in your project root, and Claude Code reads it automatically for every session.
Using Command-Line Arguments for One-Off Prompts
Some Cursor prompts are quick one-time requests rather than reusable patterns. For these, Claude Code’s command-line interface handles the task directly without creating a skill.
Pass prompts directly through the -p flag:
claude -p "Write a Python function that calculates Fibonacci numbers recursively with memoization"
For longer prompts, create a file and reference it:
claude -p @prompts/refactor-backend.txt
This approach works well for prompts you use infrequently and do not need to formalize as skills.
Building a Prompt Library Structure
Organizing your migrated prompts prevents chaos as your collection grows. A practical directory structure for Claude Code skills looks like this:
~/.claude/skills/
├── coding-standards/
│ ├── skill.md
│ └── README.md
├── frameworks/
│ ├── react/
│ ├── nextjs/
│ └── vue/
├── automation/
│ ├── testing/
│ └── documentation/
└── utilities/
├── code-review/
└── refactoring/
Each skill folder can contain the main skill.md plus supporting files like examples or configuration templates.
Adapting Prompt Language for Command Execution
Cursor prompts often start with “Can you” or “Please create” because they simulate a conversation. Claude Code commands work better with direct, imperative language. Convert your prompts:
| Cursor Prompt | Claude Code Skill Instruction |
|---|---|
| “Can you create a component that handles…” | “Create a React component that handles…” |
| “Could you refactor this to use…” | “Refactor this code to use…” |
| “Can you explain how…” | “Explain how…” |
The shift from conversational to imperative improves Claude Code’s response accuracy.
Testing Your Migrated Prompts
After converting prompts to skills, test each one thoroughly. Run the skill and verify the output matches your expectations from Cursor. Pay attention to:
- Whether Claude Code follows your formatting rules
- If the skill activates in the right contexts
- How well the skill handles edge cases
Iterate on your skill definitions based on test results. Claude Code’s skill system allows you to refine instructions incrementally.
Skills provide reusability, the command-line interface offers flexibility, and the .claude.md file handles project-specific rules. Start with your most-used prompts, convert them to skills, and expand your library as you discover new patterns.
Related Reading
Built by theluckystrike — More at zovo.one