claims

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Claims Authorization Skill

声明式授权Skill

Purpose

用途

Claims-based authorization for secure agent operations and access control.
为安全Agent操作与访问控制提供基于声明的授权机制。

Claim Types

声明类型

ClaimDescription
read
Read file access
write
Write file access
execute
Command execution
spawn
Agent spawning
memory
Memory access
network
Network access
admin
Administrative operations
声明描述
read
文件读取权限
write
文件写入权限
execute
命令执行权限
spawn
Agent创建权限
memory
内存访问权限
network
网络访问权限
admin
管理员操作权限

Commands

命令

Check Claim

检查声明

bash
npx claude-flow claims check --agent agent-123 --claim write
bash
npx claude-flow claims check --agent agent-123 --claim write

Grant Claim

授予声明

bash
npx claude-flow claims grant --agent agent-123 --claim write --scope "/src/**"
bash
npx claude-flow claims grant --agent agent-123 --claim write --scope "/src/**"

Revoke Claim

撤销声明

bash
npx claude-flow claims revoke --agent agent-123 --claim write
bash
npx claude-flow claims revoke --agent agent-123 --claim write

List Claims

列出声明

bash
npx claude-flow claims list --agent agent-123
bash
npx claude-flow claims list --agent agent-123

Scope Patterns

范围模式

PatternDescription
*
All resources
/src/**
All files in src
/config/*.toml
TOML files in config
memory:patterns
Patterns namespace
模式描述
*
所有资源
/src/**
src目录下所有文件
/config/*.toml
config目录下所有TOML文件
memory:patterns
模式命名空间内存

Security Levels

安全级别

LevelClaims
minimal
read only
standard
read, write, execute
elevated
+ spawn, memory
admin
all claims
级别包含声明
minimal
仅read
standard
read、write、execute
elevated
新增spawn、memory
admin
所有声明

Best Practices

最佳实践

  1. Follow principle of least privilege
  2. Scope claims to specific resources
  3. Audit claim usage regularly
  4. Revoke claims when no longer needed
  1. 遵循最小权限原则
  2. 为声明限定特定资源范围
  3. 定期审计声明使用情况
  4. 当声明不再需要时及时撤销