AI Tool Converter
Convert agents, skills, commands, and rules between different AI coding assistant formats while preserving functionality and adapting format-specific features.
Supported File Types
Both Claude Code and Cursor support these concepts:
| File Type |
Purpose |
Claude Code |
Cursor |
| Agents |
Specialized subagents for delegation |
Yes |
Yes |
| Skills |
Reusable capabilities with references |
Yes |
Yes |
| Commands |
Custom slash commands |
Yes |
Yes |
| Rules |
Project-wide instructions |
Yes |
Yes |
File Locations
| File Type |
Claude Code |
Cursor |
| Agents |
.claude/agents/**/*.md |
.cursor/agents/**/*.md |
| Skills |
.claude/skills/<name>/SKILL.md |
.cursor/skills/<name>/SKILL.md |
| Commands |
.claude/commands/*.md |
.cursor/commands/*.md |
| Rules |
.claude/rules/*.md, CLAUDE.md |
.cursor/rules/*.mdc, AGENTS.md |
Compatibility: Cursor reads .claude/ directories as fallback for agents and skills.
Parameters
source-format - Source format (claude-code, cursor)
target-format - Target format (claude-code, cursor)
file-path - Path to file or directory to convert
Steps
Step 1: Identify File Type
Determine the file type from its path:
.claude/agents/foo.md -> Agent
.claude/skills/foo/SKILL.md -> Skill
.claude/commands/foo.md -> Command
.claude/rules/foo.md -> Rule
CLAUDE.md -> Rule
If unclear, ask: "What type of file is this? (agent, skill, command, or rule)"
Step 2: Validate Input
- Parse arguments to extract source format, target format, and file path
- If parameters are unclear, ask user to clarify
- Validate source and target formats are supported and different
- Verify file/directory exists
Step 3: Read and Parse Source
- Read the source file(s)
- Parse YAML frontmatter (if present)
- Extract Markdown body/prompt content
- Identify format-specific fields
Step 4: Apply Conversion Rules
Agents
Claude Code -> Cursor:
- Preserve:
name, description
- Convert model:
haiku->fast, sonnet/opus->inherit
- Remove:
tools, disallowedTools, permissionMode, color, skills, hooks, disabled
- Add if applicable:
readonly: true, is_background: true
Cursor -> Claude Code:
- Preserve:
name, description
- Convert model:
fast->haiku
- Remove:
readonly, is_background
- Add if applicable:
tools, permissionMode
Skills
Claude Code -> Cursor:
- Keep:
name, description, disable-model-invocation
- Remove:
argument-hint, user-invocable, allowed-tools, model, context, agent, hooks
- Add if needed:
license, compatibility, metadata
- Warning:
$ARGUMENTS and !`cmd` syntax won't work in Cursor
Cursor -> Claude Code:
- Keep:
name, description, disable-model-invocation
- Remove:
license, compatibility, metadata
- Add if needed:
argument-hint, allowed-tools, model
Important: Copy entire skill directory (SKILL.md + references/ + scripts/), not just SKILL.md
Commands
CRITICAL DIFFERENCE: Cursor commands have NO YAML frontmatter - they are plain Markdown only!
Claude Code -> Cursor:
- Remove ALL frontmatter - Cursor doesn't support it
- Remove
$ARGUMENTS, $0 substitutions - won't work
- Remove
!`cmd` dynamic context - won't work
- Keep body as plain Markdown only
Cursor -> Claude Code:
- Add frontmatter (optional) to enhance functionality
- Consider adding:
description, argument-hint, disable-model-invocation
- Keep body unchanged
Rules
Claude Code -> Cursor:
- File:
CLAUDE.md -> .cursor/rules/main.mdc or AGENTS.md
- File:
.claude/rules/*.md -> .cursor/rules/*.mdc
- Convert:
paths -> globs
- Remove:
@import syntax (not supported)
- Add:
description, alwaysApply if needed
Cursor -> Claude Code:
- File:
.cursor/rules/*.mdc -> .claude/rules/*.md
- File:
AGENTS.md -> CLAUDE.md
- Convert:
globs -> paths
- Remove:
description, alwaysApply
Step 5: Update Internal References
CRITICAL: Scan file contents for references to agents, commands, and skills, then update them for the target format.
Common patterns to find:
| Pattern Type |
Claude Code |
Cursor |
| Agent paths |
.claude/agents/foo |
.cursor/agents/foo |
| Skill paths |
.claude/skills/bar |
.cursor/skills/bar |
| Command paths |
.claude/commands/baz |
.cursor/commands/baz |
| Rule paths |
.claude/rules/qux.md |
.cursor/rules/qux.mdc |
| Slash commands |
/foo |
/foo (no change) |
| Global rules |
CLAUDE.md |
AGENTS.md |
Update strategy:
- Replace directory prefix:
.claude/ <-> .cursor/
- Replace global rule file:
CLAUDE.md <-> AGENTS.md
- Update rule extensions:
.md <-> .mdc (for rules only)
- Preserve slash command names (they don't change)
- Convert agent invocation syntax (see below)
Agent Invocation Syntax
Claude Code -> Cursor conversion:
Before:
Use the Task tool to invoke the reviewer:
- Set `subagent_type: code-reviewer`
- Pass the file path in the prompt
After:
Invoke the reviewer agent using:
- Explicit: /code-reviewer review this code
- Natural: Use the code-reviewer subagent to review this code
Cursor -> Claude Code conversion:
Before:
Invoke the code reviewer:
- Use /code-reviewer followed by your request
- Or: Have the code-reviewer subagent check for security issues
After:
Use the Task tool to invoke the code reviewer:
- Set `subagent_type: code-reviewer`
- Include your request in the prompt parameter
- Example: Task tool with subagent_type: code-reviewer, prompt: "Check for security issues"
Step 6: Determine Output Path
Mirror the source structure in the target format:
| Source |
Target |
.claude/agents/foo.md |
.cursor/agents/foo.md |
.claude/skills/foo/SKILL.md |
.cursor/skills/foo/SKILL.md |
.claude/commands/foo.md |
.cursor/commands/foo.md |
.claude/rules/foo.md |
.cursor/rules/foo.mdc |
Ask user if they want a different output location.
Step 7: Write Converted File
- Create target directory with
mkdir -p if needed
- For skills: copy entire directory structure
- Write converted file with appropriate frontmatter (or none for Cursor commands)
- Verify file was created successfully
Step 8: Report Results
Converted: [source-file]
Type: [agent|skill|command|rule]
From: [source-format]
To: [target-format]
Output: [output-file]
Changes made:
- [Field changes]
- Removed: [list]
- Added: [list]
Limitations:
- [Features that won't work in target format]
Test the converted file:
[Instructions for target tool]
Examples
Example 1: Convert Agent
claude-code cursor .claude/agents/reviewer.md
Result:
- Input:
.claude/agents/reviewer.md (with model: sonnet, tools: [Read, Grep])
- Output:
.cursor/agents/reviewer.md (with model: inherit, readonly: true)
- Removed:
tools field
- Added:
readonly: true (since original had restricted tools)
Example 2: Convert Skill
claude-code cursor .claude/skills/code-review/
Result:
- Copies entire skill directory to
.cursor/skills/code-review/
- Converts SKILL.md frontmatter
- Preserves references/ and scripts/ subdirectories
- Warning:
$ARGUMENTS substitutions won't work
Example 3: Convert Command
claude-code cursor .claude/commands/deploy.md
Result:
- Input:
.claude/commands/deploy.md (with frontmatter and $ARGUMENTS)
- Output:
.cursor/commands/deploy.md (plain Markdown, no frontmatter)
- Removed: All frontmatter,
$ARGUMENTS references
- Warning: Lost functionality - user must manually pass arguments
Key Differences Summary
| Feature |
Claude Code |
Cursor |
| Command frontmatter |
Full YAML supported |
None (plain Markdown) |
| String substitutions |
$ARGUMENTS, $0 |
Not supported |
| Dynamic context |
!`cmd` |
Not supported |
| Model values |
haiku, sonnet, opus |
fast, inherit |
| Tool restrictions |
tools, disallowedTools |
readonly flag only |
| Skill arguments |
argument-hint |
Not supported |
| Rule scoping |
paths array |
globs field |
Validation Checklist
After conversion:
Error Handling
| Error |
Cause |
Resolution |
| Unknown file type |
Can't determine from path |
Ask user to specify |
| Invalid YAML |
Malformed frontmatter |
Fix source file first |
| Missing required fields |
Source incomplete |
Add fields before converting |
| Feature not supported |
Target lacks capability |
Warn user, remove feature |
1---2name: ai-tool-converter3description: Convert AI coding assistant configuration files (agents, skills, commands, rules) between formats (Claude Code, Cursor, and future tools). Handles frontmatter mapping, directory structure, and format-specific fields.4---56# AI Tool Converter78Convert agents, skills, commands, and rules between different AI coding assistant formats while preserving functionality and adapting format-specific features.910## Supported File Types1112**Both Claude Code and Cursor support these concepts:**1314| File Type | Purpose | Claude Code | Cursor |15|-----------|---------|-------------|--------|16| **Agents** | Specialized subagents for delegation | Yes | Yes |17| **Skills** | Reusable capabilities with references | Yes | Yes |18| **Commands** | Custom slash commands | Yes | Yes |19| **Rules** | Project-wide instructions | Yes | Yes |2021## File Locations2223| File Type | Claude Code | Cursor |24|-----------|-------------|--------|25| **Agents** | `.claude/agents/**/*.md` | `.cursor/agents/**/*.md` |26| **Skills** | `.claude/skills/<name>/SKILL.md` | `.cursor/skills/<name>/SKILL.md` |27| **Commands** | `.claude/commands/*.md` | `.cursor/commands/*.md` |28| **Rules** | `.claude/rules/*.md`, `CLAUDE.md` | `.cursor/rules/*.mdc`, `AGENTS.md` |2930**Compatibility**: Cursor reads `.claude/` directories as fallback for agents and skills.3132## Parameters3334- **`source-format`** - Source format (`claude-code`, `cursor`)35- **`target-format`** - Target format (`claude-code`, `cursor`)36- **`file-path`** - Path to file or directory to convert3738## Steps3940### Step 1: Identify File Type4142Determine the file type from its path:4344```45.claude/agents/foo.md -> Agent46.claude/skills/foo/SKILL.md -> Skill47.claude/commands/foo.md -> Command48.claude/rules/foo.md -> Rule49CLAUDE.md -> Rule50```5152If unclear, ask: "What type of file is this? (agent, skill, command, or rule)"5354### Step 2: Validate Input55561. Parse arguments to extract source format, target format, and file path572. If parameters are unclear, ask user to clarify583. Validate source and target formats are supported and different594. Verify file/directory exists6061### Step 3: Read and Parse Source62631. Read the source file(s)642. Parse YAML frontmatter (if present)653. Extract Markdown body/prompt content664. Identify format-specific fields6768### Step 4: Apply Conversion Rules6970#### Agents7172**Claude Code -> Cursor:**73- Preserve: `name`, `description`74- Convert model: `haiku`->`fast`, `sonnet`/`opus`->`inherit`75- Remove: `tools`, `disallowedTools`, `permissionMode`, `color`, `skills`, `hooks`, `disabled`76- Add if applicable: `readonly: true`, `is_background: true`7778**Cursor -> Claude Code:**79- Preserve: `name`, `description`80- Convert model: `fast`->`haiku`81- Remove: `readonly`, `is_background`82- Add if applicable: `tools`, `permissionMode`8384#### Skills8586**Claude Code -> Cursor:**87- Keep: `name`, `description`, `disable-model-invocation`88- Remove: `argument-hint`, `user-invocable`, `allowed-tools`, `model`, `context`, `agent`, `hooks`89- Add if needed: `license`, `compatibility`, `metadata`90- **Warning**: `$ARGUMENTS` and `` !`cmd` `` syntax won't work in Cursor9192**Cursor -> Claude Code:**93- Keep: `name`, `description`, `disable-model-invocation`94- Remove: `license`, `compatibility`, `metadata`95- Add if needed: `argument-hint`, `allowed-tools`, `model`9697**Important**: Copy entire skill directory (SKILL.md + references/ + scripts/), not just SKILL.md9899#### Commands100101**CRITICAL DIFFERENCE**: Cursor commands have **NO YAML frontmatter** - they are plain Markdown only!102103**Claude Code -> Cursor:**104- **Remove ALL frontmatter** - Cursor doesn't support it105- **Remove** `$ARGUMENTS`, `$0` substitutions - won't work106- **Remove** `` !`cmd` `` dynamic context - won't work107- Keep body as plain Markdown only108109**Cursor -> Claude Code:**110- Add frontmatter (optional) to enhance functionality111- Consider adding: `description`, `argument-hint`, `disable-model-invocation`112- Keep body unchanged113114#### Rules115116**Claude Code -> Cursor:**117- File: `CLAUDE.md` -> `.cursor/rules/main.mdc` or `AGENTS.md`118- File: `.claude/rules/*.md` -> `.cursor/rules/*.mdc`119- Convert: `paths` -> `globs`120- Remove: `@import` syntax (not supported)121- Add: `description`, `alwaysApply` if needed122123**Cursor -> Claude Code:**124- File: `.cursor/rules/*.mdc` -> `.claude/rules/*.md`125- File: `AGENTS.md` -> `CLAUDE.md`126- Convert: `globs` -> `paths`127- Remove: `description`, `alwaysApply`128129### Step 5: Update Internal References130131**CRITICAL**: Scan file contents for references to agents, commands, and skills, then update them for the target format.132133**Common patterns to find:**134135| Pattern Type | Claude Code | Cursor |136|--------------|-------------|--------|137| Agent paths | `.claude/agents/foo` | `.cursor/agents/foo` |138| Skill paths | `.claude/skills/bar` | `.cursor/skills/bar` |139| Command paths | `.claude/commands/baz` | `.cursor/commands/baz` |140| Rule paths | `.claude/rules/qux.md` | `.cursor/rules/qux.mdc` |141| Slash commands | `/foo` | `/foo` (no change) |142| Global rules | `CLAUDE.md` | `AGENTS.md` |143144**Update strategy:**1451. Replace directory prefix: `.claude/` <-> `.cursor/`1462. Replace global rule file: `CLAUDE.md` <-> `AGENTS.md`1473. Update rule extensions: `.md` <-> `.mdc` (for rules only)1484. Preserve slash command names (they don't change)1495. Convert agent invocation syntax (see below)150151#### Agent Invocation Syntax152153**Claude Code -> Cursor conversion:**154155Before:156```markdown157Use the Task tool to invoke the reviewer:158- Set `subagent_type: code-reviewer`159- Pass the file path in the prompt160```161162After:163```markdown164Invoke the reviewer agent using:165- Explicit: /code-reviewer review this code166- Natural: Use the code-reviewer subagent to review this code167```168169**Cursor -> Claude Code conversion:**170171Before:172```markdown173Invoke the code reviewer:174- Use /code-reviewer followed by your request175- Or: Have the code-reviewer subagent check for security issues176```177178After:179```markdown180Use the Task tool to invoke the code reviewer:181- Set `subagent_type: code-reviewer`182- Include your request in the prompt parameter183- Example: Task tool with subagent_type: code-reviewer, prompt: "Check for security issues"184```185186### Step 6: Determine Output Path187188Mirror the source structure in the target format:189190| Source | Target |191|--------|--------|192| `.claude/agents/foo.md` | `.cursor/agents/foo.md` |193| `.claude/skills/foo/SKILL.md` | `.cursor/skills/foo/SKILL.md` |194| `.claude/commands/foo.md` | `.cursor/commands/foo.md` |195| `.claude/rules/foo.md` | `.cursor/rules/foo.mdc` |196197Ask user if they want a different output location.198199### Step 7: Write Converted File2002011. Create target directory with `mkdir -p` if needed2022. For skills: copy entire directory structure2033. Write converted file with appropriate frontmatter (or none for Cursor commands)2044. Verify file was created successfully205206### Step 8: Report Results207208```209Converted: [source-file]210Type: [agent|skill|command|rule]211From: [source-format]212To: [target-format]213Output: [output-file]214215Changes made:216- [Field changes]217- Removed: [list]218- Added: [list]219220Limitations:221- [Features that won't work in target format]222223Test the converted file:224[Instructions for target tool]225```226227## Examples228229### Example 1: Convert Agent230231```232claude-code cursor .claude/agents/reviewer.md233```234235**Result:**236- Input: `.claude/agents/reviewer.md` (with `model: sonnet`, `tools: [Read, Grep]`)237- Output: `.cursor/agents/reviewer.md` (with `model: inherit`, `readonly: true`)238- Removed: `tools` field239- Added: `readonly: true` (since original had restricted tools)240241### Example 2: Convert Skill242243```244claude-code cursor .claude/skills/code-review/245```246247**Result:**248- Copies entire skill directory to `.cursor/skills/code-review/`249- Converts SKILL.md frontmatter250- Preserves references/ and scripts/ subdirectories251- Warning: `$ARGUMENTS` substitutions won't work252253### Example 3: Convert Command254255```256claude-code cursor .claude/commands/deploy.md257```258259**Result:**260- Input: `.claude/commands/deploy.md` (with frontmatter and `$ARGUMENTS`)261- Output: `.cursor/commands/deploy.md` (plain Markdown, no frontmatter)262- **Removed**: All frontmatter, `$ARGUMENTS` references263- **Warning**: Lost functionality - user must manually pass arguments264265## Key Differences Summary266267| Feature | Claude Code | Cursor |268|---------|-------------|--------|269| **Command frontmatter** | Full YAML supported | **None** (plain Markdown) |270| **String substitutions** | `$ARGUMENTS`, `$0` | Not supported |271| **Dynamic context** | `` !`cmd` `` | Not supported |272| **Model values** | `haiku`, `sonnet`, `opus` | `fast`, `inherit` |273| **Tool restrictions** | `tools`, `disallowedTools` | `readonly` flag only |274| **Skill arguments** | `argument-hint` | Not supported |275| **Rule scoping** | `paths` array | `globs` field |276277## Validation Checklist278279After conversion:280- [ ] Correct file type identified281- [ ] YAML frontmatter valid (or correctly removed for Cursor commands)282- [ ] Required fields present for target format283- [ ] No source-format-specific fields remain284- [ ] Internal references updated (`.claude/` <-> `.cursor/`, `CLAUDE.md` <-> `AGENTS.md`)285- [ ] Agent invocation syntax converted286- [ ] Markdown links point to correct target paths287- [ ] Markdown body preserved (except for reference updates)288- [ ] File in correct target directory289- [ ] User warned about lost functionality290291## Error Handling292293| Error | Cause | Resolution |294|-------|-------|------------|295| Unknown file type | Can't determine from path | Ask user to specify |296| Invalid YAML | Malformed frontmatter | Fix source file first |297| Missing required fields | Source incomplete | Add fields before converting |298| Feature not supported | Target lacks capability | Warn user, remove feature |