message-split

长消息自动拆分 skill。当回复内容超过渠道限制时,自动将消息拆分为多条有序发送,避免截断或丢消息。Auto-split long messages into smaller chunks before sending, with sequence markers.

3,891 stars

Best use case

message-split is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

长消息自动拆分 skill。当回复内容超过渠道限制时,自动将消息拆分为多条有序发送,避免截断或丢消息。Auto-split long messages into smaller chunks before sending, with sequence markers.

Teams using message-split should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/message-split/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/54meteor/message-split/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/message-split/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How message-split Compares

Feature / Agentmessage-splitStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

长消息自动拆分 skill。当回复内容超过渠道限制时,自动将消息拆分为多条有序发送,避免截断或丢消息。Auto-split long messages into smaller chunks before sending, with sequence markers.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Message Split Skill

## Problem

Many messaging channels (Feishu, Telegram, etc.) have a per-message character limit (~4000 chars for Feishu). When a response exceeds this limit, it either gets truncated or silently fails, leaving the user with no feedback.

## Solution

Before sending any message, check its length and split if necessary.

## Usage

```python
def send_long_message(text, channel="{active_channel}"):
    """
    Send a message, splitting it into multiple chunks if it exceeds the length limit.
    
    Args:
        text: The message text to send
        channel: Target channel (feishu/telegram/discord/whatsapp/signal/imessage/openclaw-weixin)
    
    Returns:
        Number of chunks sent
    """
    MAX_LEN = 3600  # Feishu limit with margin
    CHUNK_HEADER = "[{i}/{total}]\n"
    
    if len(text) <= MAX_LEN:
        message(action="send", channel=channel, message=text)
        return 1
    
    chunks = split_text(text, MAX_LEN)
    total = len(chunks)
    
    for i, chunk in enumerate(chunks, 1):
        header = f"[{i}/{total}]\n" if total > 1 else ""
        message(action="send", channel=channel, message=header + chunk)
    
    return total


def split_text(text, max_len):
    """
    Split text into chunks of at most max_len characters.
    Attempts to split at sentence boundaries or line breaks for readability.
    """
    import re
    
    # Try to split at sentence-ending punctuation first
    sentence_split = re.split(r'(?<=[。!?.!?])\s+', text)
    
    chunks = []
    current = ""
    
    for sentence in sentence_split:
        if len(current) + len(sentence) + 1 <= max_len:
            current += (" " + sentence if current else sentence)
        else:
            if current:
                chunks.append(current)
            # If single sentence exceeds limit, split by words/characters
            if len(sentence) > max_len:
                for i in range(0, len(sentence), max_len - 100):
                    chunks.append(sentence[i:i + max_len - 100])
                current = ""
            else:
                current = sentence
    
    if current:
        chunks.append(current)
    
    return chunks
```

## Channel Limits Reference

| Channel | Max chars (approx) | Notes |
|---------|-------------------|-------|
| Feishu | 4000 | Hard limit |
| Telegram | 4096 | |
| Discord | 2000 | Embed limit 6000 |
| WhatsApp | 65000 | But relayed messages get truncated |
| Signal | 700 | Very low |
| iMessage | ~4000 | Via macOS relay |

## Notes

- Always use `MAX_LEN = 3600` as a safe default (leaves room for header)
- If channel is unknown, default to feishu behavior
- Splitting is done on word/sentence boundaries when possible to preserve readability
- Sequence headers `[{i}/{total}]` are only added when `total > 1`

Related Skills

jiuwu-message

3891
from openclaw/skills

调用久吾消息网关HTTP接口给企业内部联系人发送消息。使用场景:(1) 需要向企业内部同事发送通知或提醒时,(2) 调用时传入接收人工号(code)、消息内容(text)和标题(title)

Workflow & Productivity

Feishu Message Skill

3891
from openclaw/skills

A unified toolkit for Feishu messaging operations, providing a single CLI entry point for common tasks.

message-chunker

3891
from openclaw/skills

智能消息分段工具。自动将长消息拆分成多条发送,避免飞书API消息长度限制。当需要发送长消息(如汇报、方案、日志)时自动激活。

send-message

3891
from openclaw/skills

Send and receive direct messages on OpenAnt. Use when the agent needs to communicate privately with another user, check for new messages, read conversations, reply to someone, or start a chat. Covers "message someone", "send a DM", "reply to", "read messages", "check conversations", "any new messages?", "what did they say?", "check inbox".

MessageGuard: Outgoing Message Filter Skill

3891
from openclaw/skills

**Purpose**: MessageGuard filters outgoing text to prevent secret leaks and sensitive data exposure by using pattern-based detection and configurable actions (mask, block, or warn).

medication-adherence-message-gen

3891
from openclaw/skills

Use medication adherence message gen for academic writing workflows that need structured execution, explicit assumptions, and clear output boundaries.

message-friendly

3891
from openclaw/skills

Optimizes Markdown-formatted messages for IM platforms (WeChat, DingTalk, etc.) by removing unsupported markup and using clean text layouts.

skill-risk-splitter

3891
from openclaw/skills

把职责过杂的 Skill 拆成安全版、增强版或多子 Skill,降低扫描和维护风险。;use for skills, refactor, risk workflows;do not use for 为了拆分而失去清晰定位, 隐藏高风险行为.

execution-plan-splitter

3891
from openclaw/skills

把大目标拆为 30/60/90 天执行路径、阶段成果、资源需求与放弃条件。;use for execution-plan, roadmap, 90-day workflows;do not use for 承诺无法验证的收益, 替代正式预算审批.

competitor-message-differ

3891
from openclaw/skills

比较竞品在信息架构和叙事上的差异,找出可借鉴点与应避免模仿点。;use for competitor, messaging, positioning workflows;do not use for 抄袭竞品文案, 编造竞品数据.

splitwise

3891
from openclaw/skills

Manage shared expenses via the Splitwise CLI. Use when asked to log, split, or track expenses with other people, check balances, see who owes whom, settle debts, or list recent charges. Triggers on mentions of Splitwise, shared expenses, splitting costs, "log this expense," "who owes what," roommate/partner bills, or any expense-tracking request. Even casual mentions like "split this with a roommate" or "add the internet bill" should trigger this skill.

flipoff-split-flap-display

3819
from openclaw/skills

Expert skill for building, customizing, and embedding the FlipOff split-flap display emulator — a free, offline-capable web app that turns any browser/TV into a retro airport departure board.