guard
Full safety mode: destructive command warnings + directory-scoped edits. Combines careful (warns before destructive commands) with freeze (blocks edits outside a specified directory). Maximum safety for prod or live systems. Use when: "guard mode", "full safety", "lock it down", "maximum safety".
Best use case
guard is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Full safety mode: destructive command warnings + directory-scoped edits. Combines careful (warns before destructive commands) with freeze (blocks edits outside a specified directory). Maximum safety for prod or live systems. Use when: "guard mode", "full safety", "lock it down", "maximum safety".
Teams using guard should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/guard/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How guard Compares
| Feature / Agent | guard | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Full safety mode: destructive command warnings + directory-scoped edits. Combines careful (warns before destructive commands) with freeze (blocks edits outside a specified directory). Maximum safety for prod or live systems. Use when: "guard mode", "full safety", "lock it down", "maximum safety".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
SKILL.md Source
# Guard — Full Safety Mode
Combines the destructive command warnings from **careful** with the edit scoping from **freeze**.
## Activation
1. Ask or detect the scope directory for freeze
2. Activate careful rules (warn on destructive commands)
3. Activate freeze rules (restrict edits to scope directory)
4. Announce: "Guard mode active. Edits locked to `{dir}/`. Destructive commands will require confirmation."
## Rules
### From Careful
Before running any bash command, check for destructive patterns (rm -rf, force-push, DROP TABLE, etc.). If detected, warn and wait for confirmation.
### From Freeze
Before any Edit or Write, verify the target file is within the locked directory. If outside, refuse and remind.
## Deactivation
User says "unguard" or "guard off" → deactivate both careful and freeze. Confirm: "Guard mode off. Edits unrestricted, destructive commands run without warning."
See also: `careful` (destructive commands only), `freeze` (edit scoping only), `unfreeze` (remove edit restriction).Related Skills
security-guardian
Automated security auditing for OpenClaw projects. Scans for hardcoded secrets (API keys, tokens) and container vulnerabilities (CVEs) using Trivy. Provides structured reports to help maintain a clean and secure codebase.
guardian-wall
Mitigate prompt injection attacks, especially indirect ones from external web content or files. Use this skill when processing untrusted text from the internet, user-uploaded files, or any external source to sanitize content and detect malicious instructions (e.g., "ignore previous instructions", "system override").
session-guardian
Never lose a conversation again. Auto-backup, smart recovery, and health monitoring for OpenClaw sessions. Protects against gateway crashes, model disconnections, and token overflow. Use this skill when: - User worries about losing conversations after gateway restart or model crash - User mentions session backup, conversation recovery, session protection, or data loss - User's agent is slow or timing out (likely token overflow from large sessions) - User runs multiple agents and needs to track collaboration across sessions - User asks about session health, backup strategy, or disaster recovery - User mentions "对话丢失", "会话备份", "上下文溢出", "token超限", "Gateway重启后记忆丢失" - Even if user just says "my agent lost everything after a restart" — this is the skill
skill-guard
Scan ClawHub skills for prompt injection and malicious content using Lakera Guard before installing them. Run automatically when the user asks to install a skill, or on-demand to audit any skill by slug or search query.
agentguard
GoPlus AgentGuard — AI agent security guard. Automatically blocks dangerous commands, prevents data leaks, and protects secrets. Use when reviewing third-party code, auditing skills, checking for vulnerabilities, evaluating action safety, or viewing security logs.
mayguard
A security auditor for agent skills. Scans skill directories for malicious patterns (credential theft, suspicious network calls, destructive commands) and provides a safety score. Use before installing unknown skills.
code-quality-guard
Professional pre-deployment code review and quality enforcement. Ensures imports are valid, tags are closed, and logic follows best practices before announcing a build is live.
solidity-guardian
Smart contract security analysis skill. Detect vulnerabilities, suggest fixes, generate audit reports. Supports Hardhat/Foundry projects. Uses pattern matching + best practices from Trail of Bits, OpenZeppelin, and Consensys.
releaseguard
Scan, harden, sign, and verify release artifacts with ReleaseGuard — the artifact policy engine for dist/ and release/ outputs.
agency-guardian
Gentle reminders to stay human while using AI. Reflection, not restriction.
龙虾安全卫士 (openclaw-safe-guard) v1.2.3
## 📦 来源信息
trustlog-guard
Financial governance for OpenClaw agents. Tracks API spend, enforces budget limits, detects runaway loops, delivers cost briefings. Reads session .jsonl logs locally. 100% private.