From claude-code-hermit
Guides activation of Claude Code channels for local/tmux users: reads config.json, installs plugins with bun/claude, configures bot tokens in project state dirs, and handles pairing prerequisites.
npx claudepluginhub gtapps/claude-code-hermit --plugin claude-code-homeassistant-hermitThis skill uses the workspace's default tool permissions.
Activate a channel configured in `config.json` for local/tmux operation. This mirrors what `docker-setup` does for Docker users but targets the local environment.
Configures Feishu channel for Claude Code: saves App ID/Secret to ~/.claude/channels/feishu/.env, creates directories, checks status. Use for credential setup or verification.
Adds Discord bot channel to ClaudeClaw: merges code from qwibitai/claudeclaw-discord repo, validates with npm build and vitest, guides interactive bot token setup and .env config.
Configures Telegram bot channel: saves token to .env, checks status, reviews access policy, and guides to secure allowlist lockdown.
Share bugs, ideas, or general feedback.
Activate a channel configured in config.json for local/tmux operation. This mirrors what docker-setup does for Docker users but targets the local environment.
Read .claude-code-hermit/config.json. Collect all entries under channels that are valid objects.
/claude-code-hermit:hatch or /claude-code-hermit:hermit-settings channels to add one first." Stop.AskUserQuestion (header: "Channel") — list channel names as options plus All — which to set up.Run steps 2–6 for each selected channel.
Run both checks in a single Bash call:
bun --version 2>/dev/null; uname -s
Bun missing (command fails / no output): tell the operator —
Bun is required for channel plugins but is not installed. Install: https://bun.sh Then re-run this skill.
Stop for this channel.
iMessage on non-macOS: if uname -s is not Darwin and the channel is imessage, note it's macOS-only and skip this channel.
Check if the plugin is already installed:
claude plugin list 2>/dev/null | grep -i "<channel>@claude-plugins-official"
claude plugin install <channel>@claude-plugins-official --scope localAfter any install (or if just installed): tell the operator to run /reload-plugins in this session to activate the plugin's configure and access commands before pairing.
Token env var names: discord → DISCORD_BOT_TOKEN, telegram → TELEGRAM_BOT_TOKEN.
Resolve state_dir:
channels.<channel>.state_dir from config.json..claude.local/channels/<channel>.Check if the token file already exists: <state_dir>/.env and contains the token var name.
<state_dir>/.env." → proceed to step 5.To create your bot and get a token, follow the official guide: https://code.claude.com/docs/en/channels
questions: [
{
header: "Bot token",
question: "Paste your bot token (or skip to add it later):",
options: [
{ label: "Skip", description: "I'll add the token to <state_dir>/.env manually" }
]
}
]
Operator pastes the token via Other, or selects Skip.
If token provided:
mkdir -p <state_dir><TOKEN_VAR>=<pasted-token> to <state_dir>/.env (overwrite if exists)chmod 600 <state_dir>/.env.claude.local/ is in .gitignore: check if .gitignore exists and contains .claude.local/; if missing, append .claude.local/.*_BOT_TOKEN from .claude/settings.local.json env block if present (tokens must only live in .env).channels.<channel>.state_dir was not set in config.json, write it now as a relative path (e.g. .claude.local/channels/<channel>).If Skip: print the manual command:
echo '<TOKEN_VAR>=your-token' > <state_dir>/.env && chmod 600 <state_dir>/.env
Then proceed to step 5 without a token (pairing will be skipped in step 5).
If no token is configured (skipped in step 4): print restart instructions and stop:
Restart Claude Code with channels active once you've added your token:
- With hermit:
hermit-start(passes--channelsautomatically)- Manual:
claude --channels plugin:<channel>@claude-plugins-official
If token is configured: check whether the channel is already active in the current session by checking if the channel's reply tool is available. If active, skip the restart prompt and go straight to the pairing question batch.
If not active, display:
Token saved. Restart Claude Code to activate the channel:
- With hermit:
hermit-start(passes--channelsautomatically)- Manual:
claude --channels plugin:<channel>@claude-plugins-officialAfter restarting, DM your bot — it will reply with a 6-character pairing code.
Then ask (both questions in a single AskUserQuestion call):
questions: [
{
header: "Ready?",
question: "Have you restarted Claude Code with the channel active?",
options: [
{ label: "Yes — ready to pair", description: "Channel is running, I've DM'd the bot" },
{ label: "Skip", description: "I'll pair later" }
]
},
{
header: "Pairing status",
question: "Is this channel already paired?",
options: [
{ label: "Not yet", description: "Need to pair now" },
{ label: "Already paired", description: "Just verify setup" }
]
}
]
/claude-code-hermit:channel-setup again after restarting to complete pairing."Pairing flow:
Ask with AskUserQuestion:
questions: [
{
header: "Pairing code",
question: "Paste the 6-character code your bot replied with:",
options: [
{ label: "Skip", description: "Pair later" }
]
}
]
If code provided (via Other):
/<channel>:access pair <code> — include the state dir hint in the message to the LLM running the tool: "save access.json to <state_dir>/ not ~/.claude"/<channel>:access policy allowlistIf Skip: "DM the bot later, then run /<channel>:access pair <code> and /<channel>:access policy allowlist." Stop.
Check if access.json exists at <state_dir>/access.json.
~/.claude/channels/<channel>/access.json. If found there, move it:
mkdir -p <state_dir>
mv ~/.claude/channels/<channel>/access.json <state_dir>/access.json
Confirm: "Moved access.json to <state_dir>/."/<channel>:access pair <code> after DMing your bot."Channel setup complete!
Channel: <channel>
Plugin: installed (--scope local)
Token: configured (<state_dir>/.env)
Paired: yes / skipped
State dir: <state_dir>
hermit-start passes --channels automatically on next boot.
If anything was skipped, list the remaining steps.