← Back to Skills Marketplace
shaiss

Local Approvals

by shaiss · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
1655
Downloads
3
Stars
3
Active Installs
1
Versions
Install in OpenClaw
/install local-approvals
Description
Local approval system for managing agent permissions. Use CLI to approve/deny requests, view history, and manage auto-approved categories.
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install local-approvals
  3. After installation, invoke the skill by name or use /local-approvals
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release - local OSS approval system with category learning and multi-channel notifications
Metadata
Slug local-approvals
Version 1.0.0
License
All-time Installs 3
Active Installs 3
Total Versions 1
Frequently Asked Questions

What is Local Approvals?

Local approval system for managing agent permissions. Use CLI to approve/deny requests, view history, and manage auto-approved categories. It is an AI Agent Skill for Claude Code / OpenClaw, with 1655 downloads so far.

How do I install Local Approvals?

Run "/install local-approvals" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Local Approvals free?

Yes, Local Approvals is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Local Approvals support?

Local Approvals is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Local Approvals?

It is built and maintained by shaiss (@shaiss); the current version is v1.0.0.

💬 Comments