guard

guard is a skill for Claude Code from timurgaleev/vibestack. It costs 20 tokens per session (1,289 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 Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; mentions Claude Code; mentions Codex.

Good fit Use it when you want warnings for risky commands and a directory boundary that blocks edits elsewhere.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/timurgaleev/vibestack/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 timurgaleev/vibestack --skill guard
Clone the repo
git clone --depth 1 https://github.com/timurgaleev/vibestack

Made for: Claude Code.

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/github.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/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 guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/timurgaleev/vibestack/guard"><img src="https://agentmods.dev/badge/skills/timurgaleev/vibestack/guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,289 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.00020 $0.01289
Opus 5.5 $0.00008 $0.00516
Sonnet 5.5 $0.00004 $0.00258
Haiku 4.5 $0.00002 $0.00129

Measured 22d ago against content hash f3eee57989b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 22d 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.

- "1. **Destructive command guard** — Bash and PowerShell: rm -rf, Remove-Item -Recurse, DROP TABLE, force-push, etc. warn before executing (you can override); catastrophic shapes (recursive delete of `/` or `~`, force-p
skills/guard/SKILL.md · 110 lines

How it starts

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

If this session was compacted, the copy of this skill in context may be cut off. Read ${CLAUDE_SKILL_DIR}/SKILL.md from disk and resume at the step you are on.

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

Where this is enforced. Both protections run as Claude Code PreToolUse hooks. Cursor, Kiro and Codex install the same skill, but the hooks are not guaranteed to run there; outside Claude Code /guard is instruction-only. On those hosts, tell the user guard mode is advisory: you will confirm before a destructive command and keep your own edits inside the boundary, but nothing blocks a tool call you get wrong.

Copilot CLI is the exception. When the configuration payload is installed (./install --with-config or --only=config), the user hook file ~/.copilot/hooks/vibestack.json (under $COPILOT_HOME when set) enforces both halves: the destructive-command and gate-file check is always on, in every session, and the edit boundary blocks while a freeze directory is set. Without the configuration payload it is instruction-only there as well.

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, set it with the shared state writer (see /freeze):

bash "${CLAUDE_SKILL_DIR:-$HOME/.claude/skills/guard}/../freeze/bin/freeze-state.sh" set "<user-provided-path>"

Report guard mode active only if the command exits 0 and prints FREEZE_DIR=. On FREEZE_ERROR (a mistyped or missing path, or /), tell the user no edit boundary was set and ask for the path again. On FREEZE_BUSY, retry once the other writer finishes; never write or delete the state file directly.

Read the full file on GitHub · 110 lines

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. 22d ago Changed · +3 lines f3eee57989b0
  2. 1mo ago Changed · +7 lines 98abdaf29b06
  3. 1mo ago Changed · +6 lines e31dc523fd11
  4. 1mo ago Changed · -40 tokens per session 208e55f20e6b
  5. 1mo ago Changed · +18 lines 22044a7630c7
  6. 2mo ago Changed · +4 lines 3bb5952810b6
  7. 3mo 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 (8 stars, last pushed 20d ago), licensed MIT. It adds 20 tokens to every session and 1,289 once invoked, about $0.0001 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-31.

Related

guard compared with skills from other repositories

guard next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
guardtimurgaleev/vibestackSkill820d agoMITC20Claude Code
artifact-deploykirodotdev/KiroCrewSkill5.2ktodayApache-2.0A74Claude Code, Codex
security-conductorkirodotdev/KiroCrewSkill5.2ktodayApache-2.0A57Claude Code, Codex
explain-forkirodotdev/KiroCrewSkill5.2ktodayApache-2.0A71Claude Code, Codex
learn-from-sagekirodotdev/KiroCrewSkill5.2ktodayApache-2.0A56Claude Code, Codex
web-verifykirodotdev/KiroCrewSkill5.2ktodayApache-2.0A0Claude Code, Codex
mochi-remindkirodotdev/KiroCrewSkill5.2ktodayApache-2.0A20Claude Code, Codex