guard

guard is a skill for Claude Code, Codex from timurgaleev/vibestack. It costs 60 tokens per session (734 once invoked), scanned C, original, MIT.

A safety mode that warns before destructive commands and restricts edits to one chosen directory. Destructive commands are actions such as deleting files, dropping database tables, or force-pushing Git history.

In plain words
What is it for?
Use it when you want warnings for risky commands and a directory boundary that blocks edits elsewhere.
Why use it?
It reduces the risk of damaging data or changing files outside the directory you selected.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/timurgaleev/vibestack/guard
Any agent
npx skills add timurgaleev/vibestack --skill guard
Clone the repo
git clone --depth 1 https://github.com/timurgaleev/vibestack

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 guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/timurgaleev/vibestack/guard.svg)](https://agentmods.dev/skills/timurgaleev/vibestack/guard)
Your own site
<a href="https://agentmods.dev/skills/timurgaleev/vibestack/guard"><img src="https://agentmods.dev/badge/skills/timurgaleev/vibestack/guard.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 734 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00060 $0.00734
Opus 5 $0.00030 $0.00367
Sonnet 5 $0.00012 $0.00147
Haiku 4.5 $0.00006 $0.00073

Measured yesterday against content hash 3bb5952810b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

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 yesterday.

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.

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 sa
skills/guard/SKILL.md · 76 lines

What it actually says

When to invoke

Use when asked to "guard mode", "full safety", "lock it down", or "maximum safety".

/guard — Full Safety Mode

Activates both destructive command warnings and directory-scoped edit restrictions. This is /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 vibestack install script).

Setup

Ask the user which directory to restrict edits to:

"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."

Once the user provides a path:

FREEZE_DIR=$(cd "<user-provided-path>" 2>/dev/null && pwd)
FREEZE_DIR="${FREEZE_DIR%/}/"
STATE_DIR="${VIBESTACK_HOME:-$HOME/.vibestack}"
mkdir -p "$STATE_DIR"
echo "$FREEZE_DIR" > "$STATE_DIR/freeze-dir.txt"
echo "Freeze boundary set: $FREEZE_DIR"

Tell the user:

  • "Guard mode active. Two protections are now running:"
  • "1. Destructive command guard — rm -rf, DROP TABLE, force-push, etc. warn before executing (you can override); catastrophic shapes (recursive delete of / or ~, force-push to the default branch) are blocked outright"
  • "2. Edit boundary — file edits restricted to <path>/. Edits outside this directory are blocked."
  • "To remove the edit boundary, run /unfreeze. To deactivate everything, end the session."

What's protected

See /careful for the two decision tiers, the full pattern list, and the safe exceptions. See /freeze for how edit boundary enforcement works.

Both hooks fail safe when they cannot read a tool payload — /careful asks, /freeze denies. Guard mode runs both, so an unreadable Edit or Write payload is blocked, not waved through.

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. yesterday Changed · +4 lines 3bb5952810b6
  2. 4d ago First seen · 72 lines · 60 tokens per session scan C ac2406279aee

Subscribe to this mod's changes

guard is a skill published in the GitHub repository timurgaleev/vibestack (6 stars, last pushed 2d ago), licensed MIT. It adds 60 tokens to every session and 734 once invoked, about $0.0003 per session on Opus 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-31.

Related

Other skills, from other repositories

computer-use

Read and drive native desktop applications through the accessibility layer — list on-screen apps, snapshot one window as a numbered element tree, then click / type / set a value / scroll / drag / run a named action, by element index or by screen coordinates. Use for work in a desktop app rather than a web page. Full…

kirodotdev/KiroCrew · 105 tokens

artifact-deploy

One-click deploy a user's pre-built app/artifact into their OWN AWS account and get a global public HTTPS link (Vercel-like), with a default TTL and promote-to-persistent. Use when the user says "deploy this", "ship this demo", "give me a public link", "share this externally", or "deploy to AWS".

kirodotdev/KiroCrew · 74 tokens

explain-for

Explain a topic, a piece of code, an error, or a design decision calibrated to one named audience — a 5-year-old, a 5th grader, a manager, a designer, a graduate student, a parent. Resolves who the explanation is for (from the request, or from what memory already records about that person), establishes the ground…

kirodotdev/KiroCrew · 102 tokens

rubber-duck

Adversarial "rubber duck" review that turns explaining-out-loud into a hallucination check. The main session is the PRESENTER (it did the work — a design doc, investigation, or analysis — and holds the real reasoning) and reconstructs the topic to a LISTENER — a spawned subagent pinned to a DIFFERENT-vendor model that…

kirodotdev/KiroCrew · 161 tokens

browser-recording

Record a browser flow as a video/GIF for evidence — animations, transitions, and multi-step interactions that a still screenshot cannot prove. Drives the project's own Playwright through a bundled runner, then converts to mp4 + GIF via ffmpeg. Use when the user asks to record a demo, capture a GIF or video of the UI…

kirodotdev/KiroCrew · 85 tokens

web-verify

Look at your OWN front-end change before claiming it works -- navigate the loopback URL of a dev server or pod you started, screenshot the surface you changed, read the image to judge it, and embed it in chat. Three capture backends: playwright-cli (the session the dashboard Browser panel shows), the agent-browser CLI…

kirodotdev/KiroCrew · 0 tokens