guard
An agent skill by garrytan, from garrytan/gstack. Tags: security, validation, workflow.
What it does
Full safety mode: destructive command warnings + directory-scoped edits. (gstack)
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add garrytan/gstack --skill guard
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/garrytan/gstack
cp -r gstack/guard ~/.claude/skills/guard
Safety box score
Grade B, low risk: 18 of 100 risk points, rated 2026-10-20. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill wires several PreToolUse hooks into local gstack helper scripts and asks the user for a persistent edit boundary. Its main reach is local shell execution on tool use plus persistent state writes under the user’s `~/.claude`/gstack area; it does not show network access or privilege escalation in the visible file.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | The skill runs local shell commands for multiple tool types, e.g. `bash -c "exec bash \"$HOME/.claude/skills/gstack/careful/bin/check-careful.sh\""` and `.../freeze/bin/check-freeze.sh`. |
| Network access | 0 (none) | The visible skill defines no remote downloads, uploads, or API calls; it only invokes local helper scripts and writes local state. |
| Filesystem reach | 2 (moderate) | It persists state in the user’s home-managed gstack area, including `"$GSTACK_STATE_ROOT"/analytics/skill-usage.jsonl`, and it sets a durable edit boundary with `freeze-state.sh set "<user-provided-path>"`. |
| Secrets & credentials | 0 (none) | No credential stores, token files, `.env` files, keychains, or browser sessions are referenced in the visible instructions. |
| Privilege & persistence | 0 (none) | There is no `sudo`, service install, global package install, or OS/shell configuration change shown in the skill. |
| Instruction hijack surface | 0 (none) | The file contains normal setup text and no hidden prompts, instruction overrides, or requests to ignore higher-priority rules. |
| Irreversible actions | 0 (none) | The skill only warns and restricts edits; it does not itself push, publish, send messages, pay, or delete resources. |
| Transparency | 1 (low) | Behavior is delegated to helper scripts under `~/.claude/skills/gstack/...` (`check-careful.sh`, `check-freeze.sh`, `freeze-state.sh`), but those scripts were not included in the visible file set. |
Before installing
- Read the referenced helper scripts under `~/.claude/skills/gstack/careful/bin/` and `.../freeze/bin/` first.
- Confirm where `$GSTACK_STATE_ROOT` points and whether the analytics write is acceptable.
- Test `/guard` in a scratch repo and verify the chosen boundary path before running `freeze-state.sh set`.
Rated 2026-10-20 by an automated review of 1 file from the skill's repository.
Source
- Repository
- garrytan/gstack (all skills from this repository)
- Path
- guard/SKILL.md
- Branch
- main
- Updated
- 2026-10-05
Related skills
- careful — Safety guardrails for destructive commands. (gstack)
- marketplace-health-check — Run a full 6-dimension health check of this Claude Code skills marketplace repo — code/script safety, documentation/SSOT consistency, security/PII leaks.
- agents-harden — Use when preparing your agent for production — IAM scoping, inbound auth (JWT, SigV4), secrets management, cold start optimization, session lifecycle.
- agents-pay — Use when THIS agent needs to pay for x402-protected content at runtime: hitting a paywall mid-task, settling it via AgentCore Payments.
- aws-cloudformation — Authors, validates, and troubleshoots AWS CloudFormation templates.
- aws-iam — Provides verified corrections for IAM behaviors that AI agents frequently get wrong — policy evaluation edge cases, trust policy gotchas, STS session limits.