← 返回 Skills 市场
shaiss

Local Approvals

作者 shaiss · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
1655
总下载
3
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install local-approvals
功能描述
Local approval system for managing agent permissions. Use CLI to approve/deny requests, view history, and manage auto-approved categories.
使用说明 (SKILL.md)

Local Approvals Skill

A local approval system that manages agent permissions with auto-approve lists and approval history tracking.

Quick Start

# List pending requests
python C:\Users\Shai\.openclaw\skills\local-approvals\cli.py list

# Approve a request
python C:\Users\Shai\.openclaw\skills\local-approvals\cli.py approve abc123

# Deny a request
python C:\Users\Shai\.openclaw\skills\local-approvals\cli.py deny abc123

# Show approval history
python C:\Users\Shai\.openclaw\skills\local-approvals\cli.py history

# Reset an agent's categories
python C:\Users\Shai\.openclaw\skills\local-approvals\cli.py reset assistant

Commands

approve(id)

Approve a pending request by ID.

python cli.py approve \x3Crequest_id> [--learn] [--reviewer \x3Cname>]

Options:

  • --learn: Add the category to the agent's auto-approve list
  • --reviewer: Who is approving (default: "user")

Example:

python cli.py approve abc123 --learn

deny(id)

Deny a pending request by ID.

python cli.py deny \x3Crequest_id> [--reviewer \x3Cname>]

Options:

  • --reviewer: Who is denying (default: "user")

Example:

python cli.py deny abc123

list_pending()

List all pending requests, optionally filtered by agent.

python cli.py list [--agent \x3Cagent_id>]

Options:

  • --agent: Filter requests by agent ID

Example:

python cli.py list --agent assistant

show_history()

Show approval history from state.json.

python cli.py history [--limit \x3Cnumber>]

Options:

  • --limit: Maximum number of entries to show (default: 20)

Example:

python cli.py history --limit 50

reset_categories(agent)

Reset an agent's auto-approved categories list.

python cli.py reset \x3Cagent_id>

Example:

python cli.py reset assistant

Additional Commands

categories

Show auto-approved categories for one or all agents.

python cli.py categories [--agent \x3Cagent_id>]

Options:

  • --agent: Show categories for specific agent

Example:

python cli.py categories --agent planner

State Files

The skill maintains two JSON files in the state directory:

  • state.json: Auto-approve lists and approval history
  • pending.json: Pending approval requests

Location: ~/.openclaw/skills/local-approvals/

Core Functions

The core.py module provides the underlying functionality:

  • check_auto_approve(agent, category) - Check if a category is auto-approved
  • submit_request(agent, category, operation, reasoning) - Submit a pending request
  • learn_category(agent, category) - Add category to auto-approve list
  • get_request(request_id) - Retrieve a request by ID
  • update_request(request_id, decision, reviewer) - Update request with decision
  • list_pending(agent) - List pending requests
  • get_agent_approvals(agent) - Get agent's auto-approved categories

Best Practices

  1. Review before approving: Always check the operation and reasoning before approving
  2. Use auto-learn carefully: Only use --learn for trusted categories that you want to auto-approve
  3. Check history regularly: Review history to understand approval patterns
  4. Reset when needed: Use reset to clear an agent's auto-approve list if you suspect issues

Examples

Complete Workflow

# 1. Check what's pending
python cli.py list

# 2. Review the request details (output shows agent, category, operation, reasoning)
# ID: abc123
#   Agent:     assistant
#   Category:  file_write
#   Operation: Create config file
#   Reasoning: Setting up new environment

# 3. Approve and auto-learn this category for future
python cli.py approve abc123 --learn

# 4. Verify it was approved
python cli.py list  # Should show no pending requests

# 5. Check history
python cli.py history

# 6. View auto-approved categories
python cli.py categories

Managing Categories

# View all auto-approved categories
python cli.py categories

# View categories for a specific agent
python cli.py categories --agent assistant

# Reset an agent's categories (clear all auto-approvals)
python cli.py reset assistant

Integration

The CLI is designed to be used both interactively and programmatically. Exit codes:

  • 0: Success
  • 1: Error (request not found, agent not found, etc.)

