Interact with the Permissions Broker service to fetch data from Google APIs behind a Telegram approval gate. Use when an agent needs to read Google Drive/Doc...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install permissions-broker或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install permissions-broker⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/permissions-broker/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- 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. ---
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:
/key <name>
- 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.
PB_API_KEY"), never the secret value.Important:
Provider connections:
/connect./connect icloud returns a browser link to a broker-hosted form where the user enters an Apple ID app-specific password.Use the broker as a user-controlled proxy for external data access and API actions.
The mental model:
This skill is intentionally provider-agnostic. Provider support grows over time.
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:
Avoid:
Preferred framing:
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:
- 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.
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:
Authorization using the linked account; any caller-provided authorization header is ignored.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).The approval prompt includes:
GET /v1/proxy/requests/:id until the request is APPROVED.POST /v1/proxy/requests/:id/execute to execute and retrieve the upstream response bytes.Important:
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;
}
...安装 Permissions Broker 后,可以对 AI 说这些话来触发它
Help me get started with Permissions Broker
Explains what Permissions Broker does, walks through the setup, and runs a quick demo based on your current project
Use Permissions Broker to interact with the Permissions Broker service to fetch data from Goo...
Invokes Permissions Broker with the right parameters and returns the result directly in the conversation
What can I do with Permissions Broker in my marketing & growth workflow?
Lists the top use cases for Permissions Broker, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/permissions-broker/ 目录(个人级,所有项目可用),或 .claude/skills/permissions-broker/(项目级)。重启 AI 客户端后,用 /permissions-broker 主动调用,或让 AI 根据上下文自动发现并使用。
Permissions Broker 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Permissions Broker 可免费安装使用。请查阅仓库了解许可证信息。
Interact with the Permissions Broker service to fetch data from Google APIs behind a Telegram approval gate. Use when an agent needs to read Google Drive/Doc...
Permissions Broker 属于「Marketing & Growth」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my marketing & growth tasks using Permissions Broker
Identifies repetitive steps in your workflow and sets up Permissions Broker to handle them automatically