Synthèse automatique
Permet de relayer les conversations d'OpenCode/Claude Code vers des applications de messagerie comme Telegram, Discord, Feishu ou QQ.
Points forts
- Configuration interactive simplifiée via assistant
- Prise en charge de plusieurs plateformes de messagerie
- Commandes de diagnostic et de logs intégrées
- Détection automatique de l'environnement d'exécution
Limites
- Nécessite des credentials d'application de messagerie
- Ne fonctionne pas en mode non-interactif sans configuration manuelle
- Dépend de la disponibilité de l'outil AskUserQuestion
Utilisez cette compétence pour interagir avec un agent AI depuis votre téléphone via une application de messagerie.
Ne l'utilisez pas pour créer des bots autonomes ou intégrer des SDK de messagerie dans un projet.
Analyse de sécurité
SûrThe skill instructs setting up a legitimate bridge daemon via safe interactive prompts and local configuration. It does not contain any destructive, exfiltrating, or obfuscated actions, nor does it introduce remote code execution risks beyond the intended management.
Aucun point d'attention détecté
Comment cette analyse est faiteExemples
帮我连接飞书,设置 opencode-to-im 桥接Vérifiez le statut du pont opencode-to-imLe bot ne répond pas, lancez un diagnosticname: opencode-to-im description: | Bridge OpenCode (or Claude Code / Codex) sessions to Telegram, Discord, Feishu/Lark, or QQ so the user can chat from their phone. Use for: setting up, starting, stopping, or diagnosing the opencode-to-im bridge daemon; forwarding AI replies to a messaging app; any phrase like "opencode-to-im", "bridge", "消息推送", "消息转发", "桥接", "连上飞书", "手机上用", "启动后台服务", "诊断", "查看日志", "配置". Subcommands: setup, start, stop, status, logs, reconfigure, doctor. Do NOT use for: building standalone bots, webhook integrations, or coding with IM platform SDKs — those are regular programming tasks. argument-hint: "setup | start | stop | status | logs [N] | reconfigure | doctor" allowed-tools:
- Bash
- Read
- Write
- Edit
- AskUserQuestion
- Grep
- Glob
OpenCode-to-IM Bridge Skill
You are managing the OpenCode-to-IM bridge.
User data is stored at ~/.opencode-to-im/.
The skill directory (SKILL_DIR) is at ~/.claude/skills/opencode-to-im.
If that path doesn't exist, fall back to Glob with pattern **/skills/**/opencode-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, read SKILL_DIR/references/setup-guides.md internally so you know where to find each credential. Do NOT dump the full guide to the user upfront — only mention the specific next step they need to do (e.g., "Go to https://open.feishu.cn → your app → Credentials to find the App ID"). If the user says they don't know how, then show the relevant section of the guide.
Runtime detection
Before executing any subcommand, detect which environment you are running in:
- OpenCode / Claude Code —
AskUserQuestiontool is available. Use it for interactive setup wizards. - Codex / other —
AskUserQuestionis NOT available. Fall back to non-interactive guidance: explain the steps, showSKILL_DIR/config.env.example, and ask the user to create~/.opencode-to-im/config.envmanually.
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 ~/.opencode-to-im/config.env exists:
- If it does NOT exist:
- In OpenCode / Claude Code: tell the user "No configuration found" and automatically start the
setupwizard using AskUserQuestion. - In Codex: tell the user "No configuration found. Please create
~/.opencode-to-im/config.envbased on the example:" then show the contents ofSKILL_DIR/config.env.exampleand stop. Don't attempt to start the daemon — without config.env the process will crash on startup and leave behind a stale PID file that blocks future starts.
- In OpenCode / Claude Code: tell the user "No configuration found" and automatically start the
- If it exists: proceed with the requested subcommand.
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:
- telegram — Best for personal use. Streaming preview, inline permission buttons.
- discord — Good for team use. Server/channel/user-level access control.
- feishu (Lark) — For Feishu/Lark teams. Streaming cards, tool progress, inline permission buttons.
- qq — QQ C2C private chat only. No inline permission buttons, no streaming preview. Permissions use text
/perm ...commands.
Step 2 — Collect tokens per channel
For each enabled channel, collect one credential at a time. Tell the user where to find each value in one sentence. Only show the full guide section (from SKILL_DIR/references/setup-guides.md) if the user asks for help or says they don't know how:
- Telegram: Bot Token → confirm (masked) → Chat ID (see guide for how to get it) → confirm → Allowed User IDs (optional). Important: At least one of Chat ID or Allowed User IDs must be set, otherwise the bot will reject all messages.
- Discord: Bot Token → confirm (masked) → Allowed User IDs → Allowed Channel IDs (optional) → Allowed Guild IDs (optional). Important: At least one of Allowed User IDs or Allowed Channel IDs must be set, otherwise the bot will reject all messages (default-deny).
- Feishu: App ID → confirm → App Secret → confirm (masked) → Domain (optional) → Allowed User IDs (optional). After collecting credentials, explain the two-phase setup the user must complete:
- Phase 1 (before starting bridge): (A) batch-add permissions, (B) enable bot capability, (C) publish first version + admin approve. This makes permissions and bot effective.
- Phase 2 (requires running bridge): (D) run
/opencode-to-im start, (E) configure events (im.message.receive_v1) and callback (card.action.trigger) with long connection mode, (F) publish second version + admin approve. - Why two phases: Feishu validates WebSocket connection when saving event subscription — if the bridge isn't running, saving will fail. The bridge needs published permissions to connect.
- Keep this to a short checklist — show the full guide only if asked.
- QQ: Collect two required fields, then optional ones:
- QQ App ID (required) → confirm
- QQ App Secret (required) → confirm (masked)
- Tell the user: these two values can be found at https://q.qq.com/qqbot/openclaw
- 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. - Image Enabled (optional, default true, press Enter to skip) — if the underlying provider doesn't support image input, set to false
- Max Image Size MB (optional, default 20, press Enter to skip)
- Remind user: QQ first version only supports C2C private chat sandbox access. No group/channel support, no inline buttons, no streaming preview.
Step 3 — General settings
Ask for runtime, default working directory, model, and mode:
- Runtime:
opencode(default),claude,codex,autoopencode— uses OpenCode SDK (requiresopencode serverunning; auth via config.yaml)claude— uses Claude Code CLI + Claude Agent SDK (requiresclaudeCLI installed)codex— uses OpenAI Codex SDK (requirescodexCLI; auth viacodex auth loginorOPENAI_API_KEY)auto— tries OpenCode first, falls back to Claude if server not reachable
- Working Directory: default
$CWD - Model (optional): Leave blank to inherit the runtime's own default model. If the user wants to override, ask them to enter a model name. Do NOT hardcode or suggest specific model names — the available models change over time.
- Mode:
code(default),plan,ask
Step 4 — Write config and validate
- Show a final summary table with all settings (secrets masked to last 4 chars)
- Ask user to confirm before writing
- Use Bash to create directory structure:
mkdir -p ~/.opencode-to-im/{data,logs,runtime,data/messages} - Use Write to create
~/.opencode-to-im/config.envwith all settings in KEY=VALUE format - Use Bash to set permissions:
chmod 600 ~/.opencode-to-im/config.env - Validate tokens — read
SKILL_DIR/references/token-validation.mdfor the exact commands and expected responses for each platform. This catches typos and wrong credentials before the user tries to start the daemon. - Report results with a summary table. If any validation fails, explain what might be wrong and how to fix it.
- On success, tell the user: "Setup complete! Run
/opencode-to-im startto start the bridge."
start
Pre-check: Verify ~/.opencode-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:
- Run
doctorto diagnose:/opencode-to-im doctor - Check recent logs:
/opencode-to-im logs
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
- Read current config from
~/.opencode-to-im/config.env - Show current settings in a clear table format, with all secrets masked (only last 4 chars visible)
- Use AskUserQuestion to ask what the user wants to change
- When collecting new values, tell the user where to find the value; only show the full guide from
SKILL_DIR/references/setup-guides.mdif they ask for help - Update the config file atomically (write to tmp, rename)
- Re-validate any changed tokens
- Remind user: "Run
/opencode-to-im stopthen/opencode-to-im startto apply the changes."
doctor
Run: bash "SKILL_DIR/scripts/doctor.sh"
Show results and suggest fixes for any failures. Common fixes:
- SDK cli.js missing →
cd SKILL_DIR && npm install - dist/daemon.mjs stale →
cd SKILL_DIR && npm run build - Config missing → run
setup
For more complex issues (messages not received, permission timeouts, high memory, stale PID files), read SKILL_DIR/references/troubleshooting.md for detailed diagnosis steps.
Feishu upgrade note: If the user upgraded from an older version of this skill and Feishu is returning permission errors (e.g. streaming cards not working, typing indicators failing, permission buttons unresponsive), the root cause is almost certainly missing permissions or callbacks in the Feishu backend. Refer the user to the "Upgrading from a previous version" section in SKILL_DIR/references/setup-guides.md — they need to add new scopes (cardkit:card:write, cardkit:card:read, im:message:update, im:message.reactions:read, im:message.reactions:write_only), add the card.action.trigger callback, and re-publish the app. The upgrade requires two publish cycles because adding the callback needs an active WebSocket connection (bridge must be running).
Notes
- Always mask secrets in output (show only last 4 characters) — users often share terminal output in bug reports, so exposed tokens would be a security incident.
- Always check for config.env before starting the daemon — without it the process crashes on startup and leaves a stale PID file that blocks future starts (requiring manual cleanup).
- The daemon runs as a background Node.js process managed by platform supervisor (launchd on macOS, setsid on Linux, WinSW/NSSM on Windows).
- Config persists at
~/.opencode-to-im/config.env— survives across sessions.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/opencode-to-im-bridge-mryiqg5n/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/opencode-to-im-bridge-mryiqg5n' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/opencode-to-im-bridge-mryiqg5n/download' --output '.skill-downloads/opencode-to-im-bridge-mryiqg5n/SKILL.md.part' && mv '.skill-downloads/opencode-to-im-bridge-mryiqg5n/SKILL.md.part' '.skill-downloads/opencode-to-im-bridge-mryiqg5n/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/opencode-to-im-bridge-mryiqg5n/SKILL.md' && test -s '.skill-downloads/opencode-to-im-bridge-mryiqg5n/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/opencode-to-im' && cp -R '.skill-downloads/opencode-to-im-bridge-mryiqg5n' '.claude/skills/opencode-to-im'Codex
test -f '.skill-downloads/opencode-to-im-bridge-mryiqg5n/SKILL.md' && test -s '.skill-downloads/opencode-to-im-bridge-mryiqg5n/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/opencode-to-im' && cp -R '.skill-downloads/opencode-to-im-bridge-mryiqg5n' '.agents/skills/opencode-to-im'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/opencode-to-im-bridge-mryiqg5n'openskills read 'opencode-to-im-bridge-mryiqg5n'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/opencode-to-im-bridge-mryiqg5n/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Lecteur PDF
Productivite
Lit et extrait le texte de fichiers PDF (rapports, contrats, tableurs). Gère les fichiers locaux, les URL et les pièces jointes WhatsApp. Utilisez-le dès qu'un contenu PDF est nécessaire, même sans demande explicite.
Workflows de messagerie Discord
Productivite
Utilisez l'outil message pour envoyer, modifier et modérer des messages Discord avec des composants interactifs.
Aperçu interactif des verdicts
Productivite
Générer un aperçu HTML interactif des verdicts (garder/supprimer) pour la revue par le mainteneur, puis traiter le JSON de retour.