policy-engine
Deterministic governance layer for OpenClaw tool execution. Enforces tool allowlists, deny patterns, path allowlists, risk tiers, dry-run mode, and escalation tracking via the before_tool_call hook. Every decision is logged for audit. Production-hardened with 88 tests and three deadlock classes fixed.
Why use this skill?
Secure your OpenClaw agents with the Policy Engine. Enforce tool allowlists, path restrictions, and risk tiers to prevent unauthorized actions.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/joetomasone/policy-engineWhat This Skill Does
The Policy Engine for OpenClaw is a production-hardened governance layer designed to bring deterministic control to autonomous agent operations. It functions as a middleware hook that intercepts all tool invocations before they execute. By enforcing granular control through tool allowlists, path restrictions, and risk-based escalation policies, it transforms unpredictable LLM behavior into a structured, audit-ready workflow. It is built to prevent common security risks such as prompt-injected path traversals, unintended shell execution, and unauthorized file system modifications, all while maintaining high performance and system stability.
Installation
To install, run the following command in your terminal:
clawhub install openclaw/skills/skills/joetomasone/policy-engine
After installation, activate it by updating your openclaw.json configuration file:
{
"plugins": { "policy-engine": { "enabled": true } }
}
Use Cases
- Sandboxed Agent Environments: Define restrictive tool profiles for sub-agents (e.g., a research agent restricted to read-only browser tools).
- Regulatory Compliance: Audit every agent decision automatically to meet logging requirements for sensitive enterprise environments.
- Risk Mitigation: Use T1 and T2 risk tiers to gate sensitive system-level commands, preventing agents from executing risky shell commands without prior escalation or oversight.
- Path Guardrails: Protect critical directories (e.g., /etc, .ssh) from unauthorized write access by enforcing strictly defined workspace path allowlists.
Example Prompts
- "Agent, please scan the current directory for todo.md files and summarize the remaining tasks, ensuring you only use read-only tools."
- "Update the project configuration file in the safe workspace path with the new API endpoint."
- "Attempt a system diagnostics check; if the policy engine blocks this due to risk tiering, inform me with the specific reason for denial."
Tips & Limitations
- Dry-Run Mode: Utilize
"dryRun": trueduring initial setup to observe how the engine handles your current agent workflows without interrupting actual operations. - Fail-Open Design: Note that the engine is designed to fail-open. While this ensures system availability, audit logs remain the primary source for identifying missed blocks.
- Canonicalization: Always use absolute paths for your
pathAllowliststo avoid ambiguity in resolution. - Break-Glass: Remember that the
OPENCLAW_POLICY_BYPASSenvironment variable is strictly for emergencies; avoid its use in automated production pipelines to maintain audit integrity.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-joetomasone-policy-engine": {
"enabled": true,
"auto_update": true
}
}
}Tags
Flags: file-write, file-read, code-execution
Related Skills
doctorbot-ci-validator
Stop failing in production. Validate your GitHub Actions, GitLab CI & Keep workflows offline with surgical precision. Born from Keep bounty research, perfected for agents.
brand-butler-local-authority-engine
Brand Butler: Local Authority Engine — the white-glove SEO and AEO system for local service businesses. Use this skill immediately when the user asks about SEO rankings, backlinks, citations, site audits, Google Search Console indexing problems, competitor backlink analysis, directory submissions, schema markup, content placement articles, local map pack visibility, or AI answer engine optimization (Perplexity, ChatGPT, Google AI Overviews). Also triggers for any local business growth, online visibility, or 'why isn't my site ranking?' conversation. Works for agencies managing clients and business owners doing their own SEO. Covers HVAC, plumbing, electrical, law, dental, roofing, and any local service business. Built by Adrian Boysel.
social-vault
社交平台账号凭证管理器。提供登录态获取、AES-256-GCM 加密存储、定时健康监测和自动续期。Use when managing social media account credentials, importing cookies, checking login status, or automating session refresh. Also covers platform adapter creation and browser fingerprint management.
arc-shield
Output sanitization for agent responses - prevents accidental secret leaks
undertow
Skill discovery engine for AI coding agents. Recommends and installs the right skill when you need it — code review, test generation, debugging, commit messages, PR preparation, security scanning, dependency audits, Docker setup, CI/CD pipelines, API documentation, refactoring, performance optimization, bundle analysis, git recovery, README generation, license compliance, migration guides, dead code removal, and secret detection. One install gives your agent access to a curated library of 20+ developer workflow skills. Use when the user asks for help with any development workflow, code quality, DevOps, security, testing, documentation, or project setup task.