Créer une Compétence Claude

VérifiéSûr

Guide la création d'une compétence Claude, du concept à la distribution empaquetée. Elle aide à définir l'objectif de la compétence, mettre en place la structure de fichiers, créer des ressources et valider le package final. Idéal pour construire une compétence réutilisable pour Claude en suivant les bonnes pratiques.

Spar Skills Guide Bot
DeveloppementIntermédiaire
16002/06/2026
Claude Code
#skill-creation#claude-skills#development-workflow#automation#best-practices

Recommandé pour

Notre avis

Guide l'utilisateur dans la création ou la mise à jour d'une compétence Claude Code en suivant une méthodologie structurée, de la conception au packaging.

Points forts

  • Processus complet avec initialisation, édition et packaging automatisés
  • Encourage des pratiques comme la divulgation progressive et l'utilisation de fichiers de référence
  • Supporte la création dans plusieurs répertoires (projet ou utilisateur)

Limites

  • Nécessite Python et les scripts du créateur de compétences préinstallés
  • Peut être trop rigide pour des compétences très simples ou ponctuelles
  • La validation dépend du script package_skill.py qui peut ne pas couvrir tous les cas
Quand l'utiliser

Lorsque vous souhaitez créer une nouvelle compétence Claude Code réutilisable et bien structurée ou en améliorer une existante.

Quand l'éviter

Si vous avez besoin d'une compétence très simple sans scripts ni ressources, ou si vous préférez écrire manuellement le SKILL.md sans automatisation.

Analyse de sécurité

Sûr
Score qualité92/100

The skill guides users through creating a new Claude Skill using the skill-creator methodology. It only runs trusted initialization and packaging scripts via Bash, and does not execute arbitrary user input or perform destructive/exfiltrating actions. The allowed tools are standard for development tasks, and there are no hidden payloads or security concerns.

Aucun point d'attention détecté

Exemples

Create a new API testing skill
/create-skill "api-testing" "Skill for testing REST APIs with automated test generation"
Update an existing skill
/create-skill "debugging"
Ask for guidance without arguments
/create-skill

description: Create a new Claude Skill following best practices. Guides through the complete skill creation process from concept to packaged distribution. allowed-tools: Read, Write, Edit, Bash, Grep, Glob argument-hint: '[skill-name] [description]'

Create Skill

Create a new Claude Skill or update an existing one following the skill-creator methodology: $ARGUMENTS

Instructions

When this command is invoked, use the skill-creator-expert agent to guide the user through creating a skill.

1. Determine Skill Details

If arguments provided:

  • Parse skill name and description from $ARGUMENTS
  • Use these as starting points

If no arguments:

  • Ask the user what skill they want to create
  • Gather information about the skill's purpose

2. Follow Skill Creation Process

Use the skill-creator-expert agent which follows the skill-creator skill methodology:

  1. Understand with Examples: Ask for concrete usage examples
  2. Plan Resources: Identify scripts, references, and assets needed
  3. Initialize: Run init_skill.py script to create structure
  4. Edit: Create reusable resources and update SKILL.md
  5. Package: Validate and package when ready
  6. Iterate: Improve based on feedback

3. Skill Location

Determine where to create the skill:

  • Project skills: skills/ directory in current project
  • User skills: ~/.claude/skills/ directory

If not specified, ask the user which location they prefer.

4. Initialize Skill

Run the initialization script:

python ~/.claude/skills/skill-creator/scripts/init_skill.py <skill-name> --path <output-directory>

This creates:

  • Skill directory with proper structure
  • SKILL.md template with frontmatter
  • Example directories (scripts/, references/, assets/)

5. Guide Content Creation

Help the user:

  • Create reusable resources (scripts, references, assets)
  • Write SKILL.md with proper structure
  • Follow imperative/infinitive writing style
  • Include "When to Use" section
  • Reference all bundled resources

6. Validate and Package

When the skill is complete:

python ~/.claude/skills/skill-creator/scripts/package_skill.py <skill-path>

This validates the skill and creates a distributable zip file.

Skill Structure

Skills should include:

skill-name/
├── SKILL.md (required)
│   ├── Frontmatter (name, description)
│   └── Instructions (when to use, how to use)
└── [Optional Resources]
    ├── scripts/          # Executable helper scripts (Python, Bash, etc.)
    ├── references/        # Documentation references (detailed patterns, checklists, guides)
    └── assets/           # Templates, images, fonts, etc.

Reference Files

Reference files (references/) store detailed documentation that would make SKILL.md too long. Use them for:

  • Detailed Patterns: Common patterns and examples (e.g., references/common_patterns.md)
  • Checklists: Comprehensive checklists (e.g., references/review_checklist.md)
  • Framework Guides: Framework-specific documentation (e.g., references/framework_patterns.md)
  • API References: API documentation and examples
  • Schemas: Database schemas, data structures

How to Reference: In SKILL.md, tell Claude when to load reference files:

  • "For detailed patterns, load references/common_patterns.md"
  • "When analyzing X, load references/framework_patterns.md and refer to section Y"

Examples

Create New Skill

/create-skill "api-testing" "Skill for testing REST APIs with automated test generation"

Update Existing Skill

/create-skill "debugging" # Update existing skill

Best Practices

  • Be Specific: Clear descriptions help Claude know when to use the skill
  • Progressive Disclosure: Keep SKILL.md lean, use references for details
  • Test Examples: Ensure all examples work as documented
  • Iterate: Improve based on real usage feedback

Follow the skill-creator skill methodology for creating effective, well-structured skills.

Skills similaires