Signal hardened

From faberlens/hardened-skills · View interactive version

Signal hardened is an AI agent skill from the GitHub repository faberlens/hardened-skills. Bridge THIS Claude Code session to Telegram, Discord, Feishu/Lark, or QQ so the user can chat with Claude from their phone. Use for: setting up, starting, stopping, or diagnosing the claude-to-im bridge daemon; forwarding Claude replies to a messaging app; any phrase like "claude-to-im", "bridge", "

How to use this skill

Skill file

Claude-to-IM Bridge Skill

You are managing the Claude-to-IM bridge.

User data is stored at ~/.claude-to-im/.

The skill directory (SKILL_DIR) is at ~/.claude/skills/claude-to-im.

If that path doesn't exist, fall back to Glob with pattern **/skills/**/claude-to-im/SKILL.md and derive the root from the result.

Command parsing

Parse the user's intent from $ARGUMENTS into one of these subcommands:

| User says (examples) | Subcommand |

|---|---|

| setup, configure, 配置, 我想在飞书上用 Claude, 帮我连接 Telegram | setup |

| start, start bridge, 启动, 启动桥接 | start |

| stop, stop bridge, 停止, 停止桥接 | stop |

| status, bridge status, 状态, 运行状态, 怎么看桥接的运行状态 | status |

| logs, logs 200, 查看日志, 查看日志 200 | logs |

| reconfigure, 修改配置, 帮我改一下 token, 换个 bot | reconfigure |

| doctor, diagnose, 诊断, 挂了, 没反应了, bot 没反应, 出问题了 | doctor |

Disambiguation: status vs doctor — Use status when the user just wants to check if the bridge is running (informational). Use doctor when the user reports a problem or suspects something is broken (diagnostic). When in doubt and the user describes a symptom (e.g., "没反应了", "挂了"), prefer doctor.

Extract optional numeric argument for logs (default 50).

Before asking users for any platform credentials, first read SKILL_DIR/references/setup-guides.md to get the detailed step-by-step guidance for that platform. Present the relevant guide text to the user via AskUserQuestion — users often don't know where to find bot tokens or app secrets, so showing the guide upfront saves back-and-forth.

Runtime detection

Before executing any subcommand, detect which environment you are running in:

  1. Claude Code — AskUserQuestion tool is available. Use it for interactive setup wizards.
  2. Codex / other — AskUserQuestion is NOT available. Fall back to non-interactive guidance: explain the steps, show SKILL_DIR/config.env.example, and ask the user to create ~/.claude-to-im/config.env manually.

You can test this by checking if AskUserQuestion is in your available tools list.

Config check (applies to `start`, `stop`, `status`, `logs`, `reconfigure`, `doctor`)

Before running any subcommand other than setup, check if ~/.claude-to-im/config.env exists:

Subcommands

`setup`

Run an interactive setup wizard. This subcommand requires AskUserQuestion. If it is not available (Codex environment), instead show the contents of SKILL_DIR/config.env.example with field-by-field explanations and instruct the user to create the config file manually.

When AskUserQuestion IS available, collect input one field at a time. After each answer, confirm the value back to the user (masking secrets to last 4 chars only) before moving to the next question.

Step 1 — Choose channels

Ask which channels to enable (telegram, discord, feishu, qq). Accept comma-separated input. Briefly describe each:

Step 2 — Collect tokens per channel

For each enabled channel, read SKILL_DIR/references/setup-guides.md and present the relevant platform guide to the user. Collect one credential at a time:

1. QQ App ID (required) → confirm

2. QQ App Secret (required) → confirm (masked)

3. Allowed User OpenIDs (optional, press Enter to skip) — note: this is user_openid, NOT QQ number. If the user doesn't have openid yet, they can leave it empty.

4. Image Enabled (optional, default true, press Enter to skip) — if the underlying provider doesn't support image input, set to false

5. Max Image Size MB (optional, default 20, press Enter to skip)

Step 3 — General settings

Ask for runtime, default working directory, model, and mode:

Step 4 — Write config and validate

  1. Show a final summary table with all settings (secrets masked to last 4 chars)
  2. Ask user to confirm before writing
  3. Use Bash to create directory structure: mkdir -p ~/.claude-to-im/{data,logs,runtime,data/messages}
  4. Use Write to create ~/.claude-to-im/config.env with all settings in KEY=VALUE format
  5. Use Bash to set permissions: chmod 600 ~/.claude-to-im/config.env
  6. Validate tokens — read SKILL_DIR/references/token-validation.md for the exact commands and expected responses for each platform. This catches typos and wrong credentials before the user tries to start the daemon.
  7. Report results with a summary table. If any validation fails, explain what might be wrong and how to fix it.
  8. On success, tell the user: "Setup complete! Run /claude-to-im start to start the bridge."

`start`

Pre-check: Verify ~/.claude-to-im/config.env exists (see "Config check" above). Without it, the daemon will crash immediately and leave a stale PID file.

Run: bash "SKILL_DIR/scripts/daemon.sh" start

Show the output to the user. If it fails, tell the user:

`stop`

Run: bash "SKILL_DIR/scripts/daemon.sh" stop

`status`

Run: bash "SKILL_DIR/scripts/daemon.sh" status

`logs`

Extract optional line count N from arguments (default 50).

Run: bash "SKILL_DIR/scripts/daemon.sh" logs N

`reconfigure`

  1. Read current config from ~/.claude-to-im/config.env
  2. Show current settings in a clear table format, with all secrets masked (only last 4 chars visible)
  3. Use AskUserQuestion to ask what the user wants to change
  4. When collecting new values, read SKILL_DIR/references/setup-guides.md and present the relevant guide for that field
  5. Update the config file atomically (write to tmp, rename)
  6. Re-validate any changed tokens
  7. Remind user: "Run /claude-to-im stop then /claude-to-im start to apply the changes."

`doctor`

Run: bash "SKILL_DIR/scripts/doctor.sh"

Show results and suggest fixes for any failures. Common fixes:

For more complex issues (messages not received, permission timeouts, high memory, stale PID files), read SKILL_DIR/references/troubleshooting.md for detailed diagnosis steps.

Notes

Security Guardrails

<!-- Armored by Faberlens | 4 default guardrails applied · 20 configurable at faberlens.ai/explore/signal -->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.