guard

A safety skill that enables warnings for destructive commands and restricts edits to a chosen directory.

In plain words
What is it for?
Use it when working in a sensitive project and you need both command warnings and a fixed boundary for file changes.
Why use it?
It reduces the risk of accidentally changing files outside the intended area or running commands that could remove or damage data.

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/pillip/claude-dev-kit/guard
Any agent
npx skills add pillip/claude-dev-kit --skill guard
Clone the repo
git clone --depth 1 https://github.com/pillip/claude-dev-kit

Made for: Claude Code, Codex.

Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 588 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.00025 $0.00588
Opus 5 $0.00013 $0.00294
Sonnet 5 $0.00005 $0.00118
Haiku 4.5 $0.00003 $0.00059

Measured 2d ago against content hash e446c97dd484, 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 2d 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.

- **Careful** (Bash): Warns on rm -rf, git push --force, git reset --hard, DROP TABLE, etc.
skills/guard/SKILL.md · 42 lines

What it actually says

Guard mode activated — combines /careful and /freeze.

Setup

  1. Validate that $ARGUMENTS is a valid directory path. If not provided, ask the user.
  2. Resolve to an absolute path and write to .claude-kit/freeze-dir.txt:
    mkdir -p .claude-kit && echo "<absolute-path>" > .claude-kit/freeze-dir.txt
    
  3. Report activation status:
    • "Careful mode: ON — destructive Bash commands will be warned."
    • "Freeze mode: ON — edits restricted to <path>."

Active Guards

  • Careful (Bash): Warns on rm -rf, git push --force, git reset --hard, DROP TABLE, etc.
  • Freeze (Edit/Write): Blocks file edits outside the freeze boundary.

Deactivation

rm -f .claude-kit/freeze-dir.txt

Or end this conversation.

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. 2d ago First seen · 42 lines · 25 tokens per session scan C e446c97dd484

Subscribe to this mod's changes

guard is a skill published in the GitHub repository pillip/claude-dev-kit (11 stars, last pushed 16d ago), licensed MIT. It adds 25 tokens to every session and 588 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

knowledge-base

Create and maintain a Markdown knowledge base that any AI agent can read, search, and update. Use when the user wants to start a knowledge base, add or update notes, organize docs/notes for an agent or LLM to consume, build an index of notes, or run a cleanup/maintenance pass on an existing MD knowledge base. Triggers…

wonderwhy-er/DesktopCommanderMCP · 112 tokens

peer-review

Structured manuscript/grant review with checklist-based evaluation. Use when writing formal peer reviews with specific criteria methodology assessment, statistical validity, reporting standards compliance (CONSORT/STROBE), and constructive feedback. Best for actual review writing, manuscript revision. For evaluating…

xintaofei/codeg · 71 tokens

build-teaql-app

Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…

teaql/teaql-agent-kit · 112 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

taiyi-integration

TaiyiForge 第9阶段 — 闭环归档,CHANGELOG.md。四端通用。.

Dong90/oh-my-taiyiforge · 27 tokens

taiyi-ui-design

TaiyiForge 第 4 阶段 — UI/UX 契约,产出 UI-DESIGN.md。四端通用。.

Dong90/oh-my-taiyiforge · 35 tokens