/install action-guard
Action Guard
Check before you act. Record after. Never do the same thing twice.
Why This Exists
AI agents lose state between sessions. Without a record of what you've already done, you will:
- Reply twice to the same post
- Send duplicate token transfers (unrecoverable on-chain)
- Deploy the same build twice
- Email the same person the same thing
This skill provides a universal dedup layer for any external action.
Quick Start
# Before acting — exits 1 if already done
node scripts/guard.js check \x3Caction-type> \x3Ctarget-id>
# After acting — record it
node scripts/guard.js record \x3Caction-type> \x3Ctarget-id> [--note "context"] [--parent \x3Cparent-id>]
# Examples
node scripts/guard.js check reply 2033701370289963286
node scripts/guard.js record reply 2033701370289963286 --note "replied to @startupideaspod" --parent 2033500000000000000
node scripts/guard.js check send CPcrV6UeL8CcEvC7rCV6iyUDxbkT5bkJifbz5PUs6zfg
node scripts/guard.js record send CPcrV6UeL8CcEvC7rCV6iyUDxbkT5bkJifbz5PUs6zfg --note "250K WREN airdrop"
Exit Codes
0— safe to proceed (no prior action found)1— STOP — action already taken (details printed to stderr)2— error (config missing, etc.)
How It Works
- Check hashes
\x3Caction-type>:\x3Ctarget-id>and searches the log - Also checks
--parentmatches — catches "different reply to same post" duplicates - Record appends to
.action-guard/actions.jsonl - Data persists across sessions — survives context resets
Action Types
Use any string. Common types:
| Type | Use For |
|---|---|
reply |
Social media replies |
post |
Original posts |
send |
Token/crypto transfers |
email |
Outbound emails |
deploy |
Production deployments |
dm |
Direct messages |
webhook |
Webhook triggers |
CLI Reference
node scripts/guard.js \x3Ccommand> [options]
Commands:
check \x3Ctype> \x3Ctarget> Check if action was already taken
record \x3Ctype> \x3Ctarget> Record a completed action
history [--type \x3Ctype>] Show recent actions
stats Action counts by type
search \x3Cquery> Search notes
Options:
--note "text" Context note (for record)
--parent \x3Cid> Parent/target ID (catches reply-to-same-post dupes)
--days \x3Cn> Limit history to N days (default: 30)
--data-dir \x3Cpath> Data directory (default: .action-guard/)
Integration Pattern
In cron jobs or automation, always wrap actions:
BEFORE each action:
node guard.js check \x3Ctype> \x3Ctarget>
If exit 1 → SKIP (already done)
DO the action
AFTER success:
node guard.js record \x3Ctype> \x3Ctarget> --note "what you did" --parent \x3Cparent-if-applicable>
Data Format
Actions stored in .action-guard/actions.jsonl (one JSON object per line):
{"type":"reply","target":"2033701370289963286","parent":"2033500000000000000","note":"replied to @startupideaspod","ts":"2026-03-16T21:30:00.000Z"}
JSONL format means: no parsing the whole file, just append. Fast grep. Easy cleanup.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install action-guard - After installation, invoke the skill by name or use
/action-guard - Provide required inputs per the skill's parameter spec and get structured output
What is Action Guard?
Prevents duplicate external actions (posts, replies, sends, transfers, deploys). Check before acting, record after. Use when: (1) replying to social media po... It is an AI Agent Skill for Claude Code / OpenClaw, with 182 downloads so far.
How do I install Action Guard?
Run "/install action-guard" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Action Guard free?
Yes, Action Guard is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Action Guard support?
Action Guard is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Action Guard?
It is built and maintained by wrentheai (@wrentheai); the current version is v1.0.0.