Auto-Updater Skill
一个面向 Other 场景的 Agent 技能。原始说明:Automatically update Clawdbot and all installed skills once daily. Runs via cron, checks for updates, applies them, and messages the user with a summary of what changed.
name: enterprise-legal-guardrails
description: Legal/compliance guardrails for outbound OpenClaw actions (anti-spam, defamation, privacy, financial claims).
Use this skill to preflight bot output before posting, messaging, or publishing anything that could create legal/compliance risk.
A generic outbound guardrail checker used by workflows before execute actions such as post/comment/message/chat/send in any app.
create_post, create_comment, send_message, or equivalent publish actions.Use it as a shared OpenClaw outbound safety layer for any skill that publishes content.
Babylon is only one current integration example, not the primary purpose of the skill.
python3 scripts/check_enterprise_guardrails.py \
--action post \
--app <app_name> \
--policies social antispam hr \
--text "Draft text here"
python3 scripts/check_enterprise_guardrails.py \
--action comment \
--scope include \
--apps whatsapp,telegram \
--text "Draft text here"
python3 scripts/check_enterprise_guardrails.py \
--action market-analysis \
--text "Market commentary..." \
--json
Scope applies to any app-context passed with --app and these env vars (legacy names preserved for compatibility):
ENTERPRISE_LEGAL_GUARDRAILS_OUTBOUND_SCOPE (all|include|exclude)ENTERPRISE_LEGAL_GUARDRAILS_OUTBOUND_APPS (comma-separated list)BABYLON_GUARDRAILS_SCOPEBABYLON_GUARDRAILS_OUTBOUND_SCOPEBABYLON_GUARDRAILS_APPSExamples:
all: check all outbound content.include + whatsapp,email: only check those apps.exclude + whatsapp,email,moltbook,babylon: everything except these apps.If scope is omitted, default is all.
social: public social text, comments, announcements.antispam: unsolicited/pumping/coordinating messaging.hr: workplace, hiring, performance, or employee conduct language.privacy: personally identifying data and private information disclosures.market: market/financial claims and outcome assertions.legal: legal conclusions/implication language.If no profile is provided, defaults are derived from --action:
post|comment|message → social,legaltrade|market-analysis → market,financialgeneric → legal,socialPASS: safe to executeWATCH: low risk; optional rewriteREVIEW: human/legal review recommendedBLOCK: do not executeYou can tune decision sensitivity via environment variables (or CLI flags in direct runs):
ENTERPRISE_LEGAL_GUARDRAILS_REVIEW_THRESHOLD (default: 5)ENTERPRISE_LEGAL_GUARDRAILS_BLOCK_THRESHOLD (default: 9)CLI overrides:
--review-threshold--block-thresholdLegacy aliases are supported in legacy env names: ELG_* and BABYLON_GUARDRAILS_*.
For skills/tools without native guardrail hooks (for example: Gmail, custom website
publishing, custom message bots), run outbound operations through the wrapper:
python3 /path/to/enterprise-legal-guardrails/scripts/guard_and_run.py --app <app_name> --action <post|comment|message|trade|market-analysis|generic> --text "$DRAFT" -- <outbound command...>
Examples:
# Gmail via gog
python3 /path/to/enterprise-legal-guardrails/scripts/guard_and_run.py --app gmail --action message --text "Hello, ..." -- gog gmail send --to user@domain.com --subject "Update" --body "Hello, ..."
# Website/publication publish flow
python3 /path/to/enterprise-legal-guardrails/scripts/guard_and_run.py --app website --action post --text "$POST_COPY" -- npm run publish-post "$POST_COPY"
Use this wrapper to apply the same policy checks in non-Babylon outbound flows.
Legacy name legal-risk-checker is preserved in OpenClaw workspaces that still reference it.
See references/guardrail-policy-map.md for the full policy rule set and suggested rewrites.
A distributable bundle is available at:
dist/enterprise-legal-guardrails.skillguard_and_run.pyFor non-native outbound integrations, treat guard_and_run as an execution
boundary. Recommended flags/env:
Execution safety is allowlist-first by default. Wrapper requires explicit--allowed-command (or env alias) unless --allow-any-command is explicitly enabled.
--allow-any-command / ENTERPRISE_LEGAL_GUARDRAILS_ALLOW_ANY_COMMAND--suppress-allow-any-warning / ENTERPRISE_LEGAL_GUARDRAILS_SUPPRESS_ALLOW_ANY_WARNING--allow-any-command is intentionally enabled.--allow-any-command-reason / ENTERPRISE_LEGAL_GUARDRAILS_ALLOW_ANY_COMMAND_REASONallow-any bypass invocation. Suggested format: SEC-1234: emergency fix.--allow-any-command-approval-token / ENTERPRISE_LEGAL_GUARDRAILS_ALLOW_ANY_COMMAND_APPROVAL_TOKENallow-any bypass invocation; stored as a short token fingerprint in audit logs.--allowed-command <exe...> / ENTERPRISE_LEGAL_GUARDRAILS_ALLOWED_COMMANDS--strict / ENTERPRISE_LEGAL_GUARDRAILS_STRICTREVIEW to hard block.--sanitize-env--keep-env <VAR...> / --keep-env-prefix <PREFIX...>--command-timeout, --checker-timeout, --max-text-bytes--audit-log <file> / ENTERPRISE_LEGAL_GUARDRAILS_AUDIT_LOGThese flags provide execution safety, command scoping, and immutable trail for
post-incident review without changing checker logic.