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.
npx skills add andreaswasita/copilot-agents-dojo --skill safety-guardrailsgit clone --depth 1 https://github.com/andreaswasita/copilot-agents-dojoWrote 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.
[](https://agentmods.dev/skills/andreaswasita/copilot-agents-dojo/safety-guardrails)<a href="https://agentmods.dev/skills/andreaswasita/copilot-agents-dojo/safety-guardrails"><img src="https://agentmods.dev/badge/skills/andreaswasita/copilot-agents-dojo/safety-guardrails/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.
<a href="https://agentmods.dev/skills/andreaswasita/copilot-agents-dojo/safety-guardrails"><img src="https://agentmods.dev/badge/skills/andreaswasita/copilot-agents-dojo/safety-guardrails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00015 | $0.01224 |
| Opus 5 | $0.00008 | $0.00612 |
| Sonnet 5 | $0.00003 | $0.00245 |
| Haiku 4.5 | $0.00002 | $0.00122 |
Grade C, and why
safety-guardrails 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 12d 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.
Gives the agent two invokable preflight checks before a dangerous action: a command guard that flags obviously-destructive commands (`rm -rf /`, force-push, `reset --hard`, `dd`, `mkfs`), and a tree guard that flags an u How it starts
The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Safety Guardrails Skill
Gives the agent two invokable preflight checks before a dangerous action: a command guard that flags obviously-destructive commands (rm -rf /, force-push, reset --hard, dd, mkfs), and a tree guard that flags an unsafe working-tree state (mass deletions, or a dirty tree when a clean one is required). This is a heuristic speed bump, not a sandbox — it cannot parse shell grammar or stop execution, so it complements, never replaces, human confirmation.
When to Use
- Before running any command that deletes, overwrites, or rewrites history.
- Before a risky
gitoperation (force-push, hard reset, history rewrite). - Before a bulk file operation, to confirm the working tree is in a safe state.
- When a user-supplied or generated command "looks" destructive — check it first.
- As a standing habit in autonomous loops where no human reviews each command.
- NOT as a security boundary — it is trivially bypassed (see Pitfalls).
Prerequisites
- The
powershellCopilot tool to run the guard scripts. - Python 3 on
PATH(the guards share one stdlib core; the.sh/.ps1are thin wrappers). gitavailable for the tree guard (it degrades to a skip outside a repo).
How to Run
Use the powershell tool to invoke the guard before the risky action:
# Command guard — exit 1 means STOP and confirm
bash skills/safety-guardrails/scripts/safety-guard.sh command "rm -rf /"
# Tree guard — flag mass deletions or (optionally) any dirty tree
bash skills/safety-guardrails/scripts/safety-guard.sh tree --require-clean
On Windows, call the parity wrapper safety-guard.ps1 with the same verbs. Exit codes: 0 no concern, 1 flagged (stop and confirm), 2 usage error.
Quick Reference
| Guard | Flags | Example trigger |
|---|---|---|
command |
recursive force-delete of a root/home/system path | rm -rf /, rm -rf ~ |
command |
force-push / history rewrite | git push --force, git filter-branch |
command |
irreversible reset / clean | git reset --hard, git clean -fdx |
command |
disk/device destruction | dd of=/dev/sda, mkfs, > /dev/sdb |
command |
over-permissive mode | chmod -R 777 . |
tree |
mass staged/pending deletions (≥ threshold) | a refactor that removed many files |
tree |
dirty tree when --require-clean |
uncommitted edits before a hard reset |
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 12d ago First seen · 89 lines · 15 tokens per session scan C 13089c1d3e75
safety-guardrails is a skill published in the GitHub repository andreaswasita/copilot-agents-dojo (53 stars, last pushed 5d ago), licensed MIT. It adds 15 tokens to every session and 1,224 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.
Other skills, from other repositories
chatbot
Use when a support or sales bot on a live website must behave: persona/system prompt, grounding so it cannot invent prices or policy, jailbreak and injection defense, the human handoff, launch metrics and kill switch. NOT the agent loop or RAG index under it (that is building-agents), NOT a human answering one ticket…
agent-safety
Use when bounding an LLM agent that already runs — scoping its task domain, gating tools to least privilege, defending against prompt injection in untrusted web/email/RAG text, requiring human approval on irreversible actions, capping runtime and cost, or triaging what it already did. NOT building the loop, tools, or…
compliance
Use when scoping which regulatory frameworks bind a business — SOC 2, ISO 27001, HIPAA, PCI DSS, EU AI Act, DORA, NIS2 — building a control register with owners and evidence, or standing up the cadence that keeps it audit-ready. NOT drafting privacy-policy/ROPA/DPA or ToS text (that is gdpr-privacy, terms-conditions)…
conducting-cyber-risk-assessment-with-nist-800-30
Conduct a defensible cybersecurity risk assessment using the NIST SP 800-30 Rev 1 methodology: prepare scope and a risk model, identify threat sources and threat events, identify vulnerabilities and predisposing conditions, determine likelihood and impact, compute risk, and communicate results as a prioritized risk…
git-guardrails
Use this skill to enforce strict safety boundaries on git operations, branch management, and destructive shell commands. Prevents accidental force pushes, hard resets, secret commits, unstashed code loss, and unauthorized production branch modifications.
implementing-gdpr-data-protection-controls
The General Data Protection Regulation (EU) 2016/679 (GDPR) is the EU's comprehensive data protection law governing the collection, processing, storage, and transfer of personal data. This skill cover.