Synthèse automatique
Guide pas à pas pour créer une compétence Claude Code conforme aux bonnes pratiques d'Anthropic.
Points forts
- Structure reproductible et validée par les recommandations Anthropic
- Gère les scopes personnel et projet avec détection de conflit
- Personnalisation fine des outils et du type de compétence
Limites
- Ne génère que le squelette, pas le contenu avancé
- Dépend du répertoire utilisateur pour les compétences personnelles
- N'inclut pas de validation sémantique du YAML généré
Lorsque vous souhaitez créer rapidement une compétence Claude Code bien structurée sans partir de zéro.
Si vous avez besoin d'une compétence très spécialisée avec des dépendances externes ou des scripts complexes.
Analyse de sécurité
SûrThe skill only creates directories and writes a file with user-provided content. It uses Bash for directory checks and creation (non-destructive), and the Write tool to save the SKILL.md. No network access, no execution of arbitrary code, no data exfiltration. All inputs are directly from the user.
Aucun point d'attention détecté
Comment cette analyse est faiteExemples
Create a new Claude Code skill named 'api-builder' that generates REST API endpoints. It should be a personal skill.Guide me through creating a project-level skill for data processing with access to Read, Write, and Bash tools.Create New Claude Code Skill
Guides you through creating a new Claude Code skill following Anthropic's official skill structure and best practices.
Purpose
- Create well-structured skills for Claude Code
- Follow Anthropic's progressive disclosure pattern
- Support both personal and project-specific skills
- Generate proper YAML frontmatter and instructions
- Include optional resources and scripts
Execution Steps
Step 1: Gather Skill Information
Output: "Let's create a new Claude Code skill!
What is the skill name? (max 64 characters, use kebab-case like 'api-builder' or 'data-analyzer'):"
WAIT for user's skill name input.
Store skill name as SKILL_NAME.
Output: "What does this skill do? Provide a complete description including what the skill does AND when Claude should use it (max 1024 characters):"
WAIT for user's description input.
Store description as SKILL_DESCRIPTION.
Step 2: Determine Skill Scope
Use AskUserQuestion tool:
- question: "Where should this skill be installed? Personal skills are available globally across all projects. Project skills are specific to the current repository."
- header: "Skill Scope"
- multiSelect: false
- options:
- label: "Personal (~/.claude/skills/)", description: "Available globally in all projects"
- label: "Project (.claude/skills/)", description: "Only available in current project"
If user chooses Personal:
- Set
SKILL_DIRto/Users/nagawa/.claude/skills/${SKILL_NAME}
If user chooses Project:
- Use Bash tool to get current directory:
- Command:
pwd - Description: "Get current working directory"
- Command:
- Set
SKILL_DIRto${PWD}/.claude/skills/${SKILL_NAME}
Step 3: Check for Existing Skill
Use Bash tool to check if skill directory exists:
- Command:
test -d "${SKILL_DIR}" && echo "exists" || echo "new" - Description: "Check if skill directory already exists"
If result is "exists": Output: "Warning: Skill '${SKILL_NAME}' already exists at ${SKILL_DIR}. Overwrite? (yes/no):"
WAIT for user's response.
If user says no:
- Output: "Skill creation cancelled."
- Exit command
Step 4: Gather Skill Details
Output: "Now let's define the skill structure. I'll ask you a few questions."
Use AskUserQuestion tool:
- question: "What type of skill is this?"
- header: "Skill Type"
- multiSelect: false
- options:
- label: "Code Generation", description: "Generates code, builds applications, creates artifacts"
- label: "Analysis & Review", description: "Analyzes code, reviews files, performs audits"
- label: "Data Processing", description: "Processes data, generates reports, transforms files"
- label: "Testing & Debugging", description: "Creates tests, debugs issues, validates code"
- label: "Documentation", description: "Generates docs, creates guides, writes specifications"
- label: "Workflow Automation", description: "Automates tasks, orchestrates processes"
Store result as SKILL_TYPE.
Output: "What tools will this skill need access to? (comma-separated, e.g., 'Read, Write, Bash, Task') Available tools: Read, Write, Edit, Bash, Grep, Glob, Task, AskUserQuestion, TodoWrite
Enter tools needed (or press Enter for all tools):"
WAIT for user's tools list input.
If user provides tools list:
- Parse comma-separated list into
TOOLS_LIST
If user provides empty input:
- Set
TOOLS_LISTto "All available Claude Code tools"
Step 5: Create Skill Directory Structure
Use Bash tool to create skill directory:
- Command:
mkdir -p "${SKILL_DIR}" - Description: "Create skill directory"
Step 6: Generate SKILL.md Content
Based on gathered information, construct SKILL.md content:
---
name: ${SKILL_NAME}
description: ${SKILL_DESCRIPTION}
---
# ${SKILL_NAME}
## Purpose
${SKILL_DESCRIPTION}
## When to Use This Skill
Claude should invoke this skill when:
- [Auto-generate trigger conditions based on SKILL_TYPE and SKILL_DESCRIPTION]
## Available Tools
This skill has access to:
${TOOLS_LIST}
## Instructions
### Step 1: [First Major Action]
[Auto-generate steps based on SKILL_TYPE]
Use [appropriate tool] to [action]:
- [Detailed instruction following our patterns]
### Step 2: [Second Major Action]
[Continue with logical workflow steps]
## Examples
### Example 1: [Common Use Case]
**User Request**: "[Example request]"
**Skill Actions**:
1. [Action 1]
2. [Action 2]
3. [Result]
### Example 2: [Another Use Case]
**User Request**: "[Example request]"
**Skill Actions**:
1. [Action 1]
2. [Action 2]
3. [Result]
## Best Practices
- [Practice 1 based on skill type]
- [Practice 2 based on skill type]
- [Practice 3 based on skill type]
## Error Handling
- If [common error]: [Resolution]
- If [another error]: [Resolution]
## Constraints
- No network access (skills run in isolated environment)
- No runtime package installation
- Only pre-installed packages available
- Maximum instruction size: ~5000 tokens
## Notes
[Additional context or special considerations]
Present the generated SKILL.md content to user:
Output: "Generated SKILL.md content:
[Show first 50 lines of generated content]
...
Review this skill definition. Options:
- 'ok' to save as-is
- 'edit' to make changes
- 'regenerate' to try again with different answers
- 'abort' to cancel
Your choice:"
WAIT for user's response.
If user chooses 'edit': Output: "What changes would you like to make?" WAIT for user's editing instructions. Apply requested changes to SKILL.md content. Return to presenting content for review.
If user chooses 'regenerate': Return to Step 4.
If user chooses 'abort': Output: "Skill creation cancelled." Exit command.
Step 7: Save SKILL.md File
Use Write tool to create SKILL.md:
- file_path:
${SKILL_DIR}/SKILL.md - content: [generated SKILL.md content]
Output: "✓ Created ${SKILL_DIR}/SKILL.md"
Step 8: Add Optional Resources
Output: "Would you like to add additional resources to this skill?
Resources can include:
- Additional markdown files (REFERENCE.md, EXAMPLES.md, FORMS.md)
- Python scripts for complex operations
- JSON schemas for data validation
- Template files
- Example files
Add resources? (yes/no):"
WAIT for user's response.
If user says no: Skip to Step 9.
If user says yes:
Output: "What type of resource would you like to add?
- Additional markdown file
- Python script
- JSON schema
- Template file
- Done adding resources
Enter number (1-5):"
WAIT for user's choice.
If user chooses 1 (Additional markdown):
Output: "Enter filename (e.g., REFERENCE.md, EXAMPLES.md):"
WAIT for filename.
Output: "Enter the content for this file (or describe what it should contain):"
WAIT for content.
Use Write tool to create the file in ${SKILL_DIR}/[filename]
Output: "✓ Created ${SKILL_DIR}/[filename]"
Return to resource type selection.
If user chooses 2 (Python script):
Output: "Enter script filename (e.g., process_data.py):"
WAIT for filename.
Output: "Enter the Python code (or describe what the script should do):"
WAIT for code content.
Use Write tool to create the script in ${SKILL_DIR}/[filename]
Use Bash tool to make script executable:
- Command:
chmod +x "${SKILL_DIR}/[filename]" - Description: "Make script executable" Output: "✓ Created ${SKILL_DIR}/[filename]" Return to resource type selection.
If user chooses 3 (JSON schema):
Output: "Enter schema filename (e.g., config-schema.json):"
WAIT for filename.
Output: "Enter the JSON schema content:"
WAIT for schema content.
Use Write tool to create the schema in ${SKILL_DIR}/[filename]
Output: "✓ Created ${SKILL_DIR}/[filename]"
Return to resource type selection.
If user chooses 4 (Template file):
Output: "Enter template filename (e.g., template.txt):"
WAIT for filename.
Output: "Enter the template content:"
WAIT for template content.
Use Write tool to create the template in ${SKILL_DIR}/[filename]
Output: "✓ Created ${SKILL_DIR}/[filename]"
Return to resource type selection.
If user chooses 5 (Done): Proceed to Step 9.
Step 9: Validate Skill Structure
Use Bash tool to list skill directory contents:
- Command:
ls -lh "${SKILL_DIR}" - Description: "List skill directory contents"
Use Read tool to read the created SKILL.md file to validate:
- file_path:
${SKILL_DIR}/SKILL.md
Perform validation checks:
- YAML frontmatter present with 'name' and 'description'
- Name is max 64 characters
- Description is max 1024 characters
- Markdown structure follows conventions
- Instructions use explicit tool invocations
If validation fails: Output: "Validation issues found: [list issues]" Output: "Fix issues? (yes/no):" WAIT for user's response. If yes, fix issues and re-validate.
If validation passes: Output: "✓ Skill structure validated successfully"
Step 10: Test Skill Invocation
Output: "Skill created successfully at: ${SKILL_DIR}
To use this skill in Claude Code, invoke it with: ``` /skill ${SKILL_NAME} ```
Or reference the skill documentation: ```bash cat ${SKILL_DIR}/SKILL.md ```
Would you like to test invoking the skill now? (yes/no):"
WAIT for user's response.
If user says yes: Output: "Attempting to invoke skill..."
Use Skill tool:
- command:
${SKILL_NAME}
Output: "Skill invoked. Check the output above to verify it's working correctly."
If user says no: Output: "Skill creation complete!"
Step 11: Add to Git (If Applicable)
If SKILL_SCOPE is "Project":
Use Bash tool to check if in git repository:
- Command:
git rev-parse --is-inside-work-tree 2>/dev/null || echo "not-git" - Description: "Check if current directory is in git repository"
If result is not "not-git": Output: "This is a project-specific skill in a git repository. Would you like to commit the skill to version control? (yes/no):"
WAIT for user's response.
If user says yes: Use Bash tool to stage skill directory:
- Command:
git add "${SKILL_DIR}" - Description: "Stage skill directory"
Use Bash tool to create commit:
- Command: `git commit -m "feat: add ${SKILL_NAME} skill
Add new Claude Code skill for ${SKILL_TYPE}
${SKILL_DESCRIPTION}"`
- Description: "Commit skill to repository"
Output: "✓ Skill committed to git repository"
Step 12: Summary
Output: "
Skill Creation Summary
Skill Name: ${SKILL_NAME} Type: ${SKILL_TYPE} Scope: ${SKILL_SCOPE} Location: ${SKILL_DIR}
Files Created: [List all files created]
Next Steps:
- Test the skill with: `/skill ${SKILL_NAME}`
- Review and refine the SKILL.md instructions
- Add more examples and edge cases
- Test with real-world scenarios
Documentation:
- Official Docs: https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview
- Skills Repository: https://github.com/anthropics/skills
- Skill File: ${SKILL_DIR}/SKILL.md
Skill creation complete!"
Skill Type Templates
Code Generation Template
### Step 1: Understand Requirements
Analyze user's request for code generation needs.
### Step 2: Design Structure
Plan the code architecture and file organization.
### Step 3: Generate Code
Use Write tool to create necessary files with generated code.
### Step 4: Validate Output
Review generated code for correctness and best practices.
Analysis & Review Template
### Step 1: Gather Files
Use Read/Grep tools to collect files for analysis.
### Step 2: Perform Analysis
Analyze code structure, patterns, and potential issues.
### Step 3: Generate Report
Create detailed analysis report with findings.
### Step 4: Provide Recommendations
Suggest improvements and next steps.
Data Processing Template
### Step 1: Load Data
Use Read tool to load input data files.
### Step 2: Process Data
Transform, filter, or aggregate data as needed.
### Step 3: Generate Output
Use Write tool to save processed results.
### Step 4: Validate Results
Check output data for correctness and completeness.
Testing & Debugging Template
### Step 1: Analyze Code
Read and understand code structure for testing.
### Step 2: Generate Tests
Create comprehensive test cases.
### Step 3: Run Tests
Use Bash tool to execute test suite.
### Step 4: Debug Failures
Analyze and fix any test failures.
Documentation Template
### Step 1: Analyze Codebase
Use Grep/Read tools to understand code structure.
### Step 2: Generate Documentation
Create comprehensive documentation.
### Step 3: Format Output
Use proper markdown formatting and structure.
### Step 4: Validate Documentation
Ensure documentation is complete and accurate.
Workflow Automation Template
### Step 1: Define Workflow Steps
Break down automation into clear steps.
### Step 2: Execute Tasks
Use appropriate tools to perform each step.
### Step 3: Handle Errors
Implement error handling and recovery.
### Step 4: Report Results
Provide summary of automation results.
Validation Rules
YAML Frontmatter
- Must contain 'name' field (max 64 chars)
- Must contain 'description' field (max 1024 chars)
- Both fields are required
File Structure
- SKILL.md is required
- Additional resources are optional
- All markdown files should use proper formatting
Instructions Format
- Use explicit tool invocations (not bash examples)
- Follow Step 1, Step 2 structure (not nested phases)
- Include Examples section
- Include Error Handling section
- Keep total size under 5000 tokens
Best Practices
- Clear, actionable instructions
- Concrete examples
- Proper error handling
- Progressive disclosure (load resources as needed)
- Self-contained (no external dependencies)
Error Handling
Skill Already Exists
- Warn user and offer to overwrite
- Back up existing skill if overwriting
Invalid Skill Name
- Must be kebab-case
- Max 64 characters
- No special characters except hyphens
Invalid Directory
- Check write permissions
- Create parent directories if needed
Validation Failures
- Provide specific error messages
- Offer to fix automatically where possible
Notes
- Skills use progressive disclosure (metadata → instructions → resources)
- Skills have no network access or runtime package installation
- Personal skills:
~/.claude/skills/ - Project skills:
.claude/skills/ - Follow established patterns from our slash commands
- Use explicit tool invocations following CLAUDE.md guidelines
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/create-new-claude-code-skill-mm5t8blg/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/create-new-claude-code-skill-mm5t8blg' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/create-new-claude-code-skill-mm5t8blg/download' --output '.skill-downloads/create-new-claude-code-skill-mm5t8blg/SKILL.md.part' && mv '.skill-downloads/create-new-claude-code-skill-mm5t8blg/SKILL.md.part' '.skill-downloads/create-new-claude-code-skill-mm5t8blg/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Le fichier ne fournit pas un en-tête name/description exploitable pour cette procédure native. Le téléchargement reste disponible pour lecture ; utilisez le mode manuel ci-dessous.
Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/create-new-claude-code-skill-mm5t8blg/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.