Point de contrôle de push

VérifiéPrudence

Exécute le point de contrôle qualité tous les 10 pushs : revue de code ciblée et passe de débogage (tests et lint).

Spar Skills Guide Bot
DeveloppementIntermédiaire
26/08/2026
Claude Code
#code-review#quality-gate#git#testing#linting

Recommandé pour

Synthèse automatique

Ce skill exécute un point de contrôle qualité tous les 10 pushes : une revue de code limitée aux commits accumulés depuis le dernier checkpoint, suivie d'une passe de débogage tests-et-lint.

Points forts

  • Délimite précisément la revue grâce au SHA du dernier checkpoint stocké dans .claude/state/last-checkpoint
  • Combine revue de code et vérification réelle du build (pytest, ruff) en un seul rapport consolidé
  • Interdit explicitement de contourner les tests rouges (skip, xfail, assertions affaiblies) et distingue les échecs préexistants de ceux introduits par le lot
  • Ne corrige automatiquement que les problèmes petits et sans ambiguïté, le reste étant escaladé avec une proposition

Limites

  • Le déclenchement automatique dépend d'un hook externe (push-counter.py) : sans lui, la cadence ne se produit pas toute seule
  • Les commandes de vérification sont écrites pour un projet Python (pytest/ruff) et supposent une adaptation manuelle pour d'autres stacks
  • Suppose que .claude/state/ est gitignored et local à chaque checkout, donc pas de suivi partagé entre environnements
Quand l'utiliser

À utiliser lorsqu'un hook signale un multiple de 10 pushes, via /push-checkpoint, ou quand on veut revoir un lot récent de travail en bloc.

Quand l'éviter

À éviter pour une revue ponctuelle d'une seule modification ou pour un refactoring de grande ampleur, que ce checkpoint ne prend volontairement pas en charge.

Analyse de sécurité

Prudence
Score qualité88/100

The skill executes bash commands (git, cat, pytest, ruff, and potentially repo-defined checks) for a legitimate code review and debug workflow. There is no destructive, exfiltrating, or obfuscated action, but running arbitrary project-defined commands introduces a moderate risk if the repository contains malicious configuration, so caution is warranted.

Points d'attention
  • •Runs shell commands including project-defined test/lint commands from pyproject.toml, Makefile, or CI config, which could execute arbitrary code if the repository is malicious or compromised.
  • •Writes to .claude/state/last-checkpoint, modifying local state, but no destructive or exfiltrating behavior.
Comment cette analyse est faite

Exemples

Checkpoint automatique
The hook says I just hit push 30 — run the push checkpoint for everything since the last one.
Revue de lot explicite
/push-checkpoint — review the last batch of work and tell me if the tree is still healthy.
Bilan depuis la dernière revue
What has accumulated since the last checkpoint? Review it and run the tests and lint.

name: push-checkpoint description: Run the every-10-pushes quality checkpoint — a scoped code review of everything since the last checkpoint, plus a test-and-lint debug pass. Use this skill whenever a hook reports that a push count hit a multiple of 10, whenever the user types /push-checkpoint, and whenever the user asks for a checkpoint, a periodic review, a "review the last batch of work" pass, or asks what has accumulated since the last review. Prefer this over an ad-hoc review whenever the request is about reviewing recent pushes as a batch.

Push Checkpoint

A periodic quality gate. Every 10 successful pushes, review what accumulated and confirm the project still builds clean — so problems surface on a cadence instead of piling up until release.

This skill does two things: a scoped review, then a debug pass. Do both, in order, and report once at the end.

How this gets triggered

.claude/hooks/push-counter.py runs after every Bash call, counts successful git push commands in .claude/state/push-count, and asks for this skill on every 10th. The user can also run /push-checkpoint at any time.

Skills cannot fire themselves on an event — the hook is what makes the cadence automatic. If the checkpoint never fires on its own, the hook is the thing to debug, not this file.

Step 0 — establish the range

Find the last checkpoint and scope all work to what came after it:

cat .claude/state/last-checkpoint 2>/dev/null || echo "(no previous checkpoint)"
git rev-parse HEAD
  • If a SHA is recorded, the range is <sha>..HEAD.
  • If not (first ever checkpoint), fall back to the last 10 commits: HEAD~10..HEAD, or the full history if the repo is shorter than that.

Confirm the range is non-empty before continuing:

git diff --stat <range>

If the range is empty, say so and stop — there is nothing to check, and the counter should still be reset in step 3.

Step 1 — review

Invoke the built-in code-review skill scoped to that range (pass the range as its target). Review the batch, not all of history.

Report findings ranked most-severe first. Apply a fix yourself only when it is small, local, and unambiguous — a clear bug, a typo, a missing guard. Anything larger gets described, not silently changed: this is a checkpoint, not a refactoring session.

Step 2 — debug

There is no /debug skill; this is the debug step. Run the project's own checks and triage anything that fails.

For this repository (Python):

python3 -m pytest -q
python3 -m ruff check .

If the project layout changes, run whatever the real checks are — prefer what pyproject.toml, a Makefile, or CI config actually defines over the commands above.

For each failure, find the root cause before proposing anything. Do not paper over a red test:

  • Never skip, disable, or xfail a test to get green.
  • Never loosen an assertion to match wrong output.
  • A failure that reproduces on the base branch too is pre-existing — say so, and keep it separate from failures this batch introduced.

Fix what is small and certain. Escalate the rest with a concrete proposal.

Step 3 — record the checkpoint

Only after both steps are done:

git rev-parse HEAD > .claude/state/last-checkpoint

This is what keeps the next checkpoint scoped to the next batch. .claude/state/ is gitignored, so the counter and the checkpoint SHA stay local to each checkout.

Step 4 — report

One consolidated summary:

  • Range — the commit span reviewed, and how many commits it covered.
  • Review — findings by severity; what you fixed vs. what needs a decision.
  • Debug — test and lint results; root cause for each failure; pre-existing failures called out separately.
  • Verdict — is the tree healthy, or is there something to act on now?

Be direct about a bad result. A checkpoint that always says "all clear" is worthless — if tests fail, lead with that.

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/push-checkpoint-mt9mglwb/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/push-checkpoint-mt9mglwb' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/push-checkpoint-mt9mglwb/download' --output '.skill-downloads/push-checkpoint-mt9mglwb/SKILL.md.part' && mv '.skill-downloads/push-checkpoint-mt9mglwb/SKILL.md.part' '.skill-downloads/push-checkpoint-mt9mglwb/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/push-checkpoint-mt9mglwb/SKILL.md' && test -s '.skill-downloads/push-checkpoint-mt9mglwb/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/push-checkpoint' && cp -R '.skill-downloads/push-checkpoint-mt9mglwb' '.claude/skills/push-checkpoint'

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/push-checkpoint-mt9mglwb'

openskills read 'push-checkpoint-mt9mglwb'

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/push-checkpoint-mt9mglwb/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