careful

careful is a skill for Claude Code, Codex from rijuvashisht/Magneto. It costs 0 tokens per session (679 once invoked), scanned B, original, MIT.

A safety guardrail for shell commands that can delete, overwrite, or seriously change data. It scans for risky commands and records safety decisions.

In plain words
What is it for?
Use it when an agent may run commands such as `rm -rf`, `DROP TABLE`, `terraform destroy`, or `git reset --hard`. It warns about the command and records any approved override.
Why use it?
It helps prevent accidental destructive actions by requiring a clear confirmation before running flagged commands. If the user declines, it calls for a safer alternative.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when an agent may run commands such as rm -rf, DROP TABLE, terraform destroy, or git reset --hard. It warns about the command and records any approved override.

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

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 careful

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/rijuvashisht/magneto/careful"><img src="https://agentmods.dev/badge/skills/rijuvashisht/magneto/careful.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 679 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00000 $0.00679
Opus 5 $0.00000 $0.00340
Sonnet 5 $0.00000 $0.00136
Haiku 4.5 $0.00000 $0.00068

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

Security

Grade B, and why

careful scanned grade B 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 11d 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 deletemediumDestructive command

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

| critical | `rm -rf` recursive removal |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

src/templates/magneto-skills/skills/careful/SKILL.md · 94 lines

How it starts

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

/careful — Safety Guardrail for Destructive Commands

Role: Safety Guardrail Inputs: none Outputs: updates .magneto/safety.json Audit actions: careful.activated, careful.warned, careful.overridden


What /careful Does

Activates command scanning. When /careful is ON and you propose a destructive shell command, you MUST:

  1. Warn the user explicitly, naming the command and its destructive pattern.
  2. Require explicit confirmation ("yes run this") — "okay" or "proceed" are NOT sufficient.
  3. Record the override via magneto audit add careful.overridden --payload '{"command":"..."}'.
  4. If the user declines, STOP and propose a safer alternative.

Destructive Patterns Scanned

Severity Pattern
critical rm -rf recursive removal
critical DROP TABLE/DATABASE/SCHEMA
critical dd if=... of=/dev/..., mkfs
critical Fork bomb patterns
critical kubectl delete ns/namespace/cluster
critical terraform destroy
high TRUNCATE TABLE
high git push --force / -f
high git reset --hard
high git clean -dfx
high chmod -R 777

Full list in .magneto/safety.json after running magneto careful.

Activation

Run:

magneto careful          # enable
magneto careful --off    # disable
magneto careful status   # show current state
magneto careful check '<command>'   # test a command without running it

Integration Contract (for host agents)

Before executing any shell command, read .magneto/safety.json. If careful: true:

# Pseudocode for host
state = read(".magneto/safety.json")
if state["careful"]:
    matches = scan_for_destructive_patterns(command)
    if matches:
        warn_user(matches)
        if not explicit_confirmation():
            abort()
        record_override(command, reason)

Magneto's CLI provides magneto careful check '<command>' for programmatic testing — exit code 0 means safe, 2 means matches found.

Read the full file on GitHub · 94 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. 11d ago First seen · 94 lines · 0 tokens per session scan B 57a9ee8727aa

Subscribe to this mod's changes

careful is a skill published in the GitHub repository rijuvashisht/Magneto (6 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 679 tokens. A static security scan graded it B 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.