Créer ou mettre à jour des compétences

VérifiéPrudence

Guide la création ou la mise à jour de fichiers SKILL.md pour Claude Code, avec frontmatter et règles de contenu.

Spar Skills Guide Bot
DeveloppementIntermédiaire
0005/08/2026
Claude Code
#skill-authoring#skill-management#claude-code#meta-skill#workflow

Recommandé pour

Notre avis

Ce skill crée ou met à jour un fichier SKILL.md pour Claude Code à partir de la conversation en cours.

Points forts

  • Détecte automatiquement le mode création ou mise à jour selon l'existence du fichier.
  • Fournit des directives précises pour le frontmatter (description, chemins, argument-hint).
  • Règles claires pour le contenu des compétences de référence ou de tâches.
  • Permet de restreindre le skill à des fichiers via des motifs glob.

Limites

  • Spécifique à l'outil Claude Code et à son dossier .claude/skills.
  • Ne fournit pas d'exemples complets de SKILL.md, seulement des règles.
  • La qualité du résultat dépend des informations données dans la conversation.
Quand l'utiliser

Quand vous souhaitez créer ou mettre à jour un skill Claude Code à partir d'une conversation.

Quand l'éviter

Quand vous rédigez un skill indépendant sans référence à la conversation, ou pour d'autres assistants IA.

Analyse de sécurité

Prudence
Score qualité88/100

This skill uses filesystem operations to create or update skill files within a designated directory. While no destructive or exfiltration actions are present, the ability to write arbitrary skill content could indirectly introduce risk if arguments are untrusted. No network calls or privilege escalation are involved.

Points d'attention
  • Skill performs file writes and directory creation, which could be exploited to inject malicious skill content if input is not sanitized.

Exemples

Create a new skill
code-review-skill Create a skill that reviews pull requests for common issues.
Update an existing skill
design-tokens Add a rule for color palette usage.
Scope skill to files
testing-helpers Add a rule for jest mocks, and scope it to **/*.test.ts

Create or update a skill based on the current conversation.

The first word of $ARGUMENTS is the skill name (kebab-case). The rest is an optional note about what to add or change.


Step 1 — Detect mode

Check whether .claude/skills/$0/SKILL.md already exists.

  • Existsupdate mode: read the current file, then go to Step 3.
  • Does not existcreate mode: go to Step 2.

Step 2 — Determine frontmatter (create only)

Decide the correct frontmatter based on what the skill does:

description — one sentence: what the skill does + when Claude should auto-load it. Put the key trigger phrase first (budget is 1,536 chars).

paths — set only if the skill is scoped to specific files. Use glob patterns:

  • Design system / theme work → @soroush.tech/design-system/**
  • All TypeScript → **/*.ts,**/*.tsx
  • Omit for project-wide knowledge

argument-hint — short label shown in autocomplete, e.g. [filename] or [component-name].

disable-model-invocation: true — add only if this is a manual workflow with side effects (deploy, commit, send). Reference knowledge should NOT have this.

user-invocable: false — add only if users should never call it directly (pure background context).


Step 3 — Write content

Rules for skill content:

  • Reference skills (conventions, patterns, style guides): state the rule + one ✗/✓ code pair. No prose explaining why — the example shows it.
  • Task skills (step-by-step actions): numbered steps, imperative verbs, no explanation.
  • Keep SKILL.md under 500 lines.
  • Every line is a recurring token cost — cut anything that doesn't change Claude's behavior.
  • End with: If $ARGUMENTS names a file, read it and apply the rules. Otherwise apply to the code being discussed. (for reference skills only).

Update mode: add the new rule or change to the appropriate section. Do not touch unrelated rules. Remove any rule made obsolete by the change.


Step 4 — Write the file

For create: run mkdir -p .claude/skills/$0 then write .claude/skills/$0/SKILL.md.

For update: write the updated .claude/skills/$0/SKILL.md.

Confirm what was created or changed. If a new paths scope was set, mention which files will trigger it.

Skills similaires