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".

3,891 stars

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

$curl -o ~/.claude/skills/guard/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/ashish797/founderclaw/guard/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/guard/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How guard Compares

Feature / AgentguardStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/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

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

3891
from openclaw/skills

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.

Security

guardian-wall

3891
from openclaw/skills

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").

Security

session-guardian

3891
from openclaw/skills

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

General Utilities

skill-guard

3891
from openclaw/skills

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.

Security

agentguard

3891
from openclaw/skills

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.

Security

mayguard

3891
from openclaw/skills

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

3891
from openclaw/skills

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

3891
from openclaw/skills

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

3891
from openclaw/skills

Scan, harden, sign, and verify release artifacts with ReleaseGuard — the artifact policy engine for dist/ and release/ outputs.

agency-guardian

3891
from openclaw/skills

Gentle reminders to stay human while using AI. Reflection, not restriction.

龙虾安全卫士 (openclaw-safe-guard) v1.2.3

3891
from openclaw/skills

## 📦 来源信息

trustlog-guard

3891
from openclaw/skills

Financial governance for OpenClaw agents. Tracks API spend, enforces budget limits, detects runaway loops, delivers cost briefings. Reads session .jsonl logs locally. 100% private.