Création d'objectif pour nouvelle compétence

VérifiéSûr

Interviewer l'auteur pour définir un objectif vérifiable et écrire un fichier goal.md pour une nouvelle compétence.

Spar Skills Guide Bot
DeveloppementIntermédiaire
22/07/2026
Claude Code
#skill-authoring#goal-setting#interview#scaffolding#validation

Recommandé pour

Synthèse automatique

Mène un entretien en quatre questions avec l'auteur et écrit un fichier staging/<name>/goal.md contenant une condition /goal mesurable qui encadre la future rédaction du SKILL.md.

Points forts

  • Impose un état final vérifiable via une commande de contrôle, des contraintes et une limite de tours.
  • Valide le nom en kebab-case (forme gérondive) et signale les artefacts déjà existants pour éviter tout écrasement.
  • Ne produit qu'un seul artefact ciblé, sans rédiger SKILL.md ni tests.md à la place de l'auteur.

Limites

  • Ne génère que le sidecar goal.md ; SKILL.md et tests.md doivent toujours provenir des exécutions manuelles.
  • Suppose les conventions Claude Code (eval/check-skill.sh, staging/, /goal) et une création de dossier via PowerShell sous Windows.
  • L'entretien se déroule une question par tour, ce qui impose plusieurs échanges.
Quand l'utiliser

À utiliser lorsqu'on veut fixer un objectif vérifiable avant de rédiger une nouvelle skill.

Quand l'éviter

À éviter si la skill existe déjà (préférer /goal-improve-skill) ou si l'on souhaite écrire directement le SKILL.md.

Analyse de sécurité

Sûr
Score qualité80/100

This skill performs no code execution beyond creating a staging directory and writing a single markdown sidecar. There are no network calls, no shell pipelines, no credential or token handling, no `curl|sh`, no recursive deletes, and no attempts to disable safety mechanisms. The only mutation is an author-invoked file write into a scoped `staging/<name>/` path that is guarded by an overwrite prompt, so the listing risk is minimal.

Points d'attention
  • •Writes/creates directories under `staging/<name>/` and can overwrite an existing `goal.md`, but explicitly reads the file and asks overwrite/edit/abort first
Comment cette analyse est faite

Exemples

Goal for a PR-summary skill
/goal-new-skill summarizing-prs
Define a goal with no name yet
I want to build a new skill but I haven't picked a name — help me define its goal first.
Goal for an issue-triage skill
/goal-new-skill triaging-issues

description: Interview the author and write a goal.md sidecar that anchors a new skill from manual practice through harness-clean SKILL.md

Purpose

The user invoked /goal-new-skill $ARGUMENTS. They want to anchor a not-yet-written skill with a measurable /goal condition so the work toward "skill exists and passes the harness" is driven by a verifiable end state, not vibes.

This command does not write SKILL.md or tests.md. Those come from the manual practice runs CLAUDE.md mandates. This command writes a single artifact — staging/<name>/goal.md — and prints the /goal line for the user to invoke separately.

Steps

  1. Parse the argument.

    • $ARGUMENTS should be a kebab-case skill name in gerund form (e.g. summarizing-prs, triaging-issues).
    • If empty, ask: "What's the skill name? (kebab-case, prefer gerund form like processing-pdfs.)"
    • If it contains uppercase, spaces, or fails ^[a-z0-9-]+$, push back and ask for a fix.
    • If the first hyphen-separated segment doesn't end in -ing, point that out (CLAUDE.md prefers gerunds) but accept the user's call.
    • Set <name> to the validated value for the rest of this run.
  2. Check for existing artifacts.

    • If staging/<name>/goal.md already exists, read it and ask whether to overwrite, edit, or abort.
    • If .claude/skills/<name>/ or examples/<name>/ already exists, point that out — the skill may already be authored and the user might want /goal-improve-skill instead.
  3. Interview, one question per turn, in plain chat. Wait for each answer before asking the next. Do NOT use AskUserQuestion — the answers are open-ended.

    • Q1 (Task): "In one sentence, action verb first: what concrete task should this skill perform? (Example: 'Summarize a GitHub PR diff into a 5-bullet changelog entry.')"
    • Q2 (Verifiable success): "What does a single successful run of that task produce that you can point at? Describe the output shape concretely. (Example: 'A fenced markdown block with exactly 5 bullets, each ≤120 chars, naming the changed top-level modules.')"
    • Q3 (Three practice inputs): "Name three distinct inputs you'll exercise the manual runs against. Aim for diversity — golden path, an edge case, and something weird (empty / malformed / oversized). Real inputs, not hypotheticals."
    • Q4 (Out of scope): "What is this skill explicitly NOT trying to do? List 1–3 anti-goals so the practice runs don't drift."
  4. Synthesize the /goal condition. Build one string ≤4000 chars with the four parts the official /goal docs reward — end state, stated check, constraints, turn bound. Use this exact template, substituting answers:

    I have performed <task> manually on three distinct inputs: <input-1>, <input-2>, <input-3>. Each run is captured in staging/<name>/tests.md as a separate scenario with the actual input, the actual output, and a `Last verified: <today>` line at the top. staging/<name>/SKILL.md exists with frontmatter that has a third-person `description` covering both what the skill does and when to use it, and the body documents the workflow I just exercised. `eval/check-skill.sh staging/<name>` exits 0 with zero FAILs. The skill must NOT <anti-goals from Q4>. Or stop after 30 turns.
    

    Today's date comes from the currentDate system reminder.

  5. Write staging/<name>/goal.md with the structure below. Create staging/<name>/ if it doesn't exist (use Bash mkdir -p via PowerShell New-Item -ItemType Directory -Force since this is Windows).

  6. Print the launch instructions to the user — see Output section.

goal.md structure

# Goal — <name>

**Created:** <today's date>
**Workflow:** new-skill
**Target:** staging/<name>/

## End state

<one-sentence restatement of Q1 + Q2 — what "done" looks like>

## How Claude proves it

- `eval/check-skill.sh staging/<name>` exits 0
- `staging/<name>/tests.md` has ≥3 scenarios with a `Last verified` date, each capturing one practice run
- `staging/<name>/SKILL.md` has a third-person `description` field that includes both *what* and *when*

## Constraints

- Every kept iteration of SKILL.md must pass the harness with zero FAILs
- Practice runs must use the three inputs below, not invented ones
- tests.md scenarios must include actual outputs from real runs (no fabricated examples)

## Practice inputs

1. <input-1>
2. <input-2>
3. <input-3>

## Out of scope

- <anti-goal 1>
- <anti-goal 2>

## Synthesized /goal condition

/goal <full condition string>


## Interview transcript

- **Task:** <Q1 answer>
- **Verifiable success:** <Q2 answer>
- **Practice inputs:** <Q3 answer>
- **Out of scope:** <Q4 answer>

Output

After writing the file, print verbatim:

Goal drafted: staging/<name>/goal.md

Run this in chat to start working toward it:

  /goal <synthesized condition>

The first practice run begins as soon as you invoke /goal. Edit goal.md and re-run /goal-new-skill if you want to refine first.

Constraints

  • Do NOT write SKILL.md, tests.md, or any other skill file. The goal anchors future work; it does not do that work.
  • Do NOT invoke /goal yourself — slash commands cannot call other slash commands. Print the line so the user runs it.
  • If the user's answers are too vague to synthesize a measurable condition (e.g. Q2 = "good output"), push back once with a specific request for concreteness before accepting.

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/new-skill-goal-creation-mrwake2a/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/new-skill-goal-creation-mrwake2a' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/new-skill-goal-creation-mrwake2a/download' --output '.skill-downloads/new-skill-goal-creation-mrwake2a/SKILL.md.part' && mv '.skill-downloads/new-skill-goal-creation-mrwake2a/SKILL.md.part' '.skill-downloads/new-skill-goal-creation-mrwake2a/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/new-skill-goal-creation-mrwake2a/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