local-approvals
Local approval system for managing agent permissions. Use CLI to approve/deny requests, view history, and manage auto-approved categories.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- local-approvals
- description
- Local approval system for managing agent permissions. Use CLI to approve/deny requests, view history, and manage auto-approved categories.
02 资源文件 7
- 参考文档_meta.json282 B
- 脚本cli.py10.5 KB
- 脚本core.py6.5 KB
- 参考文档pending.json1.2 KB
- 参考文档schemas/pending.json1.8 KB
- 参考文档schemas/state.json794 B
- 参考文档state.json75 B
03 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 <request_id> [--learn] [--reviewer <name>]
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 <request_id> [--reviewer <name>]
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 <agent_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 <number>]
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 <agent_id>
Example:
python cli.py reset assistant
Additional Commands
categories
Show auto-approved categories for one or all agents.
python cli.py categories [--agent <agent_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-approvedsubmit_request(agent, category, operation, reasoning)- Submit a pending requestlearn_category(agent, category)- Add category to auto-approve listget_request(request_id)- Retrieve a request by IDupdate_request(request_id, decision, reviewer)- Update request with decisionlist_pending(agent)- List pending requestsget_agent_approvals(agent)- Get agent's auto-approved categories
Best Practices
- Review before approving: Always check the operation and reasoning before approving
- Use auto-learn carefully: Only use
--learnfor trusted categories that you want to auto-approve - Check history regularly: Review
historyto understand approval patterns - Reset when needed: Use
resetto 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: Success1: Error (request not found, agent not found, etc.)
Files
cli.py- Command-line interface (this file)core.py- Core approval functionsschemas/- JSON schema definitionsschemas/state.json- State schema templateschemas/pending.json- Pending requests schema template
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.