Files

  • cli.py - Command-line interface (this file)
  • core.py - Core approval functions
  • schemas/ - JSON schema definitions
  • schemas/state.json - State schema template
  • schemas/pending.json - Pending requests schema template
安全使用建议
What to consider before installing: - This is a local-only CLI that stores state in ~/.openclaw/skills/local-approvals (state.json and pending.json). Back up these files if you need an audit trail before testing. - The code does not request credentials or make external network calls, so it is coherent with a local approvals tool. Still inspect the included files yourself for any unexpected changes before running. - Be cautious with the "--learn"/auto-learn feature: approving and auto-learning a category will allow that category to be auto-approved in the future without review. Use reset to revoke learned categories if needed. - Metadata mismatches: _meta.json mentions multi-channel notifications and a GitHub homepage/repository that the code does not implement; verify origin/authenticity of the skill (check the repository or publisher) if provenance matters to you. - Minor technical notes: schemas include JavaScript-style comments (//) which are not valid JSON if you try to parse them as strict JSON; this is a documentation artifact not used at runtime. Also the code uses status/decision naming like 'decided' / 'denied' / 'approved' while schemas mention 'rejected' — this is inconsistent but not a security issue; it may cause confusion in integrations. - If you plan to allow agents to invoke skills autonomously, remember that this skill can be used to gate actions; ensure your agent's approval-requesting behavior and the human review process are aligned to avoid accidental auto-approvals. If you want higher assurance, ask the publisher for the canonical repository link and verify the published files match that source.
功能分析
Type: OpenClaw Skill Name: Developer: Version: Description: OpenClaw Agent Skill Suspicious High-Entropy/Eval files: 2 The OpenClaw AgentSkills skill bundle 'local-approvals' provides a local system for managing agent permissions, including approval/denial of requests, history tracking, and auto-approval categories. The `SKILL.md` documentation clearly outlines the skill's purpose and CLI commands, with no evidence of prompt injection attempts against the AI agent. The Python scripts (`cli.py`, `core.py`) handle local file I/O for state management within the designated `~/.openclaw/skills/local-approvals/` directory, which is standard for OpenClaw skills. There is no indication of data exfiltration, malicious execution, persistence mechanisms, or obfuscation. All code and documentation align with the stated benign purpose.
能力评估
Purpose & Capability
Name/description match the actual behavior: a local approvals CLI that reads/writes JSON state in ~/.openclaw/skills/local-approvals. Minor mismatch: _meta.json mentions "multi-channel notifications" and a remote repo/homepage, but the included code contains no notification or network logic and requires no credentials.
Instruction Scope
SKILL.md instructs running the local cli.py and references local state files under the user's home directory. The runtime instructions and the code operate only on local files and CLI args; they do not reference external endpoints, unrelated env vars, or system paths outside the skill's directory and the user's home.
Install Mechanism
No install spec or downloads are present; code is included in the bundle and runs with python. No external packages, URLs, or archive extraction are used.
Credentials
The skill does not request environment variables, credentials, or external config paths. It only reads/writes JSON under ~/.openclaw/skills/local-approvals, which is proportionate to a local approval system.
Persistence & Privilege
The skill persists state to ~/.openclaw/skills/local-approvals/state.json and pending.json (expected for this functionality). This is normal, but note that persisted 'auto_approve' entries can cause future operations to be auto-approved if the `--learn` option is used.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install local-approvals
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /local-approvals 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - local OSS approval system with category learning and multi-channel notifications
元数据
Slug local-approvals
版本 1.0.0
许可证
累计安装 3
当前安装数 3
历史版本数 1
常见问题

Local Approvals 是什么?

Local approval system for managing agent permissions. Use CLI to approve/deny requests, view history, and manage auto-approved categories. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1655 次。

如何安装 Local Approvals?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install local-approvals」即可一键安装,无需额外配置。

Local Approvals 是免费的吗?

是的,Local Approvals 完全免费(开源免费),可自由下载、安装和使用。

Local Approvals 支持哪些平台?

Local Approvals 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Local Approvals?

由 shaiss(@shaiss)开发并维护,当前版本 v1.0.0。

💬 留言讨论