Configure a Chat Channel with SecretRefs

VerifiedSafe

Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.

Sby Skills Guide Bot
DevOpsIntermediate
8/29/2026
Claude CodeCodex
#chat-channels#secrets-management#configuration#openclaw#cli

Recommended for

Automated summary

Configures a chat channel (Telegram, Discord, etc.) through non-interactive OpenClaw commands, accepting tokens only as SecretRefs, then verifies delivery with a real test message.

Strengths

  • Enforces strict secret hygiene: SecretRefs, a 0600 file, or a masked connect_channel prompt — never values in argv or hand-edited config files
  • Checks the config schema before writing, avoiding per-channel key-name mistakes
  • Always ends with an observable proof (a test send, dry-run first) or a precise account of why it could not be proven
  • Covers repair through openclaw doctor and a final report listing written config paths without exposing values

Limitations

  • Assumes a working OpenClaw install and gateway, plus channel credentials already obtained from the provider
  • The live test message depends on valid permissions and a valid destination ID, so it can fail for reasons outside the agent's control
  • Example config paths are illustrative; the per-channel documentation page must be consulted for the real keys
When to use it

Reach for it when a chat channel must be enabled or repaired and proven to work without ever exposing the token.

When not to use it

Skip it if the task is designing a custom messaging integration or changing code rather than configuring an existing gateway.

Security analysis

Safe
Quality score90/100

The skill instructs legitimate configuration of chat channels using an existing CLI, explicitly avoids exposing secrets in argv or output, and recommends SecretRefs and masked prompts. No destructive, exfiltrating, or obfuscated commands are present. Commands like 'openclaw doctor --fix' require approval and are scoped to channel repair.

No concerns found

How this analysis is made

Examples

Set up a Telegram channel
Configure the Telegram channel for our OpenClaw gateway using the TELEGRAM_BOT_TOKEN env var as a SecretRef, restrict it to my number +15555550123, and prove it works with a dry-run then a real test message.
Add Discord alongside Telegram
Patch the OpenClaw config to enable Discord (allowlist group policy) without touching the Telegram settings, then run doctor and show me the channel status.
Channel stopped delivering
Our Telegram channel stopped sending messages. Run openclaw doctor and channels status --deep, explain the blocker without printing any credentials, and only apply --fix after I approve.

name: configure-channel description: Configure and prove a chat channel with non-interactive one-liners; secrets only as SecretRefs.

Configure a channel

Never print or persist secret values; channel tokens enter config only as SecretRefs, or through the in-session connect_channel flow where the operator types the secret into a masked prompt. Never hand-edit config files on disk. Every run ends with the observable Prove result or an exact explanation of why it could not be proven.

Gather

openclaw channels list --all
openclaw channels status
openclaw config get channels --json        # "Config path not found" is normal before first setup

Confirm the exact config path before writing — key names differ per channel (channels.telegram.botToken, channels.discord.token, ...):

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

Mutate

Preferred shell path — token staged as an env var on the gateway process or in a 0600 file, wired as a SecretRef (Telegram example):

openclaw config set channels.telegram.botToken --ref-provider default --ref-source env --ref-id TELEGRAM_BOT_TOKEN
openclaw config set channels.telegram.allowFrom '["+15555550123"]' --strict-json

Multi-field changes in one validated write:

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

In-session alternative: call the connect_channel tool action with the channel id — the operator enters the token in a masked prompt, never in chat. Avoid openclaw channels add --token <value>: it puts the secret in argv and process listings.

Repair

openclaw doctor --non-interactive
openclaw channels status --deep

Apply openclaw doctor --fix --non-interactive only after approval, then re-check status.

Prove

Send one real, clearly labeled test message and confirm delivery from the command result (use --dry-run first to inspect the payload):

openclaw message send --channel telegram --target <chatId> --message "OpenClaw channel test — please ignore" --dry-run
openclaw message send --channel telegram --target <chatId> --message "OpenClaw channel test — please ignore"

If sending fails, report the exact account, permission, destination, or network blocker without exposing credentials.

Report

State the channel and account changed, the exact config paths written (never values), the test destination, and the observed delivery result. List any remaining operator action.

Further reference: https://docs.openclaw.ai/channels/telegram (and the matching page for other channels)

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/configure-a-chat-channel-with-secretrefs-mte1lki5/download' --output '.skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5/SKILL.md.part' && mv '.skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5/SKILL.md.part' '.skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5/SKILL.md' && test -s '.skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/configure-channel' && cp -R '.skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5' '.claude/skills/configure-channel'

Codex
test -f '.skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5/SKILL.md' && test -s '.skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/configure-channel' && cp -R '.skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5' '.agents/skills/configure-channel'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5'

openskills read 'configure-a-chat-channel-with-secretrefs-mte1lki5'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/configure-a-chat-channel-with-secretrefs-mte1lki5/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills