원클릭으로
telegram
Install, repair, and manage the multi-session Telegram channel server that allows switching between Claude Code sessions from Telegram
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Install, repair, and manage the multi-session Telegram channel server that allows switching between Claude Code sessions from Telegram
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | telegram |
| description | Install, repair, and manage the multi-session Telegram channel server that allows switching between Claude Code sessions from Telegram |
| user_invocable | true |
| tools_required | ["Bash","Read","Edit","Write"] |
This module intentionally ships no
phase.yaml— it contributes an MCP server and skill only, and is not loaded byregister_module_phases_from_disk.
This module can be configured via the admin panel's Setup page.
Manages the custom multi-session Telegram server that replaces the default plugin
server. This skill is self-contained: server.ts lives inside the skill
directory and is deployed by the install command.
Throughout this skill, <tg-state> refers to the Telegram state directory. The
canonical location is always inside the governed-workflow repository, at
<repo>/.local/channels/telegram/. Any other path you may encounter (for example
under ~/.claude/channels/) is stale and must not be used — server.ts,
access.json, .env, and sessions/ are read from the canonical location only.
Resolve <tg-state> at runtime, always preferring the env override and the
repo-rooted default in that order:
TG_STATE="${GOVERNED_WORKFLOW_TELEGRAM_STATE:-$(python3 -c 'from core.paths import REPO_ROOT; print(REPO_ROOT)')/.local/channels/telegram}"
If you ever find yourself reading or writing under ~/.claude/channels/telegram/,
stop and re-resolve <tg-state> from this skill — that path is not the source of
truth and edits there have no effect on the running server.
The source server.ts lives at <repo>/claude/modules/telegram/server.ts and is
deployed to <tg-state>/server.ts by the install command.
Arguments passed: (check the args variable from the skill invocation)
Parse the arguments (space-separated). If empty or unrecognized, run status.
enableEnables the custom multi-session server. If the server is already deployed at
<tg-state>/server.ts, skip re-copying and re-installing
dependencies — just re-patch the .mcp.json files. Otherwise run the full
install flow.
Steps:
<tg-state>/server.ts exists.
install flow (steps 1–7 of the
install section), then continue with step 4 below..mcp.json in both locations:
chflags nouchg ~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/.mcp.json 2>/dev/null
chflags nouchg ~/.claude/plugins/cache/claude-plugins-official/telegram/<version>/.mcp.json 2>/dev/null
# Write the custom-server config to both files
chflags uchg ~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/.mcp.json
chflags uchg ~/.claude/plugins/cache/claude-plugins-official/telegram/<version>/.mcp.json
autoUpdate: false is set for claude-plugins-official in
~/.claude/plugins/known_marketplaces.json. If the key is missing or set to
true, update it to false.disableDisables the custom multi-session server by restoring .mcp.json to the
default plugin config. Does NOT delete server.ts or .env.
Steps:
.mcp.json files:
chflags nouchg ~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/.mcp.json 2>/dev/null
chflags nouchg ~/.claude/plugins/cache/claude-plugins-official/telegram/<version>/.mcp.json 2>/dev/null
.mcp.json files to the default plugin config:
{
"mcpServers": {
"telegram": {
"command": "bun",
"args": ["run", "--cwd", "${CLAUDE_PLUGIN_ROOT}", "--shell=bun", "--silent", "start"]
}
}
}
server.ts, .env, and node_modules are
preserved. Run enable to re-activate the custom server.status<tg-state>/server.ts.mcp.json in the telegram plugin directory is patched (points to custom server vs default)<tg-state>/.env exists and contains BOT_TOKEN<tg-state>/sessions/, check PID liveness, list active sessionsinstallCreate <tg-state>/ if it doesn't exist
Copy server.ts from the skill directory to <tg-state>/server.ts:
cp <repo>/claude/modules/telegram/server.ts "$TG_STATE/server.ts"
Install dependencies alongside the server:
cp ~/.claude/plugins/cache/claude-plugins-official/telegram/$(ls ~/.claude/plugins/cache/claude-plugins-official/telegram/)/package.json "$TG_STATE/"
cd "$TG_STATE" && bun install --no-summary
Note: Bun resolves node_modules relative to the file location, not --cwd. Installing dependencies here ensures the server can find grammy and @modelcontextprotocol/sdk.
Find the telegram plugin directory:
ls ~/.claude/plugins/cache/claude-plugins-official/telegram/
Use the latest version directory.
Patch .mcp.json in ALL locations to point to the custom server. There are multiple copies that must all be patched:
~/.claude/plugins/cache/claude-plugins-official/telegram/<version>/.mcp.json (for each version dir)~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/.mcp.jsonAll must be set to:
{
"mcpServers": {
"telegram": {
"command": "bun",
"args": ["run", "/absolute/path/to/tg-state/server.ts"]
}
}
}
Use the actual expanded path to <tg-state>/server.ts (no ~ or env vars — bun requires an absolute literal path).
Important: The marketplace source copy is what Claude Code actually reads. If only the cache copy is patched, the fix won't take effect. Always patch both.
After patching, lock both .mcp.json files with the immutable flag to prevent auto-sync from reverting them:
chflags uchg ~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/.mcp.json
chflags uchg ~/.claude/plugins/cache/claude-plugins-official/telegram/0.0.4/.mcp.json
Set autoUpdate: false for claude-plugins-official in ~/.claude/plugins/known_marketplaces.json.
Read the file and update (or add) the autoUpdate key to false for that entry.
Check if <tg-state>/.env exists with a BOT_TOKEN line. If not, tell the user:
Bot token not found. Create
<tg-state>/.envwith:BOT_TOKEN=your_token_here
Confirm installation and tell the user to restart Claude Code sessions for the change to take effect.
repairRe-patches .mcp.json in ALL locations after a plugin update overwrites them.
Does NOT re-copy server.ts unless --force is passed.
Steps:
--force flag is present, copy server.ts from <repo>/claude/modules/telegram/server.ts to <tg-state>/server.ts<tg-state>/node_modules is missing, re-run bun install:
cd "$TG_STATE" && bun install --no-summary
.mcp.json in ALL locations (same as install step 5). For each location, unlock first,
write the custom-server config, then re-lock:
~/.claude/plugins/cache/claude-plugins-official/telegram/*/:
chflags nouchg ~/.claude/plugins/cache/claude-plugins-official/telegram/<version>/.mcp.json 2>/dev/null
# ... patch the file ...
chflags uchg ~/.claude/plugins/cache/claude-plugins-official/telegram/<version>/.mcp.json
chflags nouchg ~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/.mcp.json 2>/dev/null
# ... patch the file ...
chflags uchg ~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/.mcp.json
updateDeploys the latest server.ts from the skill directory, overwriting the currently
deployed one. Use this after editing the source file in the skill directory.
Steps:
<repo>/claude/modules/telegram/server.ts to <tg-state>/server.tsuninstallRestore .mcp.json to the default plugin config in ALL locations. Does NOT delete the custom server.
Steps:
.mcp.json files before writing:
chflags nouchg ~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/.mcp.json 2>/dev/null
chflags nouchg ~/.claude/plugins/cache/claude-plugins-official/telegram/<version>/.mcp.json 2>/dev/null
.mcp.json in each location to the default:
{
"mcpServers": {
"telegram": {
"command": "bun",
"args": ["run", "--cwd", "${CLAUDE_PLUGIN_ROOT}", "--shell=bun", "--silent", "start"]
}
}
}
server.ts and .env are preserved.sessions<tg-state>/sessions/kill -0 <pid>)name <new-name>Set the session name for the CURRENT session by calling the set_session_name MCP tool.
Note: this only works if the multi-session server is running in this session.
The tool is available as mcp__plugin_telegram_telegram__set_session_name.
WORKSPACE environment variable overrides this
(WORKSPACE=work claude --channels ...). If neither is set, a random s-<4hex>
name is used. Names can also be changed at runtime via set_session_name or
/telegram-multi-session name <name>.[session-name] so the
user can tell which Claude Code session is responding./sessions to list active sessions, /switch <name> to
route incoming messages to a specific session.claim_channel, channel_status,
set_session_name.node_modules alongside it.
This is required because bun resolves modules relative to the file location, not
the working directory..mcp.json but not the deployed server.ts. Run
/telegram-multi-session repair after any plugin update..mcp.json locations: The plugin has .mcp.json in both the cache
(~/.claude/plugins/cache/.../telegram/<version>/) AND the marketplace source
(~/.claude/plugins/marketplaces/.../external_plugins/telegram/). Claude Code
reads the marketplace source copy, so it MUST be patched. The repair command
patches all locations automatically.Cannot find module '@modelcontextprotocol/sdk/server/index.js': Dependencies are missing. Run:
cd "$TG_STATE" && bun install --no-summary
This happens if the install step was skipped or node_modules was deleted./telegram-multi-session update to deploy the fix. As a manual workaround, use
the claim_channel MCP tool from any live session, or restart a session.This skill is self-contained. server.ts is bundled inside the skill directory
so no external source is needed on a new device.
To set up on a new device:
<repo>/claude/modules/telegram/plugin:telegram@claude-plugins-official)/telegram-multi-session install — this also installs dependencies automatically<tg-state>/.env with BOT_TOKEN=your_token_here if not transferredNote: node_modules/, bun.lock, and package.json in <tg-state>/ are NOT
transferred between devices — they are regenerated by the install command.
Orchestrates a governed multi-phase implementation workflow — assessment, research, planning, execution, review, and delivery — with backend-enforced phase gates, scope locking, and proof-driven research.
Guides the orchestrator through phases 1.0-1.4 of the governed workflow — assessment, research, research proving, impact analysis, and preparation review. Produces a thorough, structured foundation before planning begins.
Guides the orchestrator through Phase 2.0 (Planning) of the governed workflow — structuring the execution plan (with per-item scope), proposing acceptance criteria, and collaborating with the plan-advisor teammate.
Initial workspace setup — configures modules and verification profiles based on user selections from the admin panel
Install, repair, and manage the multi-session Telegram channel server that allows switching between Claude Code sessions from Telegram
Manage project rules (.claude/rules/*.md with glob-based auto-loading). Use when authoring, editing, or deleting rule files via MCP, or when explaining how rule loading works to the user.