Skip to content
migrate-to-skills logo

Convert to Skills

migrate-to-skills

Convert legacy subagents, slash commands, and rules to the unified Agent Skills format. Use when migrating agent resources, consolidating legacy directories, or standardizing across Claude Code, Cursor, Copilot, Codex, and Open Code.

SKILL.md

Full skill instructions

Convert to Skills

Convert legacy agent resources to the unified Agent Skills format.

Workflow

Execute these phases in order. Always get user approval before making changes.

Phase 1: Discovery

Search for legacy resources. Run these searches immediately:

# Subagents
find . -path "*/​.claude/​agents/​*.md" -o -path "*/​.cursor/​agents/​*.md" -o -path "*/​.codex/​agents/​*.md" 2>/​dev/​null

# Commands  
find . -path "*/​.claude/​commands/​*.md" -o -path "*/​.cursor/​commands/​*.md" -o -path "*/​.codex/​commands/​*.md" 2>/​dev/​null

# Rules
find . -path "*/​.claude/​rules/​*.md" -o -path "*/​.cursor/​rules/​*.mdc" -o -path "*/​.cursor/​rules/​*.md" 2>/​dev/​null

# Custom Prompts (Codex)
find . -path "*/​.codex/​prompts/​*.md" 2>/​dev/​null

# AGENTS.md files
find . -name "AGENTS.md" 2>/​dev/​null

If $1 specifies a path, only scan that location.

Phase 2: Classification

Read each discovered file and classify it. Present findings as:

## Discovery Results

### Subagents (X found)
| File | Name | Recommended Action |
|------|------|-------------------|
| .claude/​agents/​reviewer.md | reviewer | Convert to skill |

### Commands (X found)
| File | Name | Recommended Action |
|------|------|-------------------|
| .claude/​commands/​test.md | test | Convert to skill |

### Rules (X found)
| File | Name | Type | Recommended Action |
|------|------|------|-------------------|
| .cursor/​rules/​style.mdc | style | always-apply | Import to CLAUDE.md |
| .cursor/​rules/​react.mdc | react | glob-scoped | Keep as rule |
| .claude/​rules/​security.md | security | knowledge | Convert to skill |

### Already Skills (No Action)
- .claude/​skills/​existing/ ✓

### Needs Manual Review
- [file]: [reason]

Rule classification logic:

  • alwaysApply: true → Import to CLAUDE.md via @import
  • Has globs pattern → Keep as rule (skills don't support glob activation)
  • General knowledge → Convert to skill

Phase 3: Approval

Ask user:

"Found X resources to convert. Proceed with conversion? [Y/​n/​customize]"

If "customize": Let user select specific items or modify actions.

Phase 4: Conversion

For each approved conversion, apply the appropriate mapping:

Subagent → Skill:

  • Add context: fork (required for subagent behavior)
  • Simplify model names (see field-mappings.md)
  • Keep allowed-tools
  • Enhance description with trigger keywords

Command → Skill:

  • Add disable-model-invocation: true
  • Keep argument-hint
  • Document $ARGUMENTS, $1, $2 usage

Rule → Skill (knowledge type only):

  • Write description with auto-trigger keywords
  • No disable-model-invocation (allow auto-activation)

Rule → CLAUDE.md (always-apply):

  • Add @import path/​to/​rule.md to CLAUDE.md

Create skill structure:

.claude/​skills/​{name}/
├── SKILL.md
├── scripts/      # If original has executables
├── references/   # If original has docs
└── assets/       # If original has templates

Phase 5: Verification

After conversion, run:

# List created skills
ls -la .claude/​skills/

# Verify frontmatter
for skill in .claude/​skills/​*/​SKILL.md; do
  echo "=== $skill ===" && head -20 "$skill"
done

Present summary:

## Conversion Complete

### Created Skills
| Skill | Location | Source |
|-------|----------|--------|
| reviewer | .claude/​skills/​reviewer/ | .claude/​agents/​reviewer.md |

### Updated Files
- CLAUDE.md: Added 2 @import statements

### Verification
- [x] All skills have valid frontmatter
- [x] Names match directory names
- [x] No duplicate skills

Phase 6: Cleanup (Optional)

Ask user:

"Delete original files? [y/​N/​archive]"

  • y: Delete originals
  • N: Keep originals (default)
  • archive: Move to .claude/​archive/

Quick Reference

Key Conversion Rules

Source TypeTargetKey Addition
SubagentSkillcontext: fork
CommandSkilldisable-model-invocation: true
Rule (knowledge)SkillTrigger keywords in description
Rule (always-apply)CLAUDE.md@import statement
Rule (glob-scoped)Keep as ruleNo conversion needed

Model Mapping

LegacySkills
claude-opus-4-*opus
claude-sonnet-4-*sonnet
claude-3-5-haiku-*haiku
inherit / omitted(omit)

Tool Mapping

VariationsStandard
read, ReadFile, file_readRead
write, WriteFileWrite
bash, Terminal, ShellBash
grep, SearchGrep
glob, Find, list_filesGlob

Reference Files

For detailed specifications, read these on-demand:

  • references/​spec-reference.md - Full Agent Skills specification
  • references/​field-mappings.md - Complete field conversion tables
  • references/​examples.md - Before/​after conversion examples

Troubleshooting

IssueSolution
Skill not discoveredCheck: name matches directory, valid YAML frontmatter
Triggers too oftenAdd disable-model-invocation: true
Doesn't auto-triggerRemove disable-model-invocation, add keywords to description
Subagent behavior changedEnsure context: fork is present
Hooks not workingRequires Claude Code 2.1+

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View