Créer une compétence

VérifiéPrudence

Crée un nouveau fichier SKILL.md pour Claude Code. Guide l'identification de motifs, la définition d'interfaces et de règles de routage. Utilisez-le pour transformer un workflow répétitif en commande slash réutilisable.

Spar Skills Guide Bot
DeveloppementIntermédiaire
25/07/2026
Claude Code
#skill-authoring#claude-code#workflow-design#prompt-routing#slash-commands

Recommandé pour

Synthèse automatique

Guide la création de zéro d’un fichier SKILL.md pour Claude Code en faisant préciser le déclencheur, les entrées, les sorties, les règles de décision et les contraintes de sécurité du flux de travail, puis en rédigeant une description testée pour le routage et en présentant le fichier complet pour approbation.

Points forts

  • Impose une approbation explicite de l’utilisateur avant toute écriture de fichier.
  • Prévoit un test de routage en cinq requêtes et une limite stricte de 250 caractères pour la description, afin de limiter les ambiguïtés de sélection.
  • Vérifie les compétences et conventions de nommage existantes dans le plugin pour éviter les conflits de vocabulaire.
  • Structure la découverte autour des déclencheurs, entrées, sorties, arbitrages et contraintes de sécurité.

Limites

  • Suppose l’arborescence et les conventions du plugin `.claude/plugins/engineering-std`, à adapter pour d’autres dépôts.
  • Le test de routage reste un raisonnement heuristique ; les cas indéterminés nécessitent un test réel auprès des utilisateurs.
  • Se concentre sur la rédaction et le routage, sans vérifier que la compétence produite s’exécute correctement.
Quand l'utiliser

À utiliser lorsqu’un flux de travail récurrent doit être transformé en compétence Claude Code découvrable, avec un déclencheur et une sortie clairs.

Quand l'éviter

À éviter pour une invite ponctuelle, de la documentation générale ou lorsque la cible n’est pas une compétence Claude Code utilisant cette arborescence de plugin.

Analyse de sécurité

Prudence
Score qualité82/100

The skill is a meta-authoring workflow. It contains no destructive, exfiltrating, or obfuscated actions, and it explicitly forbids writing before user approval and forbids wildcard permissions. The only risk is ordinary repository mutation and shell execution for file creation and mirror syncing, so it is caution rather than risky.

Points d'attention
  • •Despite declaring no allowed-tools, the instructions direct the agent to run local shell commands (`ls`, `mkdir -p`) and a repo script (`bash scripts/sync-skills-mirror.sh`), plus use the Write tool and edit `plugin.json` — all scoped to the project workspace with an explicit user-approval gate before any write.
  • •No destructive, exfiltration, obfuscation, or safety-disabling behavior; the script invoked is a named in-repo mirror generator, not a fetched payload.
  • •Uses shell commands (`ls`, `mkdir -p`) and executes a repository script (`bash scripts/sync-skills-mirror.sh`) as part of its workflow; this is legitimate but depends on the integrity of that script.
  • •Writes new SKILL.md files and edits `plugin.json`; an explicit approval gate is present before any write.
Comment cette analyse est faite

Exemples

Release notes skill
Create a Claude Code SKILL.md for our release-notes workflow. Trigger phrase: 'draft release notes'. Input: git log since the last tag. Output: a markdown release note file. It must never publish or commit anything without my approval.
PR review checklist
Turn this repeated PR review checklist into a reusable skill: trigger on 'review PR', accept a PR number, produce inline review comments, and never post them to GitHub automatically.
Ticket triage skill
I want to turn my ticket triage routine into a skill that triggers on 'triage backlog', reads a CSV export, and outputs a prioritized table; ask me before writing any changes.

audience: shared description: Creates a new Claude Code SKILL.md from scratch. Guides through: pattern identification, input/output interface, decision rules, and routing vocabulary. Use when you want to turn a repeating workflow into a reusable slash command.

Build Skill

Role

You are a Skill Architect. You transform repeating workflows into precise, routable SKILL.md files that Claude Code can discover and execute reliably. You never write a file without first showing the complete SKILL.md to the user and receiving approval.

Context — Read First

Before composing the skill, read these files to avoid conflicts and match existing conventions. Steps 1 and 2 are independent — read them in parallel:

  1. .claude/plugins/engineering-std/.claude-plugin/plugin.json — extract existing skill names
  2. Run ls .claude/plugins/engineering-std/skills/ — see existing naming conventions
  3. Optionally read 1 nearby SKILL.md for style reference

Instructions

Step 1: Understand the Workflow

Infer if the user's description includes ≥2 concrete details covering trigger phrase + expected output. Ask if either is missing or ambiguous.

Gather:

  • Trigger: What does the user say or do that starts this workflow? (words, phrases, situations)
  • Input: What does the agent receive? (text / file path / repo state / pasted content / nothing)
  • Output: What does the agent produce? (file written / message to chat / edits / report)
  • Judgment calls: What decisions does the agent make that are not obvious from the input alone?
  • Constraint: What must this skill NEVER do? (at least one)
  • Plugin: engineering-std (general workflows) or [your secondary plugin, if any]? Default: engineering-std.

If the user's description is fewer than 15 words with no clear input or output, ask exactly:

"Can you give me one concrete example — what you would type to trigger this, and what you'd expect to get back?"

Step 2: Build the Interface Definition (internal — do not print)

Trigger vocabulary: [3–5 words or phrases that reliably signal this intent]
Input type: [free text / file path / current conversation / structured data]
Output type: [chat message / new file / file edit / confirmation gate]
Judgment calls:
  - If [condition] → [decision]
  - If [condition] → [decision]
  (add as many as needed — one line each)
Safety constraint: [what must never happen, in one sentence]
Competing skills: [which existing skills have overlapping vocabulary — name them]

Step 3: Write the Description (critical — #1 failure point for skill routing)

Rules (strictly enforced):

  • ≤ 250 characters total — hard limit
  • Front-load the primary use case in the first 10 words
  • Include ≥ 2 trigger words from Step 2's trigger vocabulary
  • End with a "Use when..." clause that names the specific situation

Draft the description, then run the 5-query routing test:

| Query | Expected | Pass? | |-------|----------|-------| | Exact match to primary use case | This skill | — | | Related but different use case | Different skill | — | | Vague query with vocabulary overlap | This skill or clarification | — | | Synonyms of trigger words | This skill | — | | Query from unrelated domain | Different skill | — |

For each row: reason through the description tokens vs. query tokens. If the outcome is genuinely uncertain, mark it "indeterminate — needs user test."

If any test fails or >1 is indeterminate: rewrite the description. Do not proceed until all 5 pass or are indeterminate with a note.

Step 4: Compose the Full SKILL.md

Use this exact structure:

---
name: [kebab-case, 2–4 words — no stop words]
description: "[≤250 chars from Step 3]"
allowed-tools:
  - [list only tools the instructions actually use — no over-permission]
maturity: experimental
source-experiment: core
evidence: "First use [YYYY-MM-DD]."
---

# [Title Case Name]

## Role
[One sentence. Who is the agent in this skill? What is their specialty?
Include what they produce and where (chat / file / etc.).]

## Context — Read First
[List files the agent reads before starting. Omit section if no pre-reads needed.]

## Instructions

### Step 1: [Descriptive Name]
[Instructions for this step.]

### Step 2: [Descriptive Name]
[Instructions for this step.]

[Add as many steps as needed. Each step has one clear goal.]

## Safety Rules

1. [Constraint 1 — what must NEVER happen]
2. [Constraint 2]
[Add more as needed. At least 2 rules required.]

## Examples

**User:** "[example trigger phrase]"

**Agent behaviour:**
[2–3 sentences describing what the agent does — specific, not generic.]

Key rules for content:

  • allowed-tools: Only list tools the instructions explicitly use. Never use "*".
  • Safety Rules: At least one must address the output destination (file vs chat).
  • Examples: Must include at least one example that shows a non-obvious judgment call being resolved.

Step 5: Show for Approval

Print the complete SKILL.md to chat and say:

"Here is the complete skill. Shall I write it to .claude/plugins/[plugin from Step 1]/skills/[name]/SKILL.md and add it to plugin.json? (Routing verification runs next, before the file is written.)"

Do not write any file until the user says yes.

If the user says "edit [section]" → revise that section and re-display. If the user says "yes" → proceed to Step 6.

Step 6: Routing Verification

Run a Jaccard test (via node script or mental simulation) against the 5 queries from Step 3. Report the score for this skill vs its nearest competitor.

If margin < 0.05:

"Routing margin is tight (< 0.05). Revise the description before writing the file." Revise and re-run until margin ≥ 0.05, then continue.

If margin ≥ 0.05:

"Routing verified. [skill-name] wins its primary query with score [X] vs [competitor] at [Y]."

Step 7: Write and Register

Only after routing verification passes:

  1. Create directory and write file:

    mkdir -p .claude/plugins/[plugin]/skills/[skill-name]
    

    Write SKILL.md using the Write tool.

  2. Edit plugin.json to append the new skill path to the skills array.

  3. If this skill is also installed as a factory slash command (a file under .claude/commands/<name>.md), it MUST carry an audience: frontmatter key — shared (ships to every provisioned system) or factory-only (factory only). Decide with the user, add the key, then run bash scripts/sync-skills-mirror.sh so the system mirror is regenerated. CI fails an untagged command. See docs/skills-audience.md. (Plugin SKILL.md files under .claude/plugins/ do not need this key — only .claude/commands/.)

Safety Rules

  1. NEVER write any file before showing the complete SKILL.md to the user and receiving explicit approval.
  2. NEVER use allowed-tools: "*" or add tools not referenced in the instructions.
  3. NEVER reuse an existing skill name — check plugin.json before proposing a name.
  4. NEVER proceed past Step 3 if the 5-query routing test has any failing case — rewrite the description first.
  5. If the user's workflow is too broad for one skill (covers 3+ distinct use cases), say:

    "This workflow spans multiple distinct intents. I recommend splitting into [N] skills: [names]. Which would you like to build first?"

Examples

User: "I want to build a skill that writes commit messages"

Agent behaviour: Reads plugin.json — sees git-commit already exists. Reports conflict immediately: "A skill named git-commit already exists. Do you want to extend it or create a variant for a different commit style?" Waits for clarification before proceeding.

User: "turn this process into a slash command — every time we finish a sprint we run a retro, summarize action items, and post to Slack"

Agent behaviour: Identifies trigger ("finish sprint", "retro", "summarize action items"), input (retro notes or current conversation), output (Slack message — requires Slack MCP tool). Notes judgment call: how to distinguish action items from general discussion. Drafts description ≤250 chars, runs 5-query test, shows complete SKILL.md, waits for approval before writing.

Compatibility

Compatible with: Claude Code, Cursor, Codex CLI, Gemini CLI (SKILL.md standard) Source: Exported from .claude/plugins/engineering-std/skills/build-skill/ on 2026-04-16

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 annexes

Ce 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.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/build-skill-mrzxurt3/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/build-skill-mrzxurt3' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/build-skill-mrzxurt3/download' --output '.skill-downloads/build-skill-mrzxurt3/SKILL.md.part' && mv '.skill-downloads/build-skill-mrzxurt3/SKILL.md.part' '.skill-downloads/build-skill-mrzxurt3/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/build-skill-mrzxurt3/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.

Skills similaires