claude-to-im
Skill2 starsChanged 5 months agoMITView on GitHub
Use when working on the local Telegram bridge that lets the owner continue Codex or Claude sessions from Telegram, especially for setup, start/stop, health checks, restart questions, binding questions, or runtime reconfiguration.
- Reads credentials
5 other projects use a version of this.
Adopted by
Most recently taken up by
- ZhouYinLong-lab/Dog-Skillstheir own version, first seen Nov 8, 2026
- zkw15555506767-boop/claude-skillstheir own version, first seen Jun 24, 2026
- sss-hust/skillstheir own version, first seen Apr 5, 2026
- happynocode/claude-to-im-codex-plustheir own version, first seen Mar 14, 2026
- op7418/Claude-to-IM-skilltheir own version, first seen Mar 7, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- op7418/Claude-to-IM-skill★ 2.9ksame name
- ZhouYinLong-lab/Dog-Skills★ 7same name
- happynocode/claude-to-im-codex-plus★ 2same name
- sss-hust/skills★ 1same name
- zkw15555506767-boop/claude-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- lib/AGENTS.mdAGENTS.md
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. 0 are common, 18 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
18
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Use when the owner asks about the local Telegram bridge itself.
- Very specific: line 23
Use when the task is setup, start, stop, status, logs, doctor, or reconfigure.
- Distinctive: line 24
Use when the owner asks whether Telegram will continue the same session after restart.
- Very specific: line 25
Use when the owner asks how /bind, /sessions, topics, or local-session continuation behave.
- Distinctive: line 26
Do not use this skill for unrelated Telegram bot work or generic chat replies.
- Distinctive: line 29
Keep Telegram as the only chat channel.
- Distinctive: line 30
Keep runtime selection between Claude and Codex.
- Distinctive: line 31
Keep daemon control, health checks, and local-session continuation.
- Distinctive: line 32
Keep Telegram private chat, groups, and topics aligned with the current Codex runtime behavior.
- Distinctive: line 33
Do not reintroduce Discord, Feishu/Lark, QQ, or Weixin flows.
- Very specific: line 48
Default runtime if unset: claude.
- Distinctive: line 54
Keep group use owner-only by default through owner / allowlist checks
- Distinctive: line 55
Keep one separate bound session per Telegram topic
- Distinctive: line 57
Do not surface local Claude-runtime history when running the Codex runtime
- Distinctive: line 59
Keep the current active session easy to resume from Telegram
- Very specific: line 62
Ensure npm install and npm run build have been run.
- Very specific: line 63
Create ~/.claude-to-im/config.env from config.env.example.
- Distinctive: line 77
If a window or topic has never been bound before, the first normal message should create a session automatically.
- Very specific: line 79
If a bridge session already has an sdk_session_id, /sessions may merge that with matching local Codex history so the same underlying …
- Distinctive: line 86
Do not rebind just because the daemon was restarted.
- Distinctive: line 92
If a short prefix matches more than one session, the bridge should reject it as ambiguous instead of guessing.
- Distinctive: line 95
Default runtime should be Codex.
- Very specific: line 96
Default mode should be code.
- Distinctive: line 124
Keep instructions short and concrete.
- Distinctive: line 125
Prefer direct commands over long explanations.
- Very specific: line 126
If the bridge is broken, run doctor before guessing.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codex on Telegram
This skill manages a Telegram bridge for continuing local Claude/Codex sessions from mobile chat.
When to Use
- Use when the owner asks about the local Telegram bridge itself.
- Use when the task is
setup,start,stop,status,logs,doctor, orreconfigure. - Use when the owner asks whether Telegram will continue the same session after restart.
- Use when the owner asks how
/bind,/sessions, topics, or local-session continuation behave. - Do not use this skill for unrelated Telegram bot work or generic chat replies.
Scope
- Keep Telegram as the only chat channel.
- Keep runtime selection between Claude and Codex.
- Keep daemon control, health checks, and local-session continuation.
- Keep Telegram private chat, groups, and topics aligned with the current Codex runtime behavior.
- Do not reintroduce Discord, Feishu/Lark, QQ, or Weixin flows.
Commands
setup: explain the config file and required stepsstart: runbash scripts/daemon.sh startstop: runbash scripts/daemon.sh stopstatus: runbash scripts/daemon.sh statuslogs [N]: runbash scripts/daemon.sh logs Ndoctor: runbash scripts/doctor.shreconfigure: show the current config path and explain which fields to edit
This Install
- Absolute data home:
$HOME/.claude-to-im/ - Absolute config file:
$HOME/.claude-to-im/config.env - Launch/runtime invariant: this install must run with
CTI_HOME=$HOME/.claude-to-imwhen starting, stopping, checking, or regenerating launchd. - Default runtime if unset:
claude; Codex runs whenCTI_RUNTIME=codex, or whenautofalls back to Codex. - Bridge session records and bindings live under
$HOME/.claude-to-im/data/. - Local Codex history shown in
/sessionsdoes not come only from$HOME/.claude-to-im/; it is discovered from local Codex session files, usually under~/.codex/, or fromCTI_CODEX_SESSIONS_ROOTif that override is set.
Expected Behavior
- Let the owner continue a local Codex session from Telegram private chat, groups, and topics
- Keep group use owner-only by default through owner / allowlist checks
- Keep one separate bound session per Telegram topic
- Show local Codex history in
/sessions - Do not surface local Claude-runtime history when running the Codex runtime
- Ignore slash-command-only titles when naming local Codex sessions
- Keep the current active session easy to resume from Telegram
Setup flow
- Ensure
npm installandnpm run buildhave been run. - Create
~/.claude-to-im/config.envfromconfig.env.example. - Set Telegram fields (bot token, owner user ID, allowlist, etc.).
- For group use, set
CTI_TG_REQUIRE_PRIVATE_CHAT=false. - In BotFather, disable group privacy for the bot so normal group messages reach the bridge.
CTI_ENABLED_CHANNELS=telegramis already the code default; explain it when asked, but it is not the special fix for most setups.- Start the daemon.
Session and binding behavior
- Session records live in
~/.claude-to-im/data/sessions.json. - Telegram window/topic bindings live in
~/.claude-to-im/data/bindings.json. - Message history lives in
~/.claude-to-im/data/messages/. - Restarting the daemon should keep using the same bound session because those files are loaded again on startup.
- A Telegram window or topic does not need a fresh
/bindafter a normal restart. - If a window or topic has never been bound before, the first normal message should create a session automatically.
- Topic-enabled groups should keep one separate session per topic instead of one shared group session.
- If a bridge session already has an
sdk_session_id,/sessionsmay merge that with matching local Codex history so the same underlying session is not listed twice.
When rebind is actually needed
- Rebind only if the wrong session was bound on purpose or by mistake.
- Rebind if
bindings.jsonwas deleted, reset, or replaced. - Rebind if you want that Telegram window/topic to point at a different local session.
- Do not rebind just because the daemon was restarted.
/sessions and /bind
/sessionsshows the current bound session first, then other recent bridge sessions, then eligible local Codex sessions that are not already represented./bindaccepts the full session id or a unique prefix./bindcan match a bridge session id, a storedsdk_session_id, or a discovered local Codex session id.- If a short prefix matches more than one session, the bridge should reject it as ambiguous instead of guessing.
Current expected behavior
- Default runtime should be Codex.
- Default mode should be
code. CTI_CLAUDE_EFFORTis an optional override that only matters when this install is switched toCTI_RUNTIME=claudeas fallback. Only describe its configured value if it is actually set inconfig.env; do not claim the code hard-defaults it tohigh./sessionsin Codex runtime should show local Codex history only.- Local Codex session titles should ignore slash commands and prefer normal spoken prompts.
- The current session should always appear before other recent sessions in
/sessions. - Recent sessions should then be ordered by latest activity first.
- First normal message in a private chat, group, or topic should auto-create a session if none is bound yet.
- Topic-enabled groups should keep one separate session per topic.
Key config fields to explain when asked
CTI_RUNTIME: choosecodex,claude, orautoCTI_DEFAULT_WORKDIR: default working directory for newly created bridge sessionsCTI_DEFAULT_MODEL: default model for newly created bridge sessions when one is setCTI_DEFAULT_MODE: choosecode,plan, oraskCTI_CLAUDE_EFFORT: Claude thinking strength override when this install is run as a Claude fallbackCTI_CLAUDE_SETTING_SOURCES: Claude CLI setting sources for bridge sessions. Default isuser,project,local, which loads global/project instructions and enabled plugins such ascodex@openai-codex. Set tononeonly when SDK isolation is intentional. Because project/local settings can include hooks, MCP, permissions, and plugins, only/cwdinto directories you trust.CTI_CLAUDE_PLUGIN_DIRS: optional comma-separated local Claude plugin directories to load for bridge sessions.CTI_CODEX_PASS_MODEL: whether the stored/default model is forwarded into Codex runtime callsCTI_CODEX_SKIP_GIT_REPO_CHECK: whether Codex is allowed to run outside a detected git repoCTI_CODEX_APPROVAL_POLICY,CTI_CODEX_SANDBOX_MODE,CTI_CODEX_MODEL_REASONING_EFFORT,CTI_CODEX_NETWORK_ACCESS_ENABLED,CTI_CODEX_ADDITIONAL_DIRECTORIES: Codex runtime overridesCTI_TG_BOT_TOKEN: Telegram bot tokenCTI_TG_ALLOWED_USERS: who may use the botCTI_TG_OWNER_USER_ID: the owner lockCTI_TG_REQUIRE_PRIVATE_CHAT: whether groups/topics are allowedCTI_AUTO_APPROVE: whether permission prompts are skipped
Response style
- Keep instructions short and concrete.
- Prefer direct commands over long explanations.
- If the bridge is broken, run
doctorbefore guessing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

