agent-guard
Run the following command in DeepSeek Harness:
dsh plugin install mokuyoaxis/agent-guard
Paste the following prompt into your AI chat to install this plugin:
Install by running dsh plugin install mokuyoaxis/agent-guard in DeepSeek Harness; the full source is at https://github.com/mokuyoaxis/agent-guard
About this plugin
AI agents increasingly run shell commands autonomously, and a single rm -rf or a mis-expanded variable can wipe an entire directory tree in an instant. Traditional approval workflows either interrupt the agent or become rubber-stamps under automation pressure. agent-guard takes a different approach: it does not block operations by default; it makes every destructive operation reversible from the very moment it executes.
A three-tier decision protocol (SAFE, AMBIGUOUS, FORBIDDEN) intercepts commands before they hit disk: deletions are relocated to .agent-trash/ with a manifest, Git overwrites trigger a snapshot first, and only genuinely irreversible cases escalate to a human. Every verdict, compensation intent, and restore action is recorded in append-only JSONL. Session-scoped privileges, once downgraded, can only be restored by a human. Zero third-party dependencies; Python 3.9 or later is all you need.
Built for teams running agents autonomously in DSH, Codex, or Claude Code to execute builds, cleanup, or migrations, especially where a mistaken rm carries real cost. It is not a sandbox; it is the safety net for the most common failure mode: a well-intentioned agent making a wrong call.
Use Cases
- Agent autonomously runs rm -rf or find -delete; deletions are relocated to a trash directory with a manifest before anything is lost
- Agent overwrites tracked files; a Git snapshot is taken first so the state can be restored instantly
- Agent encounters an ambiguous command shape it cannot safely automate and escalates the decision to a human
- Post-incident recovery: audit the append-only JSONL trail and restore via txid
Best For
- Teams running agents autonomously in DSH, Codex, or Claude Code for builds, cleanup, and migrations
- Projects where a mistaken deletion carries real cost and a default safety net is required
- Developers who want auditable, reversible guardrails on agent operations without the overhead of a full sandbox
Related Plugins
Adds an Auto approval mode on the official workspace-write sandbox, classifying semantic risks, asking when ambiguous, and denying destructive operations.
Undo/rollback system for DSH: config & plugin snapshots, one-click undo/redo/restore, message-level revert, secret masking, safe mode, and offline WebUI/GUI/CLI rescue tools for when DSH won't start.
Packages all 87 SKILL.md files from upstream reverse-skill as a DeepSeek Harness plugin that auto-registers them for authorized reverse engineering, penetration testing, and security research.
Dockyard DSH is a native DeepSeek Harness plugin that unifies official OAuth/client sessions for Codex, Antigravity, Grok, Claude, and Cursor, providing account pool, model catalog, and quota status.