Token导航 LogoToken导航

Agent Skill · 运维

agent-constitution-guard(Agent 宪法卫士)

agent-constitution-guard 用于补充运维相关能力,适合在 OpenClaw 中需要让 Agent 承接运维相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

agent-constitution-guard 是运维类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描有提醒项,按安装量在运维类的 954 个 Skill 里排第 665。

总安装 3,868周安装 158GitHub Stars 公开资料未说明下载 1,239核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.1

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:agent-constitution-guard(Agent 宪法卫士)
来源仓库:https://github.com/sky-lv/agent-constitution-guard
安装命令:
openclaw skills install agent-constitution-guard
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install agent-constitution-guard

这个 Skill 是做什么的

运维类 Skill 处理部署、监控、日志和云资源,多数需要较高的执行权限。

agent-constitution-guard 定义代理不可变的行为规则与安全边界。适用于 OpenClaw 中防止越权操作的关键防护层。提供权限分级与升级联锁机制。agent-constitution-guard 属于运维类 Skill,可作为该场景下的辅助能力补充。配置后需重启生效并定期审计规则有效性。

修改宪法文件可能影响现有任务执行。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install agent-constitution-guard;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

agent-constitution-guard 怎么安装?

在终端执行 openclaw skills install agent-constitution-guard。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

agent-constitution-guard 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

agent-constitution-guard 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

agent-constitution-guard 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

agent-constitution-guard 用的人多吗?

公开数据是累计安装 3,868 次,近一周安装 158 次,下载 1,239 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

agent-constitution-guard 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理运维类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

运维类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
docker-essentials

Docker 基础 · OpenClaw

1,005,15130接触敏感数据MIT-0通过
playwright-scraper-skill

Playwright scraper 技能 · OpenClaw

923,55754接触敏感数据MIT-0有提醒
moltguard

moltguard 搜索 · OpenClaw

825,096110接触敏感数据MIT-0通过
finance-news

财经新闻 · OpenClaw

275,51210需要联网MIT-0有提醒
security-monitor

安全监视器 · OpenClaw

224,1695需要联网MIT-0有提醒
agent-constitution-guard

Agent 宪法卫士 · 本页

3,868—接触敏感数据MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

description
Constitutional guardrails for AI agents — define immutable behavioral rules, permission boundaries, escalation policies, and safety interlocks that prevent agents from exceeding authorized scope regardless of context or pressure
keywords
openclaw, skill, automation, ai-agent, constitution, guardrail, safety, permission, boundary, behavioral-constraint, escalation, audit-trail, compliance, guard, restrict, deny, allow, policy
name
agent-constitution-guard
triggers
agent constitution, guardrail, permission guard, safety rule, behavioral constraint, boundary check, escalation policy, agent safety, immutable rule, compliance guard

agent-constitution-guard

Constitutional guardrails for AI agents — define immutable behavioral rules, permission boundaries, escalation policies, and safety interlocks that agents cannot override regardless of context or user pressure.

Skill Metadata

  • Slug: agent-constitution-guard
  • Version: 1.1.0
  • Author: SKY-lv
  • Description: Production-grade constitutional guardrails system for AI agents. Define immutable behavioral rules, multi-level permission boundaries, human escalation policies, safety interlocks, and comprehensive audit trails. Agents must obey these rules regardless of context, prompt injection, or social engineering attempts.
  • Category: safety
  • License: MIT
  • Trigger Keywords: constitution, guardrail, permission guard, safety rule, behavioral constraint, boundary check, escalation policy, agent safety, immutable rule, compliance guard, red line, permission boundary

Why This Matters

AI agents with access to files, APIs, and external systems need enforceable boundaries. Without constitutional guardrails:

  • An agent could delete production databases responding to a misleading prompt
  • An agent could exfiltrate sensitive data to external endpoints
  • An agent could spend thousands of dollars on API calls without oversight
  • An agent could modify system files, breaking the host environment

This skill provides enforceable, auditable, multi-layered protection.


Architecture

\\\ ┌─────────────────────────────────────┐ │ AGENT ACTION REQUEST │ └──────────────────┬──────────────────┘ │ ▼ ┌─────────────────────────────────────┐ │ Layer 1: IMMUTABLE CHECK │ ← Cannot be overridden by anyone │ (Hard safety boundaries) │ └──────────────────┬──────────────────┘ │ PASS ▼ ┌─────────────────────────────────────┐ │ Layer 2: POLICY ENGINE │ ← Rule-based permission checks │ (Context-aware rules) │ └──────────────────┬──────────────────┘ │ PASS ▼ ┌─────────────────────────────────────┐ │ Layer 3: ESCALATION │ ← Human approval for sensitive ops │ (Owner confirmation) │ └──────────────────┬──────────────────┘ │ APPROVED ▼ ┌─────────────────────────────────────┐ │ Layer 4: AUDIT LOG │ ← Every check is recorded │ (Immutable audit trail) │ └─────────────────────────────────────┘ \\\


Step-by-Step Usage

Step 1: Initialize Constitution

\\\bash node constitution.js init --name "my-agent" --owner "admin@company.com" \\\ Creates .constitution/ directory with default rules and audit log.

Step 2: Add Rules

\\\`bash

Immutable rule: never call external APIs without confirmation

node constitution.js rule add \ --level immutable \ --action deny \ --scope "external_write" \ --description "Never write to external APIs without owner confirmation" \ --escalation owner

Owner-only rule: can modify workspace files

node constitution.js rule add \ --level owner-only \ --action allow \ --scope "workspace_write" \ --description "Can write files within workspace directory"

Mutable rule: can read any file

node constitution.js rule add \ --level mutable \ --action allow \ --scope "file_read" \ --description "Read any local file" \\\`

Step 3: Check Permissions Before Action

\\\`javascript const guard = require('./constitution.js');

// Check if an action is allowed const decision = guard.check('external_write', { target: 'https://api.stripe.com/charges', payload: { amount: 9999 }, userId: 'user-123' });

console.log(decision); // { // allowed: false, // layer: 'immutable', // rule: 'R001', // reason: 'External write requires owner confirmation', // escalation: 'owner', // escalationMessage: 'Agent wants to POST to https://api.stripe.com/charges. Approve?' // } \\\`

Step 4: Handle Escalation

\\\`javascript if (!decision.allowed && decision.escalation) { // Send escalation request to owner const approved = await guard.escalate(decision, { channel: 'webhook', // or 'email', 'slack', 'console' timeout: 300000, // 5 min timeout details: decision.escalationMessage });

if (approved) { await executeAction(); } } \\\`

Step 5: Review Audit Trail

\\\`bash

View all decisions in last 24 hours

node constitution.js audit --last 24h

View only denied actions

node constitution.js audit --status denied

View audit for specific scope

node constitution.js audit --scope external_write

Export for compliance reporting

node constitution.js audit --export csv --output audit_2024_Q1.csv \\\`


Rule Levels Explained

LevelWho Can ModifyOverrideUse Case
ImmutableNobodyNeverDelete production, external network access, credential access
Owner-onlyAgent owner onlyNeverDeploy to production, modify billing, send emails
MutableAgent (within bounds)Self-adjustFile read paths, log verbosity, cache settings
AdvisoryAnyoneAlwaysPerformance hints, optimization suggestions

Real-World Examples

Example 1: Production Database Protection

\\\json { "id": "DB-PROTECT", "level": "immutable", "action": "deny", "scope": ["database_delete", "database_drop", "database_truncate"], "description": "Never delete, drop, or truncate any production database", "conditions": { "environment": ["production", "prod"] } } \\\

Example 2: Cost Control ($100/day API budget)

\\\json { "id": "COST-GUARD", "level": "owner-only", "action": "allow", "scope": "external_api_call", "description": "Allow external API calls within daily budget", "limits": { "maxDailyCost": 100, "maxCostPerCall": 10 }, "escalation": "owner" } \\\

Example 3: Data Privacy (GDPR Compliance)

\\\json { "id": "GDPR-GUARD", "level": "immutable", "action": "deny", "scope": ["data_export", "data_share"], "description": "Never export or share PII data without legal approval", "conditions": { "dataTypes": ["email", "phone", "ssn", "address", "financial"] } } \\\


Configuration Reference

\\\json { "constitution": { "version": "1.0", "agent": "my-agent", "owner": "admin@company.com", "defaults": { "denyAction": "block", "logLevel": "all", "escalationTimeout": 300000 }, "layers": { "immutable": { "enabled": true, "log": true }, "policy": { "enabled": true, "log": true }, "escalation": { "enabled": true, "channels": ["console"] }, "audit": { "enabled": true, "retention": "90d" } } } } \\\


Integration Patterns

Pattern 1: Middleware for Express/Fastify

\\\javascript app.use(async (req, res, next) => { const decision = guard.check('external_write', { method: req.method, url: req.url }); if (!decision.allowed) return res.status(403).json(decision); next(); }); \\\

Pattern 2: OpenClaw Skill Wrapper

\\\javascript // Before executing any tool call: const toolGuard = guard.checkForTool(toolName, toolParams); if (!toolGuard.allowed) { if (toolGuard.escalation === 'owner') { // Ask OpenClaw to prompt user for approval } return { blocked: true, reason: toolGuard.reason }; } \\\

Pattern 3: CI/CD Pipeline Gate

\\\`bash

In your deployment pipeline:

node constitution.js ci-check --env production --strict

Exit code 0 = safe to deploy, 1 = violations found

\\\`

平台分布

OpenClaw

79.21%
按下载量换算981

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills