Skills DirectoryCurated open-source Skills from GitHub

guardcommit 6237994 · v0.1.0SKILL.md · Hardening

Guard: Full Safety Mode

Turns on destructive-command warnings and a directory-scoped edit boundary together, combining /careful and /freeze in one command.

Registers hooks that block edits outside a directory; the boundary persists after the session until /unfreeze, and usage is logged to a local gstack analytics file.

npx skills add garrytan/gstack --skill guard
Permissions
  • read-repo
  • write-files
  • shell
  • network
Compatible with
Claude Code, Codex, Cursor, Copilot
GitHub
138.5k
Source
Community · Garry Tan
Status
Scan passed
License
MIT
Category
Hardening

Core rule

If the boundary helper fails, never claim the boundary is active and never bypass the shared writer with a direct write or deletion.

Execution Phases

  1. Phase 01Ask for a directory

    Ask the user, via an AskUserQuestion text input, which directory edits should be restricted to.

  2. Phase 02Set the edit boundary

    Set the path with the shared freeze-state.sh set helper; on failure, preserve the state and report how to recover.

  3. Phase 03Confirm both protections

    Tell the user that commands like rm -rf or force-push warn first (catastrophic ones are denied) and edits outside the path are blocked until /unfreeze.

Permissions (summarised from SKILL.md)

CapabilityNeededDetails
File writesNot requiredallowed-tools has no Write or Edit; the skill instead uses hooks to block file edits outside the boundary.
Command executionLimitedOnly runs gstack helpers such as freeze-state.sh, with hooks checking commands for destructive patterns.
Network outboundNot requiredNo network access is needed.

SKILL.md frontmatter (YAML)

SKILL.md frontmatter (YAML)commit 6237994 · v0.1.0
---
name: guard
version: 0.1.0
description: "Full safety mode: destructive command warnings + directory-scoped edits. (gstack)"
triggers:
  - full safety mode
  - guard against mistakes
  - maximum safety
allowed-tools:
  - Bash
  - Read
  - AskUserQuestion
hooks:
  PreToolUse:
    - matcher: "Bash"
      hooks:
        - type: command
          command: 'bash -c "exec bash \"$HOME/.claude/skills/gstack/careful/bin/check-careful.sh\""'
          statusMessage: "Checking for destructive commands..."
    - matcher: "PowerShell"
      hooks:
        - type: command
          command: 'bash -c "exec bash \"$HOME/.claude/skills/gstack/careful/bin/check-careful.sh\""'
          statusMessage: "Checking for destructive commands..."
    - matcher: "Edit"
      hooks:
        - type: command
          command: 'bash -c "exec bash \"$HOME/.claude/skills/gstack/freeze/bin/check-freeze.sh\""'
          statusMessage: "Checking freeze boundary..."
    - matcher: "Write"
      hooks:
        - type: command
          command: 'bash -c "exec bash \"$HOME/.claude/skills/gstack/freeze/bin/check-freeze.sh\""'
          statusMessage: "Checking freeze boundary..."
    - matcher: "NotebookEdit"
      hooks:
        - type: command
          command: 'bash -c "exec bash \"$HOME/.claude/skills/gstack/freeze/bin/check-freeze.sh\""'
          statusMessage: "Checking freeze boundary..."
---

Related skills

A rule scan cannot catch every risk. Read this skill's SKILL.md and check its permissions before installing.