Skip to main content

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

  • UseQuand fortu maximumtravailles safetysur whende touchingla prodproduction oren debuggingdirect liveet systems.tu veux zéro accident
  • UseQuand whentu askeddébugges toun "guardsystème mode",critique "fullet safety",tu "lockveux itlimiter down",le orpérimètre "maximumdes safety".modifications
(gstack)Quand tu donnes la main à Claude sur un projet sensible et tu veux des garde-fous serrés Quand tu veux la combinaison /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 dans tonClaude CLI)Code)
  • Phrases déclencheurs (texte) : voir"guard lamode" description/ complète"full ci-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 /carefulunfreeze. andPour /freezetout skilldé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:

    Question: "Guard mode: which directory should edits be restricted to? Destructive command warnings are always on. Files outside the chosen path will be blocked from editing." Text input (not multiple choice)sessiontheles userhooks typessont a path. session-scopés.

    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:

        "Guardle mode active.à Twoactiver protectionsquand aretu nowveux running:"que Claude

        (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