Claims-based authorization for agents and operations. Grant, revoke, and verify permissions for secure multi-agent coordination. Use when: permission management
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-claims-c15e72bad41b ,按照其中的说明把「claims」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Claims-based authorization for secure agent operations and access control.
| 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 |
npx claude-flow claims check --agent agent-123 --claim write
npx claude-flow claims grant --agent agent-123 --claim write --scope "/src/**"
npx claude-flow claims revoke --agent agent-123 --claim write
npx claude-flow claims list --agent agent-123
| Pattern | Description |
|---|---|
* | All resources |
/src/** | All files in src |
/config/*.toml | TOML files in config |
memory:patterns | Patterns namespace |
| Level | Claims |
|---|---|
minimal | read only |
standard | read, write, execute |
elevated | + spawn, memory |
admin | all claims |
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.
| 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. |
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.
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.