Community程式設計與開發github.com

設定頻道

以非互動式單行指令設定並驗證聊天頻道;機密資訊僅透過 SecretRefs 處理。

設定頻道 是什麼?

此技能專為開發者與 AI 代理設計,提供安全可靠的頻道設定與驗證流程。其核心原則是絕不將機密值直接寫入設定檔或終端機輸出,而是透過 SecretRefs 或 `connect_channel` 工具來處理 token,確保敏感資訊不會暴露。此技能支援 Telegram 與 Discord 等常見頻道,並提供完整的「收集→變更→修復→驗證→報告」工作流程。開發者可以使用 `openclaw` CLI 指令來檢查現有設定、套用變更、使用 `doctor` 診斷問題,並透過發送測試訊息來驗證頻道功能。所有操作都強調必須事先取得使用者批准,並在報告中明確記錄修改的設定路徑(不含機密值)與測試結果,非常適合需要自動化且符合安全規範的 CI/CD 環境或 AI 輔助開發工作流程。

相容平台~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 的新對話。

說明文件

設定頻道 是做什麼的?

絕對不要列印或永久儲存機密值;頻道 token 只能以 SecretRefs 的方式進入設定檔,或是透過會話中的 connect_channel 流程,由操作者在遮罩提示中輸入機密資訊。絕不要手動編輯磁碟上的設定檔。每次執行都必須以可觀察的驗證結果或清楚解釋為何無法驗證來結束。

收集

openclaw channels list --all
openclaw channels status
openclaw config get channels --json        # 首次設定前出現「找不到設定路徑」為正常現象

在寫入前,請先確認確切的設定路徑 — 不同頻道的鍵名有所不同(channels.telegram.botToken、channels.discord.token……):

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

變更

在寫入前,務必與操作者確認預期要變更的帳號和存取權限。保留現有已核准的允許清單項目、dmPolicy 與 groupPolicy,除非已明確核准取代或變更它們;絕不要為了通過檢查而擴大存取權限。

建議的 shell 路徑 — token 以環境變數的形式暫存於閘道程序或 0600 權限的檔案中,再以 SecretRef 方式設定(Telegram 範例):

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

當機器人已連線且 DM 政策設為 pairing 時,請操作者傳送 DM 給機器人。在配對回覆中讀取「你的 Telegram 使用者 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 工具動作 — 操作者在遮罩提示中輸入 token,絕不在聊天中輸入。避免使用 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 檢查承載內容):

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.

相關技能