connecting-im-bot
Connect IM Channel Bots
Connect the current Agent to an IM platform so it can receive and send messages in the target app.
Read The Right Reference
After confirming which channel the user wants, read the matching reference file for credentials and exact steps:
- WeChat (official ClawBot) -> reference/wechat.md
- WeCom -> reference/wecom.md
- DingTalk -> reference/dingtalk.md
- Lark -> reference/lark.md
WeChat and WeCom are completely separate platforms. Do not mix them up. WeChat uses QR authorization and does not require
bot_idorsecret.
Default Flow
- Confirm the channel: If the user did not specify one, ask which IM platform they want: WeChat, WeCom, DingTalk, or Lark.
- Read the reference: Load the matching channel reference file.
- Collect credentials: Follow the instructions in that reference. WeChat does not need credentials because it uses QR authorization.
- Establish the connection: Run the
run_skills_snippetcode from the reference. - Report the result: If the connection succeeds, tell the user what to do next. If it fails, return the error and guide the next step.
Notes
- After a connection is established, it keeps running in the background. Credentials are saved to
.magic/config/im-channels.jsonand bound to the current sandbox. Restarting the same sandbox process should auto-reconnect without asking for setup again. - To disable auto-reconnect for a channel, edit
.magic/config/im-channels.jsonand set that channel'senabledfield tofalse. - All channels share the same Agent as the web session, so conversation history stays connected across surfaces.
- For WeChat, do not generate your own QR layout. Always use the mobile-width HTML template from the WeChat reference and paste the exact
{{QRCODE_JS_STRING_LITERAL}}value returned by the tool. - For WeChat, output the QR as exactly one
htmlfenced code block. Do not add extra prose before or after the block.
More from dtyq/magic
find-skill
Search and install skills from the platform skill library, skill market, or skillhub. Use when the agent needs to find or install a skill to expand its capabilities. Always search the platform first; fall back to skillhub only if nothing is found.
18ui-data-testid
Add stable `data-testid` attributes by default for new or refactored UI components. Use when implementing React/TSX views, shadcn/antd-style components, dropdown/menu configs, or interactive UI flows that need reliable selectors for unit/E2E tests.
17analyzing-data-html-report
Data analysis report development skill. Use when users need to develop data analysis reports, create analysis report projects, build static HTML analysis documents, or produce one-time analysis reports with visualization.
16skill-vetter
Security-first skill vetting protocol for AI agents. Use before installing any skill from the platform skill market, skillhub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns to determine whether a skill is safe to install.
16wiki-generator
通过分析代码结构与依赖,自动提取系统总体架构、核心特有功能模块的实现细节,并生成互相关联的多页面 Wiki 结构文档集。作为项目的架构知识库守护者,还负责在日常开发中解答疑问,并在架构变更时自动维护文档。
15env-manager
Manage persistent environment variables. Use when the user provides API keys or other configuration values that need to be saved and reused across sessions.
14