Boucle d'amélioration de compétence avec validation humaine

VérifiéSûr

Exécute une compétence contre des scénarios de test, diagnostique les échecs, propose un changement à la fois et attend l'approbation humaine avant d'appliquer.

Spar Skills Guide Bot
DeveloppementIntermédiaire
22/07/2026
Claude Code
#skill-improvement#human-in-the-loop#prompt-engineering#evaluation#meta-skill

Recommandé pour

Synthèse automatique

Une boucle d'amélioration de skills, à validation humaine, qui teste un SKILL.md sur des scénarios, diagnostique les échecs et propose une seule modification à la fois, sans jamais éditer le fichier avant accord explicite.

Points forts

  • Sépare clairement les rôles Executor, Analyst et Mutator, avec un format de rapport imposé à chaque étape
  • N'applique jamais de changement sans un « approve » humain explicite dans la session
  • Impose un seul axe de correction (cause racine unique) et une seule stratégie de mutation par tour, ce qui évite les réécritures massives
  • Détecte les fichiers cœur de Yana AI et refuse de les modifier via ce pipeline

Limites

  • L'exécution des scénarios est le plus souvent « mentale », donc le score et le diagnostic restent subjectifs
  • Plafonné à 5 tours, avec sortie du cycle laissant les échecs restants à traiter manuellement
  • Suppose une arborescence et des conventions propres à l'écosystème Yana AI (.tasks/, core/hooks/) qui n'existent pas partout
Quand l'utiliser

À utiliser lorsqu'un SKILL.md existant échoue de façon répétée sur certains cas et que vous voulez une correction ciblée, tracée et approuvée pas à pas.

Quand l'éviter

À éviter pour créer un skill de zéro, pour des fichiers cœur sensibles, ou lorsque vous voulez des modifications automatisées et non supervisées.

Analyse de sécurité

Sûr
Score qualité88/100

The skill is a human-gated file-editing workflow with explicit approval before any mutation, a revert rule when scores do not improve, and protections against editing designated core paths. It does not instruct destructive commands, secret exfiltration, network calls, or obfuscated payloads. Residual risk is limited to ordinary file modification under human approval.

Points d'attention
  • •No allowed-tools are declared, so runtime file-read/write capability depends on the host agent; the workflow may fail or behave inconsistently if editing tools are unavailable.
  • •The skill can apply edits to an arbitrary `$ARGUMENTS` path once the human approves; a mistaken approval could modify an unintended file, though core paths are explicitly blocked and the human gate is strong.
Comment cette analyse est faite

Exemples

Improve a flaky skill
/improve-skill skills/pdf-extract/SKILL.md
Diagnose failures on an existing skill
Run the improvement pipeline on ./skills/release-notes/SKILL.md — it keeps mishandling empty changelogs,
Test-then-patch a slash command skill
/improve-skill .claude/skills/code-review/SKILL.md and show me the first proposal before changing anything

description: Human-gated skill self-improvement loop. Runs a skill against test scenarios, diagnoses failures, proposes ONE change at a time, and waits for human approval before applying anything. Usage: /improve-skill path/to/SKILL.md argument-hint: <path to SKILL.md>

You are running the skill improvement pipeline on: $ARGUMENTS

This is a human-gated loop. You NEVER edit files without explicit approval in this session. The Mutator proposes; the human commits.


Before You Start

  1. Read $ARGUMENTS — understand the skill's stated goal and constraints.
  2. If $ARGUMENTS is missing or the file does not exist, stop and ask the user.
  3. Check if $ARGUMENTS is a Yana AI core file (path contains core/hooks/, core/scripts/, or gates/). If so, stop and tell the user:

    "This is a Yana AI core file. Changes require a separate approval cycle — do not run /improve-skill on it directly."

State the skill's goal in one sentence before proceeding.


Step 1 — Executor

Design 3–5 test scenarios that cover:

  • The happy path (skill used as intended)
  • At least one edge case (ambiguous input, missing context, boundary condition)
  • At least one failure mode (what the skill was designed to prevent)

If the skill file contains example inputs, use those as scenarios. If a .tasks/ directory exists, check for task files that reference this skill.

For each scenario:

  • State the input
  • Run the skill mentally (or with a real invocation if it's a slash command)
  • Judge the output: pass (met stated goal) / fail (did not meet stated goal)
  • One sentence on why

Report:

EXECUTOR SCORE: N/M passed

Scenario 1: [input] → PASS — [reason]
Scenario 2: [input] → FAIL — [reason]
...

If all scenarios pass (N/M = M/M), skip to the Exit section.


Step 2 — Analyst

For each failing scenario, identify ONE root cause. Choose from:

| Root cause type | Meaning | |------------------|------------------------------------------------------------| | missing_example | Skill has no example showing this case | | missing_constraint | Skill lacks a rule that would prevent this failure | | restructure | Instructions are ambiguous or ordered incorrectly | | missing_edge_case | Skill does not mention this input class at all |

Pick the ONE root cause that covers the most failures. Pick the ONE mutation strategy that addresses it.

Report:

ANALYST:
  Root cause: [type] — [one sentence explanation]
  Mutation strategy: [add_example | add_constraint | restructure | add_edge_case]
  Covers: [list of failing scenario numbers]

Step 3 — Mutator

Describe the exact change in plain text. Show the diff between current text and proposed text:

MUTATOR PROPOSAL:

Location: [section name or line description in the skill file]

CURRENT:
  [exact current text]

PROPOSED:
  [exact proposed text]

Expected effect: [one sentence — why this fixes the root cause]

STOP HERE. Do NOT apply the change. Do NOT edit the file. Wait for the human to respond with "approve" or "reject".


Step 4 — Human Gate

If approved:

  • Apply the exact change described in Step 3 to $ARGUMENTS.
  • Confirm: "Applied. Re-running Executor…"
  • Return to Step 1 with round counter incremented.

If rejected:

  • Do NOT apply the change.
  • Return to Step 2 — Analyst picks the next best mutation strategy.
  • If no remaining strategies, report: "No further strategies available for current failures. Human intervention required."

Exit Conditions

Stop the loop when any of these is true:

| Condition | Message | |-----------|---------| | Score = 100% | "All scenarios pass. Skill improvement complete." | | Round 5 reached | "Max 5 rounds reached. Final score: N/M. Remaining failures need manual review." | | Human says stop | "Stopping at human request. Final score: N/M." |

At exit, summarise:

  • Rounds completed
  • Changes applied (list each, one line per round)
  • Final score
  • Remaining failures (if any) with suggested next steps

Hard Rules

  • Mutator NEVER edits files without explicit approval in this session.
  • If the score does not improve after applying a change, revert it immediately and report: "Score did not improve — reverting change."
  • Changes to core/hooks/, core/scripts/, or gates/ files require a separate approval cycle — do not include them in this pipeline.
  • Do not run more than one mutation per round — one change, one test, one verdict.
  • Do not ask "should I continue?" between rounds unless the human has not responded — keep the loop moving until an exit condition is met.

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/human-gated-skill-improvement-loop-mrwake1x/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/human-gated-skill-improvement-loop-mrwake1x' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/human-gated-skill-improvement-loop-mrwake1x/download' --output '.skill-downloads/human-gated-skill-improvement-loop-mrwake1x/SKILL.md.part' && mv '.skill-downloads/human-gated-skill-improvement-loop-mrwake1x/SKILL.md.part' '.skill-downloads/human-gated-skill-improvement-loop-mrwake1x/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/human-gated-skill-improvement-loop-mrwake1x/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