apex-guard

apex-guard is a skill for Claude Code from tonone-ai/tonone. It costs 40 tokens per session (1,331 once invoked), scanned D, original, MIT.

An optional session guard that asks for confirmation before certain destructive shell commands and can freeze edits to one directory. It uses simple text matching and is an accident-prevention aid, not a security boundary.

In plain words
What is it for?
Guarding a session in careful mode, confirming risky Bash commands, and restricting edits to a chosen directory.
Why use it?
It reduces the chance of accidentally deleting files, forcing Git changes, or running other destructive commands during coding work.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; names the NotebookEdit tool; mentions Claude Code.

Part of the engineering-team plugin — 87 skills, 2 hooks shipped together

Good fit Guarding a session in careful mode, confirming risky Bash commands, and restricting edits to a chosen directory.

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

Made for: Claude Code.

Or install engineering-team, the plugin that ships this one along with the rest of its 87 skills, 2 hooks.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tonone-ai/tonone/apex-guard"><img src="https://agentmods.dev/badge/skills/tonone-ai/tonone/apex-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,331 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.00040 $0.01331
Opus 5.5 $0.00016 $0.00532
Sonnet 5.5 $0.00008 $0.00266
Haiku 4.5 $0.00004 $0.00133

Measured 19d ago against content hash 93695824c6db, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade D, and why

apex-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 19d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat > .claude/tonone-guard.json <<EOF

Recursive force deletehighDestructive command

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

| `careful` | Bash only. Destructive commands prompt the user (`rm -rf`, `git push --force` but not `--force-with-lease`, `git reset --hard`, `git clean -f`, mass `git checkout .`/`restore .`, `git branch -D`, DROP/TRUNC
bundle/engineering-team/skills/apex-guard/SKILL.md · 108 lines

How it starts

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

Apex Guard

You are Apex — the engineering lead. Arm, change, or clear the destructive-command guard for this session. Terse. No ceremony.

Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.

What it is (say this plainly)

Advisory string matching in a PreToolUse hook (team/apex/hooks/apex-guard.js). Trivially bypassable: aliases, scripts, eval, base64, sh -c, other tools. Not a security boundary. A guardrail against accidents.

Inert until armed. State lives in .claude/tonone-guard.json.

Mode Effect
careful Bash only. Destructive commands prompt the user (rm -rf, git push --force but not --force-with-lease, git reset --hard, git clean -f, mass git checkout ./restore ., git branch -D, DROP/TRUNCATE/DELETE without WHERE, kubectl delete, terraform destroy, docker system prune/volume rm, chmod -R 777, dd of=/dev/, mkfs). rm -rf of only node_modules, dist, build, .next, target, __pycache__, .cache, coverage is exempt. Catastrophic ones are denied outright: rm -rf /, ~, $HOME, /*, fork bomb, mkfs/dd onto /dev/sd*/disk*.
freeze <dir> Edit, MultiEdit, Write, NotebookEdit outside <dir> are denied. Bash is NOT constrained by freeze — sed -i, > redirects, mv still work.
guard <dir> Both.

Read the full file on GitHub · 108 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. 19d ago Changed · +2 lines 93695824c6db
  2. 20d ago First seen · 106 lines · 40 tokens per session scan D 9a442a851e35

Subscribe to this mod's changes

apex-guard is a skill published in the GitHub repository tonone-ai/tonone (84 stars, last pushed 2d ago), licensed MIT. It adds 40 tokens to every session and 1,331 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-10.

Related

apex-guard compared with skills from other repositories

apex-guard next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
apex-guardtonone-ai/tononeSkill842d agoMITD40Claude Code
reposlukasrepublic/agentic-foundrySkill023d agoMITA107Claude Code
id-promotelukasrepublic/agentic-foundrySkill023d agoMITA485Claude Code
id-rollbacklukasrepublic/agentic-foundrySkill023d agoMITA398Claude Code
post-upgradelukasrepublic/agentic-foundrySkill023d agoMITA245Claude Code
work-isolationlukasrepublic/agentic-foundrySkill023d agoMITA101Claude Code
cicd-gitops-pipelinelukasrepublic/agentic-foundrySkill023d agoMITB0Claude Code