Skip to main content
ClaudeWave
Skill4.9k estrellas del repoactualizado 2d ago

im-channels

The im-channels skill handles incoming messages from instant messaging platforms (WeChat, WeCom, DingTalk, Lark) and helps connect Claude Code agents to those platforms. Use this skill when a user message includes an `<im>` metadata block indicating IM channel origin, or when setting up a new IM bot integration. The skill explains how to access media files already downloaded to the workspace and guides the connection process using platform-specific credential and authentication steps.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/dtyq/magic /tmp/im-channels && cp -r /tmp/im-channels/backend/super-magic/agents/skills/im-channels ~/.claude/skills/im-channels
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# IM Channels

This skill covers two scenarios: **connecting** an IM bot, and **understanding incoming messages** from IM channels.

---

## Scenario A: Incoming Message from an IM Channel

When a user message includes an `<im>` block at the end, the message was relayed from an IM platform. The block looks like this:

```xml
<!-- Text-only message -->
<im source="DingTalk" />

<!-- Message with media attachments -->
<im source="WeChat">
  <media>
    <file type="image" mime="image/jpeg" path="workspace/media/photo_001.jpg" />
    <file type="voice" mime="audio/silk" path="workspace/media/voice_001.silk" />
    <file type="image" mime="image/jpeg" path="workspace/media/photo_002.jpg" from="quoted" />
  </media>
</im>
```

### What each field means

- `source`: the IM platform — `WeChat`, `WeCom`, `DingTalk`, or `Lark`
- `<file>`: a file already downloaded into the workspace; use its `path` directly
- `type`: media category — `image`, `voice`, `video`, `file`, etc.
- `mime`: MIME type of the file
- `from="quoted"`: the file came from a message the user was replying to, not their current message

### How to respond

- Treat the user's text as the primary intent; the `<im>` block is metadata only
- For media files, read or process them using the `path` value — no download needed, files are already in the workspace
- Reply naturally; the IM platform handles formatting on delivery
- **Only the final reply is visible to the user.** IM channels replace intermediate content with the last message — do not rely on the user seeing earlier streamed output. Compose a complete, self-contained answer

---

## Scenario B: Connecting an IM Bot

Connect the current Agent to an IM platform so it can receive and send messages in the target app.

### Step 1 — Confirm the channel

If the user did not specify one, ask which IM platform they want: WeChat, WeCom, DingTalk, or Lark.

### Step 2 — Read the reference

Load the matching reference file for credentials and exact steps:

- **WeChat** (official ClawBot) → [reference/wechat.md](reference/wechat.md)
- **WeCom** → [reference/wecom.md](reference/wecom.md)
- **DingTalk** → [reference/dingtalk.md](reference/dingtalk.md)
- **Lark** → [reference/lark.md](reference/lark.md)

> WeChat and WeCom are completely separate platforms. Do not mix them up.
> WeChat uses QR authorization and does not require `bot_id` or `secret`.

### Step 3 — Collect credentials and connect

Follow the instructions in the reference file. Run the `run_sdk_snippet` code to establish the connection.

### Step 4 — 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.

### Check Status

To inspect the current configuration and connection state of all IM channels, run:

```python
from sdk.tool import tool

result = tool.call("get_im_channel_status", {})
print(result.content)
```

### Notes

- After a connection is established, it keeps running in the background. Credentials are saved to `.magic/config/im-channels.json` and 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.json` and set that channel's `enabled` field to `false`.
- 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. The tool returns the exact markdown content to output — reply with it verbatim.
guidesSkill
canvas-designerSkill

Core canvas design skill covering project management, multimedia principles, AI image generation, web image search, and design marker processing. Load for any canvas design task. CRITICAL - When user message contains [@design_canvas_project:...] or [@design_marker:...] mentions, or when the user wants to generate video/animation/clip on a canvas project, you MUST load this skill first before any operations.

compact-chat-historySkill

Summarize and compress the current conversation history into a structured context snapshot, then call compact_chat_history to save it. Read this skill only when the user explicitly asks to compact/summarize — system-triggered compaction injects the instructions directly without requiring a skill read.

creating-slidesSkill

Slide/PPT creation skill that provides complete slide creation, editing, and management capabilities. Use when users need to create slides, make presentations, edit slide content, or manage slide projects. CRITICAL - When user message contains [@slide_project:...] mention, you MUST load this skill first before any operations.

crew-creatorSkill

|

deep-researchSkill

|

develop-data-analysis-dashboardSkill

Data analysis dashboard (instrument panel) development skill. Use when users need to develop data dashboards, create/edit Dashboard projects, build large-screen data boards, or perform dashboard data cleaning. Includes dashboard project creation, card plan, data cleaning (data_cleaning.py), card management tools (create_dashboard_cards, update_dashboard_cards, delete_dashboard_cards, query_dashboard_cards), map download tool (download_dashboard_maps), dashboard development, and validation.

dingtalk-cliSkill

Use when the user wants to interact with DingTalk/钉钉 in any way — including but not limited to: reading, querying, searching, sending, replying to, forwarding, or recalling DingTalk/钉钉 chat messages and chat history; managing group chats and conversations; sending DING alerts; querying contacts, org structure, AI search, or coworkers; reading, searching, creating, or editing DingTalk/钉钉 docs, drive files, sheets, AI tables, wiki, mail, calendar events, meeting rooms, AI meeting minutes, attendance, OA approvals, todos, reports/logs, live sessions, AI apps, permissions, or open-platform docs.