Channels
Nb Speak
Stop Personal Agents (OpenClaw, AstrBot, LangBot, Koishi, NoneBot2, Claude Code, MCP) from dumping raw Markdown pipe tables and 250-word essays on Telegram, WhatsApp, WeChat & QQ.
Install
npm install koishi-plugin-nb-speak`
Configuration Example
{
"bubbles": [
"Error rate held at 0.02%, p99 dropped to 38ms",
"Connection pool looks steady too, good to push 100%"
],
"reply_to": "msg_94810",
"end_turn": true
}
README
<!-- mcp-name: io.github.NB-Corp/nb-speak -->
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/banner-dark.svg">
<img src="docs/assets/banner-light.svg" alt="nb-speak — Stop Personal Agents from texting like corporate memos." width="1200">
</picture>
**`humanizer` strips AI prose tells from essays; `chat-human` + `nb-speak` stops your Personal Agent (OpenClaw, AstrBot, Telegram, WhatsApp, WeChat, QQ, Claude Code) from turning chat windows into corporate memos and raw pipe-table dumps.**
[](https://github.com/NB-Corp/nb-speak/actions/workflows/ci.yml)
[](https://nodejs.org/)
[](https://www.python.org/)
[](LICENSE)
[](https://nb-corp.github.io/nb-speak/)
[**Interactive Split-Stage**](https://nb-corp.github.io/nb-speak/) · [30s Quick Start](#quick-start) · [Ecosystem Matrix](#ecosystem-integration-matrix) · [Protocol & SSE Bridge](#architecture--wire-protocol) · [bubble_lint Spec](#deterministic-bubble_lint-specification) · [Live Benchmarks](#same-model-different-delivery-4-live-benchmarks) · [llms.txt](llms.txt)
**English** · [简体中文](README.zh-CN.md)
</div>
Prose humanizers rewrite blog posts. The moment you connect an LLM to **OpenClaw**, **AstrBot**, Telegram, WhatsApp, WeChat, QQ, Feishu/Lark, Slack, or Discord, prompt SOPs alone still regress—dumping raw `|---|---|` Markdown pipe tables onto 375px phone screens (`openclaw#36323`), refusing to split replies past 150 characters (`AstrBot#8614`), slicing fenced code blocks mid-comment, and wrapping two-line updates inside 250-word bulleted essays.
Within the **NB-Corp** ecosystem ([nb-search](https://github.com/NB-Corp/nb-search) discovers, [nb-extract](https://github.com/NB-Corp/nb-extract) reads, [nb-im](https://github.com/NB-Corp/nb-im) routes), **`nb-speak`** enforces human mobile delivery physics at the **Skill, PA Outbound Gate, Wire Protocol, and Linter layers**—delivering pure text short bubbles and isolated code/table cards by default (`enableVoiceNotes = false`, with strictly opt-in generic TTS support).
<p align="center">
<a href="https://nb-corp.github.io/nb-speak/">
<img src="docs/assets/playground-preview.png" alt="Interactive nb-speak split-stage comparing raw 250-word Markdown + SQL walls against paced IM bubbles, clean code/table cards, and deterministic bubble_lint" width="1160">
</a>
</p>
<p align="center">
<strong><a href="https://nb-corp.github.io/nb-speak/">Try the Live Split-Stage, Paste Any Raw Agent Wall to Normalize & Inspect Real-Time bubble_lint → nb-corp.github.io/nb-speak</a></strong>
</p>
## Quick Start
> **Zero external runtime dependencies (`v0.2.0`):** Prebuilt ESM (`dist/`) and stdlib Python modules run directly on **Node.js >= 22.19** (Node 24 recommended) and **Python >= 3.10** with zero npm or pip runtime bloat.
### 1. `skills.sh` · Claude Code · Codex · Cursor (`chat-human` Agent Skill)
```bash
npx skills add NB-Corp/nb-speak --global --agent '*'
# Or from the standalone skill repository:
npx skills add NB-Corp/chat-human --global --agent '*'
```
### 2. OpenClaw Native Plugin & Outbound Formatting Gate (`@nb-corp/nb-speak-openclaw`)
Fixes `openclaw#36323` (raw pipe tables & 250-word essay regressions after session compaction on Telegram, WhatsApp, Discord, and Signal):
```bash
# Zero-clone reversible installer into ~/.openclaw (preview first, then apply)
npx --yes github:NB-Corp/nb-speak openclaw --dry-run
npx --yes github:NB-Corp/nb-speak openclaw --apply --preset neutral_peer
# Byte-for-byte reversible uninstall (never reads or touches credentials)
npx --yes github:NB-Corp/nb-speak openclaw --uninstall
```
### 3. AstrBot Native Plugin for QQ · WeChat · Telegram · Feishu (`astrbot_plugin_nb_speak`)
Fixes `AstrBot#8614` (built-in `segmented_reply` stopping above 150 chars, regex chopping fenced code blocks, and raw `|---|---|` pipe tables in QQ/WeChat bubbles):
```bash
# Option A: Paste directly in AstrBot WebUI -> Plugin Manager -> Install Plugin:
# https://github.com/NB-Corp/astrbot_plugin_nb_speak
# Option B: One-line shallow clone into AstrBot's data/plugins directory, then reload in WebUI
git clone --depth 1 https://github.com/NB-Corp/astrbot_plugin_nb_speak <AstrBot>/data/plugins/astrbot_plugin_nb_speak
```
### 4. MCP Server, Claude Code Marketplace & OpenAI / SSE Bridge
```bash
# 1. Standard MCP stdio server (Cursor, Windsurf, Cherry Studio, Cline, Roo Code, Goose, Zed, Raycast)
npx --yes github:NB-Corp/nb-speak mcp
# 2. Claude Code native plugin marketplace (bundles chat-human skill + MCP config)
# Run inside Claude Code: /plugin marketplace add NB-Corp/nb-speak && /plugin install nb-speak@nb-corp
# 3. Local OpenAI-compatible HTTP/SSE bridge on http://127.0.0.1:18090 (enableVoiceNotes = false default)
NB_SPEAK_API_KEY="sk-..." npx --yes github:NB-Corp/nb-speak serve --port 18090 --upstream-url https://api.deepseek.com/v1
```
### Ecosystem Integration Matrix
All 10 surfaces share the exact same deterministic pipe-table converter, fenced-code shield, and 8-rule `bubble_lint` (`enableVoiceNotes = false` by default everywhere):
| Ecosystem / Client | Package / Path | Official Market / Registry | One-Line Setup |
| --- | --- | --- | --- |
| **skills.sh** (70+ Agents) | [`skills/chat-human`](skills/chat-human) | `skills.sh` · `NB-Corp/chat-human` | `npx skills add NB-Corp/chat-human --global --agent '*'` |
| **Claude Code** | [`.claude-plugin/`](.claude-plugin) | Claude Plugin Marketplaces | `/plugin marketplace add NB-Corp/nb-speak` -> `/plugin install nb-speak@nb-corp` |
| **MCP Clients** (Cursor / Cherry / Cline) | [`packages/mcp-server`](packages/mcp-server) | `io.github.NB-Corp/nb-speak` (`server.json` · Glama · Smithery) | `npx -y github:NB-Corp/nb-speak mcp` |
| **OpenClaw** (TG / WhatsApp / Discord) | [`packages/openclaw-plugin`](packages/openclaw-plugin) | ClawHub (`@nb-corp/nb-speak-openclaw`) | `npx --yes github:NB-Corp/nb-speak openclaw --apply` |
| **AstrBot** (QQ / WeChat / Feishu) | [`integrations/astrbot_plugin_nb_speak`](integrations/astrbot_plugin_nb_speak) | AstrBot Market (`NB-Corp/astrbot_plugin_nb_speak`) | Paste `https://github.com/NB-Corp/astrbot_plugin_nb_speak` in WebUI |
| **LangBot v4+** (WeChat / QQ / DingTalk) | [`integrations/langbot_plugin_nb_speak`](integrations/langbot_plugin_nb_speak) | LangBot Space (`NB-Corp/langbot_plugin_nb_speak`) | Paste `https://github.com/NB-Corp/langbot_plugin_nb_speak` in WebUI |
| **Koishi v4** (OneBot / Satori / Discord) | [`packages/koishi-plugin`](packages/koishi-plugin) | Koishi Market (`koishi-plugin-nb-speak`) | `npm install koishi-plugin-nb-speak` |
| **NoneBot2** (OneBot V11/V12 / TG / Lark) | [`integrations/nonebot_plugin_nb_speak`](integrations/nonebot_plugin_nb_speak) | NoneBot Store (`nonebot-plugin-nb-speak`) | `nb plugin install nonebot-plugin-nb-speak` |
| **OpenWebUI** | [`integrations/openwebui/nb_speak_filter.py`](integrations/openwebui/nb_speak_filter.py) | OpenWebUI Community Functions (`Filter`) | Import `nb_speak_filter.py` in **Workspace -> Functions** |
| **OpenAI / SSE Bridge & DSH** | [`packages/core`](packages/core) · [`packages/dsh-plugin`](packages/dsh-plugin) | npm (`@nb-corp/nb-speak`) · `NB-Corp/nb-speak-dsh` | `npx --yes github:NB-Corp/nb-speak serve --port 18090` |
---
## Personal Agent Plugins: OpenClaw & AstrBot
| PA Pain Point in the Wild | `@nb-corp/nb-speak-openclaw` ([`packages/openclaw-plugin`](packages/openclaw-plugin)) | `astrbot_plugin_nb_speak` ([`integrations/astrbot_plugin_nb_speak`](integrations/astrbot_plugin_nb_speak)) |
| --- | --- | --- |
| **Raw `\|---\|` pipe tables on phones** | `reply_payload_sending` + `message_sending` gate converts narrow-screen (`WhatsApp`, `Signal`, `WeChat`) or `>40`-col tables into **compact `- Item — Key: val` cards**, and wraps compact `<=40`-col tables on `Telegram` / `Discord` in aligned monospace blocks. | `on_decorating_result` converts pipe tables into mobile key-value cards on `aiocqhttp` / `qq_official` / `weixin_oc` / `wecom` / `lark` and aligned monospace blocks on `telegram` / `discord`. |
| **Long walls & 150-char splitter cliffs** | Injects `chat-human` Layer 1 (`before_prompt_build` + bundled `skills/chat-human/SKILL.md`), strips `*sighs*` & concierge sign-offs, and dispatches paced bubbles via `send_bubble` (`toolContext.delivery?.send`). | Eliminates AstrBot's 150-char `words_count_threshold` cliff: splits 40–600+ char replies cleanly into `1–4` balanced beats via `await event.send(MessageChain(...))` while keeping `Reply`/`At` headers on beat 1 and preserving the final beat in `result.chain` (zero message loss on network errors). |
| **Broken fenced code blocks & URLs** | Isolates multi-line code/SQL/diffs via `send_artifact` or placeholder-shielded extraction in exact document order. | Token-shields ```` ```lang ```` code blocks, decimals (`0.02%`), and query URLs (`?page=1.2`) before sentence splitting so code never shatters across bubbles. |
| **Persona & Voice defaults** | Respects `SOUL.md` or 4 built-in presets; **`enableVoiceNotes: false` by default** (optional generic OpenAI `/v1/audio/speech` synthesis when opted in). | Defaults to `persona_preset: "keep_host"` (100% preserving AstrBot WebUI personas) and **`enable_voice_notes: false`**. |
---
## Architecture & Wire Protocol
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/workflow-dark.svg">
<img src="docs/assets/workflow-light.svg" alt="Any LLM or Personal Agent → nb-speak Core, PA Gate & Br
... (truncated)
channels
Comments
Sign in to leave a comment