Skip to content
converting-commands-to-skills logo

Converting Slash Commands to Skills

converting-commands-to-skills

Use this skill when converting Claude Code slash commands to Skills format. Handles transformation from ./commands/*.md to ./skills/*/SKILL.md, including YAML frontmatter conversion, name transformation to gerund form, description enhancement for invocation triggers, and batch processing. Invoke ...

SKILL.md

Full skill instructions

Converting Slash Commands to Skills

This skill automates the conversion of Claude Code slash commands (in ./​commands/ or ~/​.claude/​commands/) to the Skills format (in ./​skills/ or ~/​.claude/​skills/).

Conversion Process

1. Choose Conversion Type

CRITICAL: Before starting, use AskUserQuestion to ask the user which conversion type they want:

Basic Conversion:

  • Transforms YAML frontmatter (name to gerund form, remove command-specific fields, enhance description)
  • Transforms directory structure (./​commands → ./​skills)
  • Does NOT change any content below the YAML frontmatter (keeps @path, !commands, all content as-is)

Full Conversion:

  • Everything in basic conversion
  • PLUS transforms content below frontmatter (progressive disclosure, @path → ./​path, !command → Bash tool instructions, supporting files)

Ask the user: "Do you want a basic conversion (frontmatter + directory only) or full conversion (frontmatter + directory + content transformation)?"

2. Analyze Source Command and Check for Existing Skill

First, read the command file to understand its structure:

# Example command file structure
cat ./​commands/​gsd/​add-phase.md

Command files typically have:

  • YAML frontmatter with fields like description, allowed-tools, argument-hint, model, context, agent
  • Markdown content with instructions
  • Bash execution blocks prefixed with exclamation mark (!)
  • File references using @ symbol syntax (@file.md)

Check if target skill already exists:

# Check if skill directory and SKILL.md exist
ls ./​skills/​skill-name/​SKILL.md

If skill already exists:

  • Preserve the existing frontmatter (do NOT overwrite it)
  • Only update the content below the frontmatter according to conversion type
  • Ask user: "This skill already exists. Should I update only the content below the frontmatter while preserving the existing frontmatter?"

2. Transform to Skill Format

Apply these transformations (see ./​transformation-rules.md for details):

Name Transformation:

  • Command: add-phase.md → Skill: adding-phases (gerund form)
  • Command: review.md → Skill: reviewing-code
  • Pattern: Use verb + -ing form, lowercase, hyphens

Directory Structure:

  • Source: ./​commands/​category/​command-name.md
  • Target: ./​skills/​category-command-name/​SKILL.md
  • The category/​namespace becomes a prefix in the skill directory name
  • Examples:
    • ./​commands/​kata/​add-phase.md → ./​skills/​kata-adding-phases/​SKILL.md
    • ./​commands/​gsd/​new-project.md → ./​skills/​gsd-starting-new-projects/​SKILL.md
    • ./​commands/​review.md (no category) → ./​skills/​reviewing-code/​SKILL.md

YAML Frontmatter:

  • Keep: name (transformed), description (enhanced)
  • Remove: allowed-tools, argument-hint, model, context, agent
  • Skills inherit all Claude Code capabilities automatically

Description Enhancement:

  • Original (task-focused): "Add a new phase to the roadmap"
  • Enhanced (invocation-focused): "Use this skill when adding planned phases to the roadmap, appending sequential work to milestones, or creating new phase entries. Triggers include 'add phase', 'append phase', 'new phase', and 'create phase'."
  • Include: trigger keywords, use cases, when to invoke

Content Transformation (FULL CONVERSION ONLY):

  • Convert bash execution (exclamation mark prefix like !command) to explicit instructions with Bash tool
  • Transform file references (@ prefix like @file.md) to relative paths (./​file.md)
  • Move detailed content to supporting files with intention-revealing names
  • Keep SKILL.md under 500 lines using progressive disclosure
  • For BASIC conversion: Skip all content transformation - copy content as-is

3. Batch Conversion Workflow

When converting multiple commands:

# 1. List all commands to convert
find ./​commands -name "*.md" -type f

# 2. For each command file, perform conversion
# (Claude will iterate through files)

For each file:

  1. Read the source command file
  2. Determine target skill name and directory
  3. Check if target skill already exists
  4. If skill exists:
    • Read existing SKILL.md
    • Extract and preserve existing frontmatter
    • Only update content below frontmatter
  5. If skill does not exist:
    • Create skill directory structure
    • Transform YAML frontmatter according to rules
  6. If BASIC conversion: Copy content below frontmatter as-is
  7. If FULL conversion: Transform content according to rules
  8. Write SKILL.md (preserving frontmatter if skill existed)
  9. If FULL conversion: Extract supporting content to separate files if needed
  10. Validate the conversion (hook runs automatically)

4. Validate Conversion

Automatic Validation: After each skill file is written, a PostToolUse hook automatically runs validate-frontmatter.py to check:

  • Name follows gerund form convention (verb + -ing)
  • Name is max 64 characters
  • Description is present and under 1024 characters
  • Description is in third person
  • No invalid frontmatter fields (allowed-tools, argument-hint, etc.)

The hook will output validation results. If validation fails, review and fix the issues.

Manual Validation Checklist:

All conversions (basic and full):

  • ✓ Name uses gerund form (verb + -ing)
  • ✓ Name is max 64 characters
  • ✓ Description includes trigger keywords and use cases
  • ✓ Description is in third person
  • ✓ YAML frontmatter has no invalid fields
  • ✓ Directory structure is correct (./​skills/)

Full conversion only:

  • ✓ Supporting files have intention-revealing names
  • ✓ Relative path references use ./ prefix
  • ✓ SKILL.md is concise (under 500 lines preferred)
  • ✓ Bash executions converted to explicit instructions

5. Prompt for User Review

After automatic transformation:

  1. Show the user what was converted
  2. Highlight the enhanced description
  3. Ask if description improvements are needed
  4. Suggest any supporting files that could be extracted

Usage Examples

Single File Conversion: User: "Convert ./​commands/​gsd/​add-phase.md to a skill"

Batch Conversion: User: "Convert all commands in ./​commands/​gsd/ to skills"

Project Migration: User: "Migrate all my slash commands to the skills format"

Acceptance Criteria

All conversions (basic and full):

  • User asked about conversion type (basic vs full)
  • If skill exists, user asked about updating content only
  • Existing frontmatter preserved if skill already exists
  • Skill directory created in correct location (./​skills/)
  • SKILL.md has proper YAML frontmatter
  • Name follows gerund form convention
  • Description is invocation-focused with triggers
  • All slash-command-specific fields removed
  • Automatic validation hook ran successfully
  • User prompted to review description enhancements

Full conversion only:

  • Bash executions converted to explicit instructions
  • File references use relative paths
  • Supporting files have intention-revealing names
  • Content transformed with progressive disclosure

Basic conversion only:

  • Content below frontmatter copied as-is with NO changes

Supporting Files

See ./​transformation-rules.md for detailed transformation patterns and ./​conversion-examples.md for before/​after examples.

More skills from diegosouzapw

accessibility logo
diegosouzapw/awesome-omni-skill

accessibility

Accessibility guidelines for VS Code features — covers accessibility help dialogs, accessible views, verbosity settings, accessibility signals, ARIA alerts/status announcements, keyboard navigation, and ARIA labels/roles. Applies to both new interactive UI surfaces and updates to existing feature...

62 1
View
mermaid-diagrams logo
diegosouzapw/awesome-omni-skill

mermaid-diagrams

Mermaid diagram creation for flowcharts, sequences, ERDs, and more. Generate diagrams from text in markdown files. Use for documentation, architecture diagrams, and visual representations. Triggers on mermaid, flowchart, sequence diagram, ERD, entity relationship, gantt chart, pie chart, class di...

62 1
View
tauri2-react-rust logo
diegosouzapw/awesome-omni-skill

tauri2-react-rust

Guides development of cross-platform desktop apps with Tauri 2, TypeScript, React, and Rust. Use when building Tauri apps, implementing IPC, designing Rust backend or TypeScript/React frontend, when researching or cloning a website (open site, snapshot elements), when verifying local dev or built...

62 1
View
fp-ts-errors logo
diegosouzapw/awesome-omni-skill

fp-ts-errors

Handle errors as values using fp-ts Either and TaskEither for cleaner, more predictable TypeScript code. Use when implementing error handling patterns with fp-ts.

62 0
View
ring:pre-dev-research logo
diegosouzapw/awesome-omni-skill

ring:pre-dev-research

Gate 0 research phase for pre-dev workflow. Dispatches 3 parallel research agents to gather codebase patterns, external best practices, and framework documentation BEFORE creating PRD/TRD. Outputs research.md with file:line references.

62 0
View
create-assistant logo
diegosouzapw/awesome-omni-skill

create-assistant

Create and configure Vapi voice AI assistants with models, voices, transcribers, tools, hooks, and advanced settings. Use when building voice agents, phone bots, customer support assistants, or any conversational AI that handles phone or web calls.

62 0
View
codex-headless logo
diegosouzapw/awesome-omni-skill

codex-headless

Delegiere Aufgaben an OpenAI Codex CLI im Headless-Mode. Nutzt ChatGPT Subscription (KEIN API Key). Nur Workspace-Zugriff, KEIN System-Zugriff. Auto-Accept mit --full-auto. Web-Recherche mit --search.

62 0
View
social-media-scheduler logo
diegosouzapw/awesome-omni-skill

social-media-scheduler

Generate a full week of social media content for any topic. Outputs platform-optimized posts for Twitter/X, LinkedIn, and Instagram with hashtags and posting times.

62 0
View
Data Privacy Compliance logo
diegosouzapw/awesome-omni-skill

Data Privacy Compliance

Data privacy and regulatory compliance specialist for GDPR, CCPA, HIPAA, and international data protection laws. Use when implementing privacy controls, conducting data protection impact assessments, ensuring regulatory compliance, or managing data subject rights. Expert in consent management, da...

62 0
View
triple-review logo
diegosouzapw/awesome-omni-skill

triple-review

Reviews a task using the TRIPLE protocol, as the review agent.

62 0
View
Tech Stack & Architecture Decision logo
diegosouzapw/awesome-omni-skill

Tech Stack & Architecture Decision

Define and document the technology stack and architecture decisions for a project. Use when the user needs to choose a tech stack, make architecture decisions, define infrastructure choices, or document technology selections. Triggers on requests like "define the tech stack", "choose technologies...

62 0
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