Créer ou mettre à jour des compétences IA

VérifiéSûr

Crée ou met à jour des fichiers SKILL.md dans .claude/skills avec un frontmatter et des règles de contenu appropriés.

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

Recommandé pour

Notre avis

Guide Claude pour créer ou mettre à jour un fichier de définition de compétence (SKILL.md) en fonction du contexte de la conversation.

Points forts

  • Détection claire des modes création/mise à jour
  • Règles de frontmatter explicites
  • Directives de contenu concises et soucieuses du coût en tokens
  • Étapes d'écriture de fichier incluses

Limites

  • Spécifique à la structure de répertoire des skills de Claude Code
  • Suppose une connaissance préalable du format SKILL.md
  • Limitée à une seule opération de skill à la fois
Quand l'utiliser

Lorsque vous avez besoin de créer ou modifier un skill réutilisable pour Claude Code à partir d'une conversation.

Quand l'éviter

Lors de l'édition de code source ou si aucun changement de définition de skill n'est demandé.

Analyse de sécurité

Sûr
Score qualité90/100

The skill only instructs reading/writing files within the .claude/skills/ directory and does not involve executing arbitrary shell commands, exfiltration, or disabling safety mechanisms. No risky actions are present.

Aucun point d'attention détecté

Exemples

Create a commit-conventions skill
Create a skill named 'commit-conventions' that captures the Conventional Commits rules.
Update design-system skill
Update the skill 'design-system' with a new rule about spacing tokens.
Add a code-review skill
Add a skill 'code-review' for reviewing pull requests with a step-by-step checklist.

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