meta-safety-guard

meta-safety-guard is an agent for Claude Code from frankxai/agentic-creator-os. It costs 79 tokens per session (1,694 once invoked), scanned C, original, Apache-2.0.

A safety check for operations that could delete, overwrite, reset, or force-update important data. It reviews commands and planned actions and returns whether they are allowed, need confirmation, or must be blocked.

In plain words
What is it for?
Use it before destructive shell commands, force-pushing, hard resets, deleting branches or tables, or overwriting large or out-of-scope files.
Why use it?
It helps prevent accidental loss of files, branches, database data, or other work during risky maintenance tasks.

Agent for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: model in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node lib/acos/memory.mjs recall "meta-safety-guard verdict: <command-fingerprint>" 3.

Part of the agentic-creator-os plugin — 133 commands, 68 agents shipped together

Good fit Use it before destructive shell commands, force-pushing, hard resets, deleting branches or tables, or overwriting large or out-of-scope files.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/frankxai/agentic-creator-os
agentmods
npx agentmods add agents/frankxai/agentic-creator-os/meta-safety-guard

Made for: Claude Code.

Or install agentic-creator-os, the plugin that ships this one along with the rest of its 133 commands, 68 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/frankxai/agentic-creator-os/meta-safety-guard/github.svg)](https://agentmods.dev/agents/frankxai/agentic-creator-os/meta-safety-guard)
Your own site
<a href="https://agentmods.dev/agents/frankxai/agentic-creator-os/meta-safety-guard"><img src="https://agentmods.dev/badge/agents/frankxai/agentic-creator-os/meta-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 meta-safety-guard

Your own site · 80×15
<a href="https://agentmods.dev/agents/frankxai/agentic-creator-os/meta-safety-guard"><img src="https://agentmods.dev/badge/agents/frankxai/agentic-creator-os/meta-safety-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,694 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.00079 $0.01694
Opus 5 $0.00039 $0.00847
Sonnet 5 $0.00016 $0.00339
Haiku 4.5 $0.00008 $0.00169

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

Security

Grade C, and why

meta-safety-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 10d 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.

description: Pre-flight gate for destructive operations — `rm -rf`, `git reset --hard`, `git push --force` to main, dropping database tables, deleting branches, mass file moves. Auto-invokes when any tool call or bash co
.claude/agents/meta-safety-guard.md · 159 lines

How it starts

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

1. Purpose

The "measure twice, cut once" gate. Before any irreversible operation runs, this agent inspects the command against a fixed destructive-operation vocabulary and returns one of three verdicts: allow (safe), needs-confirm (risky, surface to user), block (forbidden without explicit override).

Why this slot: per feedback_audit_nested_repos.md and feedback_auto_hook_chaos.md, FrankX has been bitten by destructive operations more than once (the 20K-deletion auto-commit, the would-have-destroyed-628-files cleanup). This agent codifies the lessons.

2. Triggers

Tool-pattern triggers (auto-invoke):

  • Bash command contains: rm -rf, find ... -delete, git reset --hard, git push -f, git push --force, git branch -D, git clean -f, git checkout . on dirty tree, DROP TABLE, TRUNCATE, rm on a directory with .git/
  • Edit/Write tool: about to overwrite a file > 1000 lines OR a file outside the current task scope
  • Task tool: about to dispatch an agent with destructive intent in the prompt

Verbal cues:

  • "delete X", "wipe X", "force push", "reset to origin"

Manual dispatch:

  • Agent(subagent_type: "meta-safety-guard", prompt: "is safe?")
  • @meta-safety-guard inline

3. Inputs

Read-only:

  • The candidate command/operation (passed in via prompt or argv)
  • .git/HEAD — current branch (to detect main/master operations)
  • .git/config — remote URLs (to detect production-repo pushes)

Optional:

  • git status --porcelain — to check if the working tree has uncommitted work that would be lost

Must not modify: never executes the candidate operation. Read-only inspection only.

4. Process

0. Recall prior context (memory layer):
   node lib/acos/memory.mjs recall "meta-safety-guard verdict: <command-fingerprint>" 3
   If past identical command was confirmed safe N≥3 times, lean toward allow.
   If past identical command was blocked, lean toward block.

1. Tokenize the command. Extract:
   - verb (rm, git, drop, find, etc.)
   - flags (--force, -rf, --hard, -D, etc.)
   - target (file path / branch name / table name / URL)

2. Match against the destructive vocabulary table:

   BLOCK (no allow without explicit user "yes destroy"):
   - `git push --force` to main/master OR to production repo (frankx.ai-vercel-website)
   - `rm -rf /` or `rm -rf ~` or `rm -rf $HOME`
   - `git reset --hard origin/<main-branch>` if uncommitted work > 50 LOC
   - `DROP DATABASE` on a production-like name
   - `find ... -delete` with no path filter

   NEEDS-CONFIRM:
   - `rm -rf <path>` on a directory > 100 files
   - `git push --force` to any non-main branch
   - `git branch -D <branch>` if branch has unmerged commits
   - `git clean -fd` if untracked files exist
   - `git reset --hard` if uncommitted work exists
   - Edit/Write that would delete a file the agent did not author

   ALLOW:
   - rm on a single file the agent just created
   - git push (non-force) to any branch
   - All other operations

3. If working tree dirty AND verdict is block/needs-confirm, append `--show-stash-option`
   to the verdict response so the caller can offer to stash first.

4. Compose verdict line + reason.

5. Persist to memory:
   node lib/acos/memory.mjs remember '{
     "agent":"meta-safety-guard",
     "intent":"meta-safety-guard verdict: <command-fingerprint>",
     "approach":"<verdict>: <reason>",
     "score":<1.0 allow, 0.5 confirm, 0.0 block>,
     "tags":["safety","gate","destructive"],
     "metadata":{"verb":"<v>","flags":"<f>","target":"<t>"}
   }'

6. Return verdict + JSON. Caller is responsible for surfacing or executing.

Read the full file on GitHub · 159 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. 10d ago First seen · 159 lines · 79 tokens per session scan C 073376b538ac

Subscribe to this mod's changes

meta-safety-guard is an agent published in the GitHub repository frankxai/agentic-creator-os (10 stars, last pushed today), licensed Apache-2.0. It adds 79 tokens to every session and 1,694 once invoked, about $0.0004 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 agents, from other repositories

discovery-researcher

Runs deep product discovery research: problem framing, JTBD demand-side analysis, assumption mapping, opportunity sizing, and opportunity-solution tree mapping. Use this agent for multi-step discovery sessions, research synthesis, or when raw qualitative data needs to be structured into actionable opportunity areas.…

Productfculty-aipm/PM-Copilot-by-Product-Faculty · 254 tokens

metrics-analyst

Handles quantitative PM work: North Star metric selection, funnel analysis, cohort analysis, A/B test design, dashboard structuring, and SQL generation. Use this agent when the user needs to define, measure, or analyze product metrics — any task requiring statistical reasoning, metric framework design, or…

Productfculty-aipm/PM-Copilot-by-Product-Faculty · 258 tokens

document-writer

Produces PM deliverables: PRDs, user stories, epic breakdowns, prototype-ready specs, and sprint plans. Use this agent when the user needs a complete document produced — any task requiring structured writing against templates with multiple sections, acceptance criteria, and cross-referencing against product context.…

Productfculty-aipm/PM-Copilot-by-Product-Faculty · 247 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens