gs:guard

gs:guard is a skill for Claude Code, Codex from thanh-abaii/gstack-windows-port. It costs 94 tokens per session (961 once invoked), scanned C, original, MIT.

A safety mode for coding work that warns about destructive commands and restricts edits to a chosen directory. Destructive commands include actions such as deleting files, dropping database tables, force-pushing code, or resetting Git history.

In plain words
What is it for?
Use it when debugging live systems, touching production, or requiring warnings and scoped edits before potentially dangerous operations.
Why use it?
It adds safeguards when working near production systems or making risky changes. The directory restriction also helps prevent accidental edits outside the intended area.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also agents/openai.yaml present. Also seen: names the AskUserQuestion tool; built for gstack.

Good fit Use it when debugging live systems, touching production, or requiring warnings and scoped edits before potentially dangerous operations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thanh-abaii/gstack-windows-port/gstack-guard
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add thanh-abaii/gstack-windows-port --skill gstack-guard
Clone the repo
git clone --depth 1 https://github.com/thanh-abaii/gstack-windows-port

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gs:guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/thanh-abaii/gstack-windows-port/gstack-guard/github.svg)](https://agentmods.dev/skills/thanh-abaii/gstack-windows-port/gstack-guard)
Your own site
<a href="https://agentmods.dev/skills/thanh-abaii/gstack-windows-port/gstack-guard"><img src="https://agentmods.dev/badge/skills/thanh-abaii/gstack-windows-port/gstack-guard/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gs:guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/thanh-abaii/gstack-windows-port/gstack-guard"><img src="https://agentmods.dev/badge/skills/thanh-abaii/gstack-windows-port/gstack-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 961 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00094 $0.00961
Opus 5.5 $0.00038 $0.00384
Sonnet 5.5 $0.00019 $0.00192
Haiku 4.5 $0.00009 $0.00096

Measured 3mo ago against content hash 05f53ad2ea06, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

gs:guard scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

Combines /gs:careful (warns before rm -rf, DROP TABLE, force-push, etc.) with
skills/gstack-guard/SKILL.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Preamble (run first)

python "bin/gstack-boot.py" --skill guard | iex

Safety Advisory: This skill includes safety checks that check bash commands for destructive operations (rm -rf, DROP TABLE, force-push, git reset --hard, etc.) before execution, and verify file edits are within the allowed scope boundary before applying, and verify file writes are within the allowed scope boundary before applying. When using this skill, always pause and verify before executing potentially destructive operations. If uncertain about a command's safety, ask the user for confirmation before proceeding.

/gs:guard — Full Safety Mode

Activates both destructive command warnings and directory-scoped edit restrictions. This is the combination of /careful + /freeze in a single command.

Dependency note: This skill references hook scripts from the sibling /careful and /freeze skill directories. Both must be installed (they are installed together by the gstack setup script).

New-Item -ItemType Directory -Force ~/.gstack/analytics
echo '{"skill":"guard","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel | Out-Null)" | Out-Null ; echo "unknown")'"}'  >> ~/.gstack/analytics/skill-usage.jsonl | Out-Null ; true

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) — the user types a path.

Once the user provides a directory path:

  1. Resolve it to an absolute path:
FREEZE_DIR=$(cd "<user-provided-path>" | Out-Null ; pwd)
echo "$FREEZE_DIR"
  1. Ensure trailing slash and save to the freeze state file:
FREEZE_DIR="${FREEZE_DIR%/}/"
STATE_DIR="${CLAUDE_PLUGIN_DATA:-$HOME/.gstack}"
New-Item -ItemType Directory -Force "$STATE_DIR"
echo "$FREEZE_DIR" > "$STATE_DIR/freeze-dir.txt"
echo "Freeze boundary set: $FREEZE_DIR"

Read the full file on GitHub · 100 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 100 lines · 94 tokens per session scan C 05f53ad2ea06

Subscribe to this mod's changes

gs:guard is a skill published in the GitHub repository thanh-abaii/gstack-windows-port (36 stars, last pushed 2mo ago), licensed MIT. It adds 94 tokens to every session and 961 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

gs:guard compared with skills from other repositories

gs:guard next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gs:guardthanh-abaii/gstack-windows-portSkill362mo agoMITC94Claude Code, Codex
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82ktodayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill333k7d agoMITA21Claude Code