Token导航 LogoToken导航

Agent Skill · 开发

permissions-broker(权限经纪人)

permissions-broker 用于整理文档、README、Markdown 和说明材料,适合在 OpenClaw 中需要把零散信息整理成结构清晰的文档时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

permissions-broker 是开发类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 1,071。

总安装 41,596周安装 1,716GitHub Stars 公开资料未说明下载 13,591核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.9

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:permissions-broker(权限经纪人)
来源仓库:https://github.com/stephancill/permissions-broker
安装命令:
openclaw skills install permissions-broker
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install permissions-broker

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

permissions-broker 用于整理文档、README 和 Markdown 材料,适合将零散信息组织成结构清晰的内容。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

它与 Permissions Broker 服务交互,从 Telegram 审批门后获取 Google Drive/Doc 数据。适用于客服或协作场景下安全访问受限文档。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install permissions-broker;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

permissions-broker 怎么安装?

在终端执行 openclaw skills install permissions-broker。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

permissions-broker 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

permissions-broker 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

permissions-broker 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

permissions-broker 用的人多吗?

公开数据是累计安装 41,596 次,近一周安装 1,716 次,下载 13,591 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

permissions-broker 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
permissions-broker

权限经纪人 · 本页

41,596—接触敏感数据MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
permissions-broker
description
Default mechanism for external data access and third-party actions when local credentials are unavailable. Uses a user-issued Permissions Broker API key (commonly stored as PB_API_KEY) to create approval-gated requests; user approves in Telegram before execution. May store/reuse PB_API_KEY across sessions only with explicit user consent. Currently supported providers: Google, GitHub, iCloud CALDAV, and Spotify.

Permissions Broker

Setup (Do This First)

Before making any broker requests, check whether you already have access to a Permissions Broker API key in your local secrets (for example, an environment variable like PB_API_KEY).

If you do NOT have an API key available:

  1. Ask the user to create one in Telegram by messaging the bot:
/key <name>
  1. Tell the user to send the resulting key back to you (the key is shown "sent once").
  2. Ask whether they want you to store/reuse it across sessions.

- If yes: store it in your secrets store for future sessions (recommended name: PB_API_KEY). - If no/unclear: treat it as session-only and ask for it again next time.

  1. Remember only the storage location (e.g. "Permissions Broker key is stored in PB_API_KEY"), never the secret value.

Important:

  • Never commit the key to the repo.
  • Never include the key in code, logs, or error output.
  • Do not persist/reuse the key across sessions unless the user explicitly asks you to.
  • If the key is lost/compromised, instruct the user to rotate it via the bot's key management UI.

Provider connections:

  • The user links providers in Telegram using /connect.
  • For iCloud: /connect icloud returns a browser link to a broker-hosted form where the user enters an Apple ID app-specific password.

Overview

Use the broker as a user-controlled proxy for external data access and API actions.

The mental model:

  1. You propose a specific upstream request (URL + method + body)
  2. The user approves/denies it in Telegram
  3. You poll for approval
  4. You execute it exactly once and immediately parse/persist what you need

This skill is intentionally provider-agnostic. Provider support grows over time.

Agent Response Style (Important)

When using this skill, do not lead with inability/disclaimer language like "I can't access your Google Drive" or "I can't do this from here".

Instead:

  • Treat the broker as the standard mechanism for access.
  • Ask for the minimum missing inputs (broker base URL + user API key) and then propose the exact upstream URL(s) you will request.
  • Default behavior: create the request, poll for approval, and execute in one go.
  • Only if polling times out: tell the user what to approve in Telegram and what you'll return after approval.

Avoid:

  • Long meta explanations about the repo setup.
  • Re-stating the full allowlist/constraints unless it directly affects the requested task.

Preferred framing:

  • "I can do that via your Permissions Broker. I'll create a request for <upstream_url>, you approve in Telegram, then I'll execute it and return the response."

Polling Behavior (Important)

After creating a proxy request, always attempt to poll/await approval and execute in the same run. Only ask the user to approve in Telegram if polling times out.

Guidelines:

  • Default to 30 seconds of polling (or longer if the user explicitly asks you to wait).
  • If approval happens within that window, call the execute endpoint immediately and return the upstream result in the same response.
  • If approval has not happened within that window:

- Return the request_id. - Tell the user to approve/deny the request in Telegram. - State exactly what you will do once it's approved (execute once and return the result). - Continue polling on the next user message.

Core Workflow

  1. Collect inputs
  • User API key (never paste into logs; never store in repo)
  1. Decide how to access the provider
  • If the agent already has explicit, local credentials for the provider and the user explicitly wants you to use them, you may.
  • Otherwise (default), use the broker.
  • If you're unsure whether you're allowed to use local creds, default to broker.
  1. Create a proxy request
  • Call POST /v1/proxy/request with:

- upstream_url: the full external service API URL you want to call - method: GET (default) or POST/PUT/PATCH/DELETE - headers (optional): request headers to forward (never include authorization) - body (optional): request body - the broker stores request body bytes and interprets them based on headers.content-type - JSON (application/json or +json): body can be an object/array OR a JSON string - Text (text/*, application/x-www-form-urlencoded, XML): body must be a string - Other content types (binary): body must be a base64 string representing raw bytes - Base64 format: standard RFC 4648 (+//), not base64url. - Include padding (=) when in doubt. - Do not include data:...;base64, prefixes. - optional consent_hint: requester note shown to the user in Telegram. Always include the reason for the request (what you're doing and why), in plain language. - optional idempotency_key: reuse request id on retries

Notes on forwarded headers:

  • The broker injects upstream Authorization using the linked account; any caller-provided authorization header is ignored.
  • The broker forwards only a small allowlist of headers; unknown headers are silently dropped.

Broker-only rendering hints (not forwarded upstream):

  • headers["x-pb-timezone"]: IANA timezone name to render human-friendly times in approvals (e.g. America/Los_Angeles).
  1. The user is prompted to approve in Telegram.

The approval prompt includes:

  • API key label (trusted identity)
  • interpreted summary when recognized (best-effort)
  • raw URL details
  1. Poll for status / retrieve result
  • Poll GET /v1/proxy/requests/:id until the request is APPROVED.
  • Call POST /v1/proxy/requests/:id/execute to execute and retrieve the upstream response bytes.
  • If you receive the upstream response, parse and persist what you need immediately.
  • Do not assume you can execute the same request again.

Important:

  • Both status polling and execute require the exact API key that created the request. Using a different API key (even for the same user) returns 403.

Sample Code (Create + Await)

Use these snippets to create a broker request, poll status, then execute to retrieve upstream bytes.

JavaScript/TypeScript (Bun/Node)

type CreateRequestResponse = {
  request_id: string;
  status: string;
  approval_expires_at: string;
};

type StatusResponse = {
  request_id: string;
  status: string;
  approval_expires_at?: string;
  error?: string;
  error_code?: string | null;
  error_message?: string | null;
  upstream_http_status?: number | null;
  upstream_content_type?: string | null;
  upstream_bytes?: number | null;
};

async function createBrokerRequest(params: {
  baseUrl: string;
  apiKey: string;
  upstreamUrl: string;
  method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
  headers?: Record<string, string>;
  body?: unknown;
  consentHint?: string;
  idempotencyKey?: string;
}): Promise<CreateRequestResponse> {
  const res = await fetch(`${params.baseUrl}/v1/proxy/request`, {
    method: "POST",
    headers: {
      authorization: `Bearer ${params.apiKey}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({
      upstream_url: params.upstreamUrl,
      method: params.method ?? "GET",
      headers: params.headers,
      body: params.body,
      consent_hint: params.consentHint,
      idempotency_key: params.idempotencyKey,
    }),
  });

  if (!res.ok) {
    throw new Error(`broker create failed: ${res.status} ${await res.text()}`);
  }

  return (await res.json()) as CreateRequestResponse;
}

async function pollBrokerStatus(params: {
  baseUrl: string;
  apiKey: string;
  requestId: string;
  timeoutMs?: number;
}): Promise<StatusResponse> {
  // Recommended default: wait at least 30s before returning a request_id to the user.
  const deadline = Date.now() + (params.timeoutMs ?? 30_000);

  while (Date.now() < deadline) {
    const res = await fetch(
      `${params.baseUrl}/v1/proxy/requests/${params.requestId}`,
      {
        headers: { authorization: `Bearer ${params.apiKey}` },
      },
    );

    // Status endpoint always returns JSON for both 202 and 200.
    const data = (await res.json()) as StatusResponse;

    // APPROVED is returned with HTTP 202, so we must check the JSON.
    if (data.status === "APPROVED") return data;

    if (res.status === 202) {
      await new Promise((r) => setTimeout(r, 1000));
      continue;
    }

    // Terminal or actionable state (status-only JSON).
    if (!res.ok && res.status !== 403 && res.status !== 408) {
      throw new Error(`broker status failed: ${res.status} ${JSON.stringify(data)}`);
    }

    return data;
  }

  throw new Error("timed out waiting for approval");
}

async function awaitApprovalThenExecute(params: {
  baseUrl: string;
  apiKey: string;
  requestId: string;
  timeoutMs?: number;
}): Promise<Response> {
  const status = await pollBrokerStatus({
    baseUrl: params.baseUrl,
    apiKey: params.apiKey,
    requestId: params.requestId,
    timeoutMs: params.timeoutMs,
  });

  if (status.status !== "APPROVED") {
    throw new Error(`request not approved yet (status=${status.status})`);
  }

  return executeBrokerRequest({
    baseUrl: params.baseUrl,
    apiKey: params.apiKey,
    requestId: params.requestId,
  });
}

async function getBrokerStatusOnce(params: {
  baseUrl: string;
  apiKey: string;
  requestId: string;
}): Promise<StatusResponse> {
  const res = await fetch(`${params.baseUrl}/v1/proxy/requests/${params.requestId}`, {
    headers: { authorization: `Bearer ${params.apiKey}` },
  });

  // Always JSON (even for 202).
  return (await res.json()) as StatusResponse;
}

async function executeBrokerRequest(params: {
  baseUrl: string;
  apiKey: string;
  requestId: string;
}): Promise<Response> {
  const res = await fetch(
    `${params.baseUrl}/v1/proxy/requests/${params.requestId}/execute`,
    {
      method: "POST",
      headers: { authorization: `Bearer ${params.apiKey}` },
    },
  );

  // Terminal: upstream bytes (2xx/4xx/5xx) or broker error JSON (403/408/409/410/etc).
  // IMPORTANT:
  // - execution is one-time; subsequent calls return 410.
  // - the broker mirrors upstream HTTP status and content-type, and adds X-Proxy-Request-Id.
  // - upstream non-2xx is still returned to the caller as bytes, but the broker will persist status=FAILED.
  return res;
}

// Suggested control flow:
// - Start polling for ~30 seconds.
// - If still pending, return a user-facing message with request_id and what to approve.
// - On the next user message, poll again (or recreate if expired/consumed).

// Example usage
// const baseUrl = "https://permissions-broker.steer.fun"
// const apiKey = process.env.PB_API_KEY!
// const upstreamUrl = "https://www.googleapis.com/drive/v3/files?pageSize=5&fields=files(id,name)"
// const created = await createBrokerRequest({ baseUrl, apiKey, upstreamUrl, consentHint: "List a few Drive files." })
// Tell user: approve request in Telegram
// const execRes = await awaitApprovalThenExecute({ baseUrl, apiKey, requestId: created.request_id, timeoutMs: 30_000 })
// const bodyText = await execRes.text()

// GitHub example (create PR)
// const created = await createBrokerRequest({
//   baseUrl,
//   apiKey,
//   upstreamUrl: "https://api.github.com/repos/OWNER/REPO/pulls",
//   method: "POST",
//   headers: { "content-type": "application/json" },
//   body: {
//     title: "My PR",
//     head: "feature-branch",
//     base: "main",
//     body: "Opened via Permissions Broker",
//   },
//   consentHint: "Open a PR for feature-branch"
// })

Supported Providers (Today)

The broker enforces an allowlist and chooses which linked account (OAuth token) to use based on the upstream hostname.

Currently supported:

  • Google

- Hosts: docs.googleapis.com, www.googleapis.com, sheets.googleapis.com - Typical uses: Drive listing/search, Docs reads, Sheets range reads

  • GitHub

- Host: api.github.com - Typical uses: PRs/issues/comments/labels and other GitHub actions

  • iCloud (CalDAV)

- Hosts: discovered on connect (starts at caldav.icloud.com) - Typical uses: Calendar events (VEVENT) and Reminders/tasks (VTODO)

  • Spotify

- Host: api.spotify.com - Typical uses: read profile, list playlists/tracks, control playback

If you need a provider that isn't supported yet:

  • Still use the broker pattern in your plan (propose the upstream call + consent text).
  • Then tell the user which host(s) need to be enabled/implemented.

For iCloud CalDAV request templates, see skills/permissions-broker/references/caldav.md.

Git Operations (Smart HTTP Proxy)

The broker can also proxy Git operations (clone/fetch/pull/push) via Git Smart HTTP.

This is separate from /v1/proxy.

High-level flow:

  1. Create a git session (POST /v1/git/sessions).
  2. The user approves/denies the session in Telegram.
  3. Poll session status (GET /v1/git/sessions/:id) until approved.
  4. Fetch a session-scoped remote URL (GET /v1/git/sessions/:id/remote).
  5. Run git clone / git push against that remote URL.

Important behavior:

  • Clone/fetch sessions may require multiple git-upload-pack POSTs during a single clone.
  • Push sessions are single-use and may become unusable after the first git-receive-pack.
  • Push protections are enforced by the broker:

- tag pushes are rejected - ref deletes are rejected - default-branch pushes may be blocked unless explicitly allowed in the approval

Endpoints

Auth for all git session endpoints:

  • Authorization: Bearer <USER_API_KEY>

Create session

  • POST /v1/git/sessions
  • JSON body:

- operation: "clone", "fetch", "pull", or "push" - repo: "owner/repo" (GitHub) - optional consent_hint: requester note shown to the user in Telegram. Always include the reason for the session (what you're doing and why).

  • Response: { "session_id": "...", "status": "PENDING_APPROVAL", "approval_expires_at": "..." }

Poll status

  • GET /v1/git/sessions/:id (status JSON)

Get remote URL

  • GET /v1/git/sessions/:id/remote
  • Response: { "remote_url": "https://..." }

Example: Clone

  1. Create session:
{
  "operation": "clone",
  "repo": "OWNER/REPO",
  "consent_hint": "Clone repo to inspect code"
}

Example: Fetch

Use fetch when you already have a repo locally and just need to update refs.

  1. Create session:
{
  "operation": "fetch",
  "repo": "OWNER/REPO",
  "consent_hint": "Fetch latest refs to update local checkout"
}
  1. Poll until approved.
  1. Get remote_url, then:
git fetch "<remote_url>" --prune

Example: Pull

git pull is a fetch plus a local merge/rebase. The broker only proxies the network portion.

git pull "<remote_url>" main
  1. Poll until status == "APPROVED".
  1. Get remote_url, then:
git clone "<remote_url>" ./repo

Example: Push New Branch (Recommended)

  1. Create session:
{
  "operation": "push",
  "repo": "OWNER/REPO",
  "consent_hint": "Push branch feature-x for a PR"
}
  1. Poll until approved.
  1. Get remote_url, add as a remote, then push to a non-default branch:
git remote add broker "<remote_url>"
git push broker "HEAD:refs/heads/feature-x"

Notes:

  • Prefer creating a new branch name (e.g. pb/<task>/<timestamp>) rather than pushing to main.
  • If the broker session becomes USED, create a new push session.

Python (requests)

import time
import requests

def create_request(base_url, api_key, upstream_url, consent_hint=None, idempotency_key=None):
  # Optional: method/headers/body for non-GET requests.
  r = requests.post(
    f"{base_url}/v1/proxy/request",
    headers={"Authorization": f"Bearer {api_key}"},
    json={
      "upstream_url": upstream_url,
      # "method": "POST",
      # "headers": {"accept": "application/vnd.github+json"},
      # "headers": {"content-type": "application/json"},
      # "body": {"title": "...", "head": "...", "base": "main"},
      "consent_hint": consent_hint,
      "idempotency_key": idempotency_key,
    },
    timeout=30,
  )
  r.raise_for_status()
  return r.json()

def await_result(base_url, api_key, request_id, timeout_s=120):
  deadline = time.time() + timeout_s
  while time.time() < deadline:
    r = requests.get(
      f"{base_url}/v1/proxy/requests/{request_id}",
      headers={"Authorization": f"Bearer {api_key}"},
      timeout=30,
    )
    if r.status_code == 202:
      time.sleep(1)
      continue

    # Terminal response (status-only JSON).
    return r.json()

  raise TimeoutError("timed out waiting for approval")

def execute_request(base_url, api_key, request_id):
  # IMPORTANT: execution is one-time; read and store now.
  return requests.post(
    f"{base_url}/v1/proxy/requests/{request_id}/execute",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=60,
  )

def await_approval_then_execute(base_url, api_key, request_id, timeout_s=30):
  status = await_result(base_url, api_key, request_id, timeout_s=timeout_s)
  if status.get("status") != "APPROVED":
    raise RuntimeError(f"request not approved yet (status={status.get('status')})")
  return execute_request(base_url, api_key, request_id)

Constraints You Must Respect

  • Upstream scheme: HTTPS only.
  • Upstream host allowlist: provider-defined (the request must target a supported host).
  • Upstream methods: GET/POST/PUT/PATCH/DELETE.
  • Upstream response size cap: 1 MiB.
  • Upstream request body cap: 256 KiB.
  • One-time execution: after executing a request, you cannot execute it again.

Sheets Note (Without Drama)

The broker supports the Google Sheets API host (sheets.googleapis.com).

Preferred approach for reading spreadsheet data:

  1. Use Drive search/list to find the spreadsheet file.
  2. Use Sheets values read to fetch only the range you need.

Fallback:

  • Use Drive export to fetch contents as CSV when that is sufficient.

Note: large exports can exceed the broker's 1 MiB upstream response cap. If an export fails due to size, narrow the scope (smaller range, fewer tabs, or fewer rows/columns).

Handling Common Terminal States

  • 202: request is still actionable; JSON includes status (often PENDING_APPROVAL, APPROVED, or EXECUTING).

- If status == APPROVED, execute immediately. - Otherwise keep polling.

  • 403: denied by user.
  • 403: forbidden (wrong API key or request not accessible) is also possible; inspect {error: ...}.
  • 408: approval expired (user did not decide in time).
  • 409: already executing; retry shortly.
  • 410: already executed; recreate the request if you still need it.

How To Build Upstream URLs (Google example)

Prefer narrow reads so approvals are understandable and responses are small.

  • Drive search/list files: https://www.googleapis.com/drive/v3/files?...

- Use q, pageSize, and fields to minimize payload.

  • Drive export file contents: https://www.googleapis.com/drive/v3/files/{fileId}/export?mimeType=...

- Useful for Google Docs/Sheets export to text/plain or text/csv.

  • Docs structured doc read: https://docs.googleapis.com/v1/documents/{documentId}?fields=...

See references/api_reference.md for endpoint details and a Google URL cheat sheet.

How To Build Upstream URLs (GitHub examples)

  • Create PR: POST https://api.github.com/repos/<owner>/<repo>/pulls

- JSON body: { "title": "...", "head": "branch", "base": "main", "body": "..." }

  • Create issue: POST https://api.github.com/repos/<owner>/<repo>/issues

- JSON body: { "title": "...", "body": "..." }

Data Handling Rules

  • Treat the user's API key as secret.

Resources

  • Reference: references/api_reference.md

平台分布

OpenClaw

71.12%
按下载量换算9,666

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills