claims
它能做什么
这项技能管理 AI 智能体的权限,让你可以授予、检查和撤销对文件、命令、记忆和网络的访问。适合运行多个智能体、并需要明确限定每个智能体能做什么的人。
适用场景
- ✓当你希望智能体能访问部分文件、但不能访问其他文件的时候。
- ✓当多个智能体共享一个项目、并需要清晰且受限的权限的时候。
- ✓当你想审查或移除已不再需要的访问权限的时候。
技能链接
https://github.com/ruvnet/ruflo/blob/main/.agents/skills/claims/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请只允许我的写作智能体修改 src 文件夹中的文件,并取消它的网络访问权限。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会把每项权限记录为一条带有范围的声明,例如文件夹模式,并在执行操作前检查这些声明。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Claims Authorization Skill
Purpose
Claims-based authorization for secure agent operations and access control.
Claim Types
| Claim | Description |
|---|---|
read |
Read file access |
write |
Write file access |
execute |
Command execution |
spawn |
Agent spawning |
memory |
Memory access |
network |
Network access |
admin |
Administrative operations |
Commands
Check Claim
npx claude-flow claims check --agent agent-123 --claim write
Grant Claim
npx claude-flow claims grant --agent agent-123 --claim write --scope "/src/**"
Revoke Claim
npx claude-flow claims revoke --agent agent-123 --claim write
List Claims
npx claude-flow claims list --agent agent-123
Scope Patterns
| Pattern | Description |
|---|---|
* |
All resources |
/src/** |
All files in src |
/config/*.toml |
TOML files in config |
memory:patterns |
Patterns namespace |
Security Levels
| Level | Claims |
|---|---|
minimal |
read only |
standard |
read, write, execute |
elevated |
+ spawn, memory |
admin |
all claims |
Best Practices
- Follow principle of least privilege
- Scope claims to specific resources
- Audit claim usage regularly
- Revoke claims when no longer needed
Cross-Host Work Claims (federation, v3.40.0+)
Distinct from the authorization claims above: work claims coordinate ownership of a task or resource across agents, and now propagate across a cross-host federation so a claim made on one node is visible to the whole swarm.
Runtime tools (local ledger)
| Tool | Purpose |
|---|---|
claims_claim |
Take ownership of an issue/resource (with optional TTL). |
claims_release |
Give up a claim you hold. |
claims_handoff / claims_accept-handoff |
Transfer a claim to another agent. |
claims_steal / claims_mark-stealable |
Work-stealing for stalled claims. |
claims_status / claims_list |
Inspect current ownership. |
Federated (cross-host)
Publish claim events into a federation room (federation_bbs_publish) so ownership converges across
hosts. Message types: ClaimIssued / ClaimReleased / ClaimHandoff / ClaimAck.
Rules: one owner per resourceId; first valid ClaimIssued wins (ties → earliest ts, then smallest
from); ClaimReleased or expired TTL frees it; ClaimHandoff only from the current owner; a
coordinator posts ClaimAck naming the authoritative owner.
Before shared work: claim, sync, and proceed only if you are the acknowledged owner. When a claim
must be both cross-host visible and runtime-enforced, mirror the two — publish the federation claim
message and call claims_claim. See the cross-host-federation skill (ruflo-bbs-federation plugin)
for the transport.
Scoping a claim stream to a channel (ADR-386)
By default every claim event lands in the shared swarm stream, where any relay member reads it. To keep a team's ownership ledger separate — or unreadable by the rest of the relay — publish claim messages into a channel instead:
npx ruflo federation channel --action create --name platform-team --visibility private
npx ruflo federation channel --action grant --channel prv:<hex> --pubkey <teammate 64-hex>
npx ruflo federation channel --action publish --channel prv:<hex> \
--type ClaimIssued --payload '{"resourceId":"repo/foo","ttlSeconds":7200}'
npx ruflo federation channel --action read --channel prv:<hex>
Reduction rules are unchanged; only the audience changes. Two caveats before relying on it: a private
channel hides content but not metadata (the relay still sees who published and when), and a claim
nobody outside the channel can read cannot arbitrate against a claim made outside it. If ownership
must be swarm-wide, keep it on the open stream. See the open-federation skill for channel mechanics.
常见问题
可以控制哪些类型的访问?
这项技能列出了读取、写入、执行、派生、记忆、网络和管理等声明。
安全级别有哪些?
这项技能描述了最小、标准、提升和管理四个级别,每个级别都有一组声明。
访问权限可以收回吗?
可以。这项技能包括一个撤销命令,可用于任何已不再需要的声明。
详情
作者的原始描述
Claims-based authorization for agents and operations. Grant, revoke, and verify permissions for secure multi-agent coordination. Use when: permission management, access control, secure operations, authorization checks. Skip when: open access, no security requirements, single-agent local work.
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1525
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。