safety-guard

safety-guard is a skill for Claude Code, Codex from jxoesneon/Ciel. It costs 26 tokens per session (758 once invoked), scanned D, original, Apache-2.0.

A safety system for coding agents that blocks destructive commands and can freeze writes in selected directories.

In plain words
What is it for?
Use it to intercept dangerous shell and Git commands, protect directories from changes, and require approval for actions such as forced deletion, hard resets, database drops, and package publishing.
Why use it?
It reduces the risk of deleting files, damaging Git history, destroying databases, changing permissions broadly, or publishing artifacts without human confirmation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to intercept dangerous shell and Git commands, protect directories from changes, and require approval for actions such as forced deletion, hard resets, database drops, and package publishing.

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

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 safety-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/jxoesneon/ciel/safety-guard/github.svg)](https://agentmods.dev/skills/jxoesneon/ciel/safety-guard)
Your own site
<a href="https://agentmods.dev/skills/jxoesneon/ciel/safety-guard"><img src="https://agentmods.dev/badge/skills/jxoesneon/ciel/safety-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 safety-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/jxoesneon/ciel/safety-guard"><img src="https://agentmods.dev/badge/skills/jxoesneon/ciel/safety-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 758 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. 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.00026 $0.00758
Opus 5 $0.00013 $0.00379
Sonnet 5 $0.00005 $0.00152
Haiku 4.5 $0.00003 $0.00076

Measured 9d ago against content hash c45f5c999176, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade D, and why

safety-guard scanned grade D with 2 findings 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 9d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Escalated deletions (e.g., `sudo rm`).

Recursive force deletehighDestructive command

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

- Recursive/forced deletions (e.g., `rm -rf /`, `rm -rf ~`, `Remove-Item -Recurse -Force` at root levels).
skills/safety-guard/SKILL.md · 65 lines

How it starts

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

CIEL ADAPTATION: Safety-Guard (Operational Failsafe)

This skill serves as the primary operational failsafe for CIEL's autonomous agents. It enforces the "Do No Harm" mandate by establishing strict operational boundaries, intercepting destructive actions, and allowing for granular, directory-level write locking.

Integration Context

Adapted from ~/.agents/skills/safety-guard/. This skill provides the behavioral ruleset that the Auditor sub-agent uses to evaluate run_shell_command requests and file modifications before execution.

Core Protection Modes

1. Careful Mode (Destructive Command Interception)

The Auditor MUST intercept and FAIL the execution of the following shell command patterns unless explicit human confirmation is provided via ask_user:

  • Recursive/forced deletions (e.g., rm -rf /, rm -rf ~, Remove-Item -Recurse -Force at root levels).
  • Destructive Git operations (e.g., git push --force, git reset --hard, git clean -fd).
  • Database annihilation (e.g., DROP TABLE, DROP DATABASE).
  • Broad permission changes (e.g., chmod 777 -R).
  • Escalated deletions (e.g., sudo rm).
  • Publishing artifacts (e.g., npm publish).

Action: Present the command's exact intent to the user, warn of the consequences, and suggest a safer alternative (e.g., git reset --soft or targeting a specific file instead of *).

2. Freeze Mode (Scope Confinement)

During complex, multi-agent refactoring or targeted feature implementations, orchestration can enforce a "Freeze Mode" limiting write access to a specific directory tree.

  • Rule: If a Freeze Mode directory is declared (e.g., src/components/), the Auditor MUST reject any write_file or replace actions attempting to modify files outside that directory.
  • Exception: Read operations (read_file, grep_search, glob) are always universally permitted to maintain contextual awareness.

3. Guard Mode (Maximum Security)

Activates both Careful Mode and Freeze Mode simultaneously. Recommended for fully autonomous (unsupervised) loops.

Read the full file on GitHub · 65 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. 9d ago First seen · 65 lines · 26 tokens per session scan D c45f5c999176

Subscribe to this mod's changes

safety-guard is a skill published in the GitHub repository jxoesneon/Ciel (1 stars, last pushed 5d ago), licensed Apache-2.0. It adds 26 tokens to every session and 758 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.