Community编程与开发github.com

configure-channel

使用非交互式单行命令配置并验证聊天频道;除 SecretRef 外不暴露密钥。

configure-channel 是什么?

该技能用于配置 OpenClaw 平台的聊天频道(如 Telegram、Discord 等),强调安全性和操作可审计性。它指导用户以非交互式、可重复的一行命令完成频道设置,并强制要求所有密钥值仅通过 SecretRef 环境变量或会话内的安全提示输入,严禁在 config 文件中明文存储或通过命令行参数传递。该技能包含完整的流程:先通过 `openclaw channels list` 等命令收集当前状态,然后通过 `config set` 或 `config patch` 修改配置(但需保持已有的 allowlist、dmPolicy 等不变除非明确批准),最后通过 `message send` 发送真实测试消息验证配置并报告结果。此外还涵盖通过 `openclaw doctor --lint` 进行诊断及修复的步骤。该技能支持所有 OpenClaw 支持的频道类型,其核心安全原则是“永不打印或持久化密钥值”。对于 AI 代理用户(如 Claude Code)而言,这是一份严格的操作手册,执行时需逐步骤确认并获得操作员批准后再执行变异操作。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/custodian-skills/configure-channel

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

配置频道

绝不要打印或持久化密钥值;频道令牌仅以 SecretRef 形式进入配置,或通过会话内的 connect_channel 流程让操作员在掩码提示中输入密钥。绝不要手动编辑磁盘上的配置文件。每次运行结束时必须输出可观测的 Prove 结果,或者明确说明为何无法验证。

收集

openclaw channels list --all
openclaw channels status
openclaw config get channels --json        # 首次设置前 "Config path not found" 是正常情况

在写入前确认确切的配置路径——不同频道的键名不同(channels.telegram.botToken、channels.discord.token 等):

openclaw config schema --json | jq '.properties.channels.properties.telegram'

变更

在写入前与操作员确认预期的账户和访问变更。保留已批准的现有 allowlist 条目、dmPolicy 和 groupPolicy,除非明确批准替换或更改;绝不要为了通过检查而放宽访问权限。

推荐的外壳路径——令牌作为环境变量设置于网关进程或存于 0600 权限的文件中,通过 SecretRef 引用(Telegram 示例):

openclaw config set channels.telegram.botToken --ref-provider default --ref-source env --ref-id TELEGRAM_BOT_TOKEN

当机器人已连接且 DM 策略为 pairing 时,要求操作员向机器人发送 DM。读取配对回复中的 Your Telegram user id,或者运行 openclaw logs --follow 并读取该发送者的 telegram pairing request 条目中的 senderUserId。捕获后停止跟踪;保持无关日志的私密性。如果当前策略阻止此流程,请使用已验证的 ID 或报告发现的阻塞问题;不要放宽访问权限。

使用数字形式的 Telegram 用户 ID,而不是电话号码、用户名、聊天/群组 ID 或机器人 ID。在此单用户示例中,123456789 是一个占位符:将其替换为已验证、批准的用户 ID,并保留任何其他批准的条目。

openclaw config set channels.telegram.allowFrom '["123456789"]' --strict-json

一次性验证的多字段变更:

openclaw config patch --stdin <<'JSON'
{ channels: { telegram: { enabled: true, groupPolicy: "allowlist" } } }
JSON

会话内替代方案:使用频道 ID 调用 connect_channel 工具操作——操作员在掩码提示中输入令牌,绝不在聊天中。避免使用 openclaw channels add --token <value>:它会在 argv 和进程列表中暴露密钥。

修复

openclaw doctor --lint
openclaw channels status --probe

doctor --lint 可能以退出码 1 返回发现的问题:阅读报告并继续其余检查。普通的 doctor 和 doctor --non-interactive 可能写入配置/状态;在批准前不要用于诊断。仅在明确批准后应用 openclaw doctor --fix --non-interactive,然后重新检查状态。

验证

发送一条真实的、明确标记的测试消息,并从命令结果确认投递(先使用 --dry-run 检查 payload):

openclaw message send --channel telegram --target <chatId> --message "OpenClaw 频道测试——请忽略" --dry-run
openclaw message send --channel telegram --target <chatId> --message "OpenClaw 频道测试——请忽略"

如果发送失败,报告确切的原因(账户、权限、目标或网络阻塞),不暴露凭据。

报告

说明更改的频道和账户、写入的确切配置路径(绝不包含值)、测试目标以及观察到的投递结果。列出任何剩余的操作员操作。

更多参考:https://docs.openclaw.ai/channels/telegram(以及其他频道的相应页面)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

相关技能