Passation de session

VérifiéSûr

Générer ou reprendre un fichier HANDOFF.md pour assurer la continuité du travail entre sessions Claude Code, avec vérification anti-hallucination.

Spar Skills Guide Bot
ProductiviteIntermédiaire
22/07/2026
Claude Code
#handoff#session-continuity#context-management#anti-hallucination#verification

Recommandé pour

Synthèse automatique

Rédige ou reprend un fichier HANDOFF.md à la racine du projet afin qu'une nouvelle session Claude Code puisse poursuivre le travail sans répéter les impasses.

Points forts

  • Protocole de vérification obligatoire avant toute rédaction (git status/log/diff, relecture des fichiers, ré-exécution des tests) avec étiquetage de confiance [V]/[?] pour limiter les hallucinations
  • Budget de longueur strict (≤250 lignes visées, plafond 400) qui interdit de sacrifier les sections Failed approaches, Known traps, Verified state et Next steps
  • Archive le handoff existant dans .handoffs/<horodatage> et reporte les pièges non résolus en les re-taguant [!] s'ils ne sont pas revérifiés
  • Détection proactive de la dégradation de session : une seule phrase de suggestion, jamais d'écriture du fichier sans confirmation

Limites

  • Le mode RESUME n'est décrit que partiellement dans le fichier fourni
  • La vérification systématique impose une surcharge réelle (commandes git, relectures, exécution des tests) avant même d'écrire
  • Fortement lié à l'écosystème Claude Code (commande /handoff, CLAUDE.md) et suppose un dépôt git ou une relecture manuelle des fichiers
Quand l'utiliser

À utiliser lorsqu'on met fin ou en pause une session dont le travail doit se poursuivre dans une nouvelle session, ou lorsqu'on reprend un projet contenant déjà un HANDOFF.md.

Quand l'éviter

Inutile pour une tâche courte et autonome qui n'aura pas de suite dans une nouvelle session.

Analyse de sécurité

Sûr
Score qualité88/100

This is a pure documentation/workflow skill with no declared tools and no executable payload. The commands it instructs an agent to run (git status/log/diff, project test/build/lint commands, reading and archiving files) are read-mostly, legitimate developer operations performed on the local repo. There is no network access, no curl|sh, no credential or secret handling, no obfuscation, no destructive deletion (old handoffs are archived, not removed), and no instruction to disable safety checks. The only write actions are creating/archiving HANDOFF.md and an optional .gitignore line, and it explicitly forbids acting without user confirmation.

Aucun point d'attention détecté

Comment cette analyse est faite

Exemples

Create a handoff at session end
Create a handoff — I have to stop here, we were mid-refactor of the auth module.
Resume from an existing handoff
Pick up where we left off, read the HANDOFF.md at the root and continue from the next steps.
Degradation symptom trigger
This session feels off — you just re-explored the migration plan we already settled. Want to run /handoff so a fresh session picks up cleanly?

name: handoff description: Use when ending or pausing a Claude Code session whose work must continue in a fresh session — user says "create a handoff", "write a handoff", "I'm ending this session", "prepare for a fresh session", "hand this off", or "/handoff" — or when starting a session in a project that already contains a HANDOFF.md at the root ("resume", "pick up where we left off", "continue from the handoff"). Also relevant when a session shows degradation symptoms — Claude contradicted an earlier decision, re-explored something already established, hallucinated file contents, or the user says the session "feels off", "is getting confused", or "context is running low".

Handoff

Overview

Write (or resume from) a HANDOFF.md at the project root so a fresh Claude Code session can continue this work without repeating dead ends. The file is written for the next Claude session, not for the human.

Core principle: this skill runs when your memory is least reliable. Nothing goes in the file from memory alone — every claim is verified against the repo NOW, or explicitly marked as unverified.

Mode selection

  • HANDOFF.md exists at project root AND this session did NOT just write it → RESUME mode
  • Otherwise → CREATE mode

Proactive suggestion rule

If you notice degradation (you contradicted an earlier decision, re-derived something already settled, misremembered a file), say ONE sentence — "This session may be degrading (⟨specific symptom⟩). Want me to run /handoff so a fresh session picks up cleanly?" — and STOP. Never write the file without confirmation.

CREATE mode

Step 1 — Archive any existing handoff

If HANDOFF.md exists at root:

  1. Read its Failed approaches and Known traps sections. Carry forward entries still relevant and unresolved — re-tagged [?] unless re-verified in Step 2.
  2. Move the file to .handoffs/<ISO-timestamp>-handoff.md (create the directory if needed).
  3. If a .gitignore exists and lacks .handoffs/, add it.

Step 2 — Verify BEFORE writing (anti-hallucination protocol)

Do this before drafting a single line. The rule: a claim may be tagged [V] only if confirmed by a command or file read during THIS handoff run. What you merely remember is [?].

  1. Orient in reality. Git repo: run git status, git log --oneline -15, git diff --stat. No git: list the directories you believe you touched and re-read those files. Reconstruct what actually changed vs. what you believe changed.
  2. Re-read, don't recall. Re-open every file the handoff will mention. Any quoted code or line number must come from the fresh read. File not where memory says? That's a caught hallucination — correct it, don't paper over it.
  3. Re-run ground truth. Run the project's test/build/lint command. "Tests pass" is written only from output produced in this run — otherwise it's [?].
  4. No invention. Can't verify it and don't clearly remember it? Omit it. An honest gap beats confident fiction.
  5. If many claims end up [?], write at the top: "Low-confidence handoff — verify aggressively."

Step 3 — Write HANDOFF.md

Copy assets/HANDOFF.template.md structure exactly. Fill every section; the template's HTML comments show what a good vs. useless entry looks like — read them, then delete them from the output.

Length budget: target ≤250 lines (~2,000 words); hard ceiling 400 lines. The handoff must fit in a fresh context alongside CLAUDE.md and initial exploration. Over budget? Cut in this order: drop narrative prose → compress Decisions to one line each → NEVER cut Failed approaches, Known traps, Verified state, or Next steps.

Quality gate — apply to every entry before keeping it: "Would a stranger with only this line avoid the mistake we made?" If not, add the file, the line, the reason, or delete the entry.

RESUME mode

  1. Read HANDOFF.md fully before doing any other work.
  2. Re-verify — the file may be stale or was written by a degraded model. Run git log/git status/git diff against the SHA in the header; re-run the tests. Confirm each [V] claim still holds; resolve [?] claims if cheap. Report drift explicitly: "handoff said X, repo now shows Y."
  3. Surface the Open questions to the user. Do not guess past a blocked step.
  4. Confirm the plan. Restate next steps adjusted for drift; get a go-ahead.
  5. Proceed. Leave HANDOFF.md in place — the next CREATE run archives it.

Rationalizations — all of these mean STOP

| Excuse | Reality | |---|---| | "I remember the session clearly, no need to re-verify" | This skill runs precisely because memory is degraded. Verify or tag [?]. | | "Tests were passing earlier" | Earlier ≠ now. Re-run them or write [?]. | | "A summary is enough — 'fixed several bugs'" | A stranger can't avoid a dead end from a summary. Which bug, which file, which failed approach first. | | "Context is nearly full, skip verification to save tokens" | An unverified handoff poisons the NEXT session too. Verification is the non-negotiable part; cut prose instead. | | "The old handoff is outdated, just delete it" | Archive it. Its dead-ends section may be the only record of what not to retry. | | "I'll pad thin sections so the file looks complete" | Invention is worse than a gap. Write "not started, no design chosen" honestly. | | "The user is in a hurry — auto-run the handoff" | Suggest, never auto-execute. One sentence, then stop. |

Red flags — catch yourself

  • Writing a file path or line number you didn't re-read this run
  • Typing "tests pass" without test output in this run's transcript
  • An entry with no file reference and no specific reason
  • HANDOFF.md creeping past 400 lines
  • Resuming work without having re-run verification against the header SHA

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

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/session-handoff-mrwakfas/SKILL.md' && test -s '.skill-downloads/session-handoff-mrwakfas/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/handoff' && cp -R '.skill-downloads/session-handoff-mrwakfas' '.claude/skills/handoff'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/session-handoff-mrwakfas'

openskills read 'session-handoff-mrwakfas'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

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/session-handoff-mrwakfas/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