360 Secure SkillHub
360 安全技能中心

ClawPolicy

该 Skill 封装 ClawPolicy:面向低人工介入、可审计的自治执行策略引擎。提供安装指引、初始化、策略监督命令行(状态、最近、风险、暂停)以及确认、策略存储与 Markdown 转换导出的 Python API,本地策略存储位于 .clawpolicy/policy/;上游源码与发布不在本包内。

dzming
dzming
热度 85.37
最近更新 2026-05-11 17:30:11
分类:安全依赖:代码执行 / 读写文件应用场景:工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add clawpolicy
Metadata
name
clawpolicy
description
Install and use ClawPolicy, an explainable autonomous execution policy engine for low-touch, auditable agent execution. Supports initialization, policy supervision, status checks, risky/suspended inspection, and Python API usage.
metadata
{"openclaw":{"requires":{"bins":["python3","pip3"]},"install":[{"id":"pip","kind":"python","package":"clawpolicy","bins":["clawpolicy"],"label":"Install clawpolicy from PyPI"}]}}

ClawPolicy

ClawPolicy is an explainable autonomous execution policy engine for low-touch, auditable agent execution.

What it does

  • Initializes canonical local policy storage in .clawpolicy/policy/
  • Tracks policy lifecycle: hint -> candidate -> confirmed -> suspended -> archived
  • Exposes a supervision CLI: clawpolicy policy ...
  • Provides a stable Python API for confirmation, policy storage, and Markdown conversion/export

Install

python3 -m pip install clawpolicy

Optional extras:

python3 -m pip install "clawpolicy[phase3]"

Quick start

clawpolicy init
clawpolicy analyze
clawpolicy policy status
clawpolicy policy recent
clawpolicy policy risky
clawpolicy policy suspended

Verification

The published package should pass this minimal smoke path:

python3 -m pip install clawpolicy
clawpolicy --help
clawpolicy init
clawpolicy policy status
python -m clawpolicy policy status

Python API

from clawpolicy import (
    ConfirmationAPI,
    PolicyEvent,
    PolicyStore,
    Playbook,
    Rule,
    MarkdownToPolicyConverter,
    PolicyToMarkdownExporter,
    create_api,
)

References

  • Upstream repo: https://github.com/DZMing/clawpolicy
  • Chinese README: references/upstream-README.zh-CN.md
  • English README: references/upstream-README.md
  • Changelog: references/upstream-CHANGELOG.md
  • Security policy: references/upstream-SECURITY.md

Notes

  • This ClawHub package is a skill wrapper for the public clawpolicy project.
  • Canonical source code, releases, and issue tracking remain in the upstream GitHub repository.