guard
guard
Catalogue généré le 2026-05-11
En une phrase
FullMode safety« mode:sécurité destructivemaximale command» warnings: +Claude directory-scopedt'avertit edits.avant chaque commande destructrice ET t'empêche de modifier des fichiers hors d'un dossier précis.
Quand l'utiliser
UseQuandfortumaximumtravaillessafetysurwhendetouchinglaprodproductionorendebuggingdirectliveetsystems.tu veux zéro accidentUseQuandwhentuaskeddébuggestoun"guardsystèmemode",critique"fulletsafety",tu"lockveuxitlimiterdown",leorpérimètre"maximumdessafety".modifications
/careful + /freeze activée en une seule commande
Avant de toucher à n'importe quoi qui pourrait coûter cher si ça casse
Comment l'invoquer
- Slash command :
/guard(siàexposétaper danstonClaudeCLI)Code) - Phrases déclencheurs (texte) :
voir"guardlamode"description/complète"fullci-dessoussafety" / "lock it down" / "maximum safety" - Auto-invocation :
surSur demande explicite
Description complètedétaillée
Full safety mode: destructive command warnings + directory-scoped edits. Combines /careful (warns before rm -rf, DROP TABLE, force-push, etc.) with /freeze (blocks edits outside a specified directory). Use for maximum safety when touching prod or debugging live systems. Use when asked to "guard mode", "full safety", "lock it down", or "maximum safety". (gstack)
Pour aller plus loin
/guard —active Fulldeux Safetyprotections Mode
d'un Activatescoup. bothLa destructivepremière commandvient warnings and directory-scoped edit restrictions.
This is the combination ofde /careful +: avant d'exécuter une commande potentiellement destructrice (rm -rf, DROP TABLE, git push --force, git reset --hard, kubectl delete, docker system prune, etc.), Claude s'arrête et te demande confirmation. Tu peux toujours autoriser, mais tu ne peux pas le faire sans le voir. Certains cas évidents (rm -rf node_modules, rm -rf .next, etc.) restent autorisés sans alerte.
La seconde vient de /freeze in: atu singlechoisis command.un dossier précis (par exemple src/auth/) et toutes les modifications de fichiers en dehors de ce dossier sont bloquées. Quand le skill démarre, il te demande où placer cette frontière, puis enregistre le dossier dans son fichier d'état.
DependencyLes note:deux Thisprotections skillfonctionnent referencesvia hookdes scripts« fromhooks the» siblingClaude Code qui interceptent chaque appel aux outils Bash, Edit et Write avant exécution. Tu vois passer un statut « Checking for destructive commands… » ou « Checking freeze boundary… » à chaque action sensible. Pour relâcher la contrainte sur le dossier, tu lances /. carefulunfreezeandPour tout /freezeskilldésactiver, directories.tu Bothtermines mustla be installed (they are installed together
by the gstack setup script).
Setup
Ask the user which directory to restrict edits to. Use AskUserQuestion:
OnceC'est the user provides a directory path:
Resolve it to an absolute path:
Ensure trailing slash and save to the freeze state file:
Tell the user:
(extraitsoit —utile voirmais lequ'il SKILL.mdne completpuisse pourpas latout suite)casser par excès de zèle.
Source
- Plugin :
gstack - Nom interne :
guard - Fichier :
/home/thymon/.claude/skills/gstack/guard/SKILL.md