Octo Messaging 标志

Octo Messaging

组织
Mininglamp-OSS
octo-messaging

消息领域——发送/编辑/同步消息、已读回执、消息搜索(搜索/全部/文件/媒体/附近/群组,可在频道内或跨频道搜索)、群组和话题串(User Bot),以及事件轮询。涵盖 App Bot 仅支持私信的限制。请在 octo-shared 之后加载。

Add to TypingMind

概览

发布者Mininglamp-OSS
代码仓库octo-cli
技能名称octo-messaging
星标数
918
复刻数
130
附带文件
仅含指令
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 Mininglamp-OSS 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Octo Messaging AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/Mininglamp-OSS/octo-cli/tree/main/skills/octo-messaging
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Mininglamp-OSS/octo-cli.git /tmp/octo-cli
mkdir -p .claude/skills
cp -r /tmp/octo-cli/skills/octo-messaging .claude/skills/octo-messaging
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Octo Messaging,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Octo Messaging。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Octo Messaging 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

octo-messaging — messages, groups, threads, events

Three related domains live here. They all call $OCTO_API_BASE_URL/v1/bot/* — except the message search family under a uk_ (user API key) token, which the CLI routes to /v1/user/* (real-person mount; see the message search section).

DomainApp BotUser Bot
messageyes (DM only)yes (DM + group + thread)
groupread-onlyfull
threadblockedfull
eventyesyes

Search capability (the message search family) is a separate axis by token kind:

TokenCan search?Notes
app_*noCLI rejects locally with a validation error (not a server FORBIDDEN).
bf_*yesSearches as the bot; add --on-behalf-of <uid> for a real-person (OBO) view.
uk_*yesReal-person identity; routed to /v1/user/*.

Before attempting a write, confirm the token type with octo-cli config show — App Bot writes outside DM get FORBIDDEN from the server ("app bot does not support group operations").

1. message — 4 core commands (+ 6 search subcommands, see below)

bash
# Send a message. payload is a JSON object (not a flag) — pass it inside --data.
# payload.type is an INTEGER code (1=text); see the payload table below.
octo-cli message send --channel-id <cid> --channel-type 1 \
  --data '{"payload":{"type":1,"content":"hello"}}' \
  [--stream-no <n>] [--on-behalf-of <uid>]

# Edit by (message-id, channel-id, channel-type). content-edit is the new
# content, stored opaquely server-side — carry the new payload, same shape as send.
octo-cli message edit --message-id <mid> --message-seq <seq> \
  --channel-id <cid> --channel-type <t> \
  --content-edit '{"type":1,"content":"updated"}'

# Pull history for a channel. Use --data for non-trivial filters.
octo-cli message sync --data '{"channel_id":"ch_abc","channel_type":1,"limit":50}'

# Mark messages read.
octo-cli message read-receipt --channel-id <cid> --channel-type 1 \
  --message-ids m1 --message-ids m2

channel-type values

1 = direct (DM), 2 = group, 5 = thread.

App Bot restrictions (enforced server-side)

  • send accepts only channel-type=1; group/thread are rejected, and even for DM the bot must have a friend relationship with the recipient.
  • sync explicitly blocks channel-type=2.
  • edit and read-receipt work in DM; other scopes follow bot-kind rules.

payload shape

payload is an object (never auto-promoted to a flag). Wrap it under the top-level payload key and pass the whole body via --data '{"channel_id":"…","channel_type":1,"payload":{…}}' (or --data @file.json, --data @-).

payload.type is an integer code (NOT a string like "text"). Authoritative source: common.ContentType in octo-lib/common/msg.go (the server reads it as an int).

Chat content types:

typemeaningcommon payload fields
1Textcontent
2Imageurl, width, height
3GIFurl, width, height
4Voiceurl, duration
5Videourl, width, height, duration
6Locationlatitude, longitude
7Carduid, name
8Fileurl, name, size
11MultipleForward(merged-forward)
12VectorSticker(sticker)
13EmojiSticker(emoji sticker)
14RichText(rich text)
16InviteJoinOrg(org invite)

(System/notification types — 1000+ for group events, 2000 Tip — are server-generated, not sent by bots.) Text example: {"type":1,"content":"hello"}.

--on-behalf-of <uid> makes send/typing act as a user persona (OBO) — requires an active OBO grant + channel scope, else the server returns OBO not authorized.

message search — 6 subcommands

Full-text search over messages and files. Registered as message search, message search all|files|media|around|groups.

bash
# In-channel message search (payload.type in [1,11,14]).
octo-cli message search --chat-id <cid> --keyword "quarterly report" [--sort time_desc]

# Cross-channel message search (omit --chat-id). NOTE: without --chat-id the CLI
# routes to the cross-channel _search_global_messages endpoint, which is a MIXED
# feed (messages + files), so results may include file hits.
octo-cli message search --keyword "quarterly report"

# Messages + files (mixed feed) — in-channel or (no --chat-id) cross-channel.
octo-cli message search all --chat-id <cid> --keyword invoice

# Files only (payload.type=8), by filename / caption.
octo-cli message search files --chat-id <cid> --keyword "*.pdf"

# Images + videos (payload.type in [2,5]) — IN-CHANNEL ONLY, keyword NOT allowed.
octo-cli message search media --chat-id <cid> [--sort time_desc]

# Context window around an anchor message — IN-CHANNEL ONLY.
octo-cli message search around --chat-id <cid> --anchor-message-id <mid>

# Cross-channel aggregated overview (which channels matched) — CROSS-CHANNEL ONLY.
# Use it as level 1 of a two-step search: find matching channels, then pull
# messages per channel with `message search` / `message search all`.
octo-cli message search groups --keyword "quarterly report"

--chat-id decides in-channel vs cross-channel

  • With --chat-id → scoped to that channel.
  • Without --chat-id → search / search all / search files route to their cross-channel _search_global_* endpoints (CLI-side, in internal/client/search_route.go — not backend dispatch). Plain search cross-channel degrades to the mixed messages+files feed.
  • media and around require --chat-id (no cross-channel endpoint; the backend rejects a request without a channel_id). around also requires --anchor-message-id; media does not accept --keyword.
  • groups is cross-channel only and does not accept --chat-id.

Token subjects

  • bf_ (User Bot) — searches as the bot.
  • bf_ + --on-behalf-of <uid> — OBO: searches with that real person's visibility; requires an active OBO grant.
  • uk_ (user API key) — real-person identity; the CLI rewrites the path to /v1/user/*.
  • app_ (App Bot) — cannot search. The CLI rejects this locally (validation), before any request — distinct from a server-side FORBIDDEN.

Filters and pagination

Rich filters (sender_ids, member_uids, content_types, sent_at_from/sent_at_to, file_exts, …) go through --data '{"filters":{…}}'. All families except around and groups paginate; the cursor travels in the request body (--page-all handles this).

2. group — 9 commands (both 5 / User Bot only 4)

Available to both bot types (5):

bash
octo-cli group list      [--space-id <sid>]               # groups the bot is a member of
octo-cli group get       <group_no>
octo-cli group members   <group_no>                        # paginated
octo-cli group md-get    <group_no>                        # group markdown description
octo-cli group md-update <group_no> --content "# Updated description"  # write, but bot_admin gate — not App-Bot-blocked

User Bot only (4):

bash
octo-cli group create        --members u1 --members u2 --name "eng" --creator u0
octo-cli group update        <group_no> --data '{"name":"new name"}'
octo-cli group member-add    <group_no> --members u3 --members u4
octo-cli group member-remove <group_no> --members u3

App Bot attempting any of the four write operations gets FORBIDDEN with message "app bot does not support group operations".

3. thread — 8 commands, User Bot only

Every thread operation calls validateBotGroupAccess() on the backend and rejects App Bot unconditionally. Don't attempt these with an app_* token.

bash
octo-cli thread create    <group_no> --name "Incident #42"
octo-cli thread list      <group_no>                          # paginated
octo-cli thread get       <group_no> <short_id>
octo-cli thread members   <group_no> <short_id>
octo-cli thread join      <group_no> <short_id>
octo-cli thread leave     <group_no> <short_id>
octo-cli thread md-get    <group_no> <short_id>
octo-cli thread md-update <group_no> <short_id> --content "# …"

The User Bot must be a member of the parent group.

4. event — polling for inbound events

bash
octo-cli event list                          # newest page
octo-cli event list --event-id 1234 --limit 50   # cursor = highest event-id seen
octo-cli event ack  <event_id>

Important: event list is a POST

Even though the semantics are "list", the handler is POST /v1/bot/events — the cursor travels in the body, not the query string. The CLI handles this; agents calling octo-cli api must use POST.

Standard poll loop

bash
cursor=0
while :; do
  batch=$(octo-cli event list --event-id "$cursor" --limit 100)
  # response shape: {ok, data:{status, results:[{event_id, event_type, message{...}}]}}
  echo "$batch" | jq -c '.data.results[]' | while read -r ev; do
    id=$(jq -r '.event_id' <<<"$ev")
    process "$ev"
    octo-cli event ack "$id"
    cursor=$id
  done
  sleep 2
done

--limit defaults to 20, caps at 100.

5. Error recovery cheatsheet

SymptomLikely cause / fix
FORBIDDEN + app bot does not support group…Switch to a User Bot (bf_*) or fall back to DM.
send → permission on DMNo friend relationship; add the bot as a friend first.
sync rejected with channel-type=2App Bot cannot sync groups — use User Bot.
VALIDATION_ERROR on sendpayload must be an object, not a string.
event list returns data.results: []No events since the cursor; keep the cursor and poll again.
validation on any message search with an app_* tokenApp Bots cannot search — use bf_* or uk_*. (CLI-side reject, before the request.)
media search rejected with a non-empty keywordsearch media does not accept --keyword; drop it.
sort=relevance rejectedrelevance requires a non-empty --keyword.
OBO not authorized on search --on-behalf-ofNo active OBO grant for that uid; grant it or drop --on-behalf-of.

6. Schema lookup

bash
octo-cli schema message.send
octo-cli schema message.search
octo-cli schema message.search.all
octo-cli schema group.members
octo-cli schema thread.create
octo-cli schema event.list

常见问题

Octo Messaging AI 技能有什么作用?

消息领域——发送/编辑/同步消息、已读回执、消息搜索(搜索/全部/文件/媒体/附近/群组,可在频道内或跨频道搜索)、群组和话题串(User Bot),以及事件轮询。涵盖 App Bot 仅支持私信的限制。请在 octo-shared 之后加载。

为什么在 TypingMind 中使用 Octo Messaging?

因为您只需安装一次,就能搭配任何模型使用。Octo Messaging 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Octo Messaging?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/Mininglamp-OSS/octo-cli/tree/main/skills/octo-messaging。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Octo Messaging?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Octo Messaging 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Octo Messaging 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Octo Messaging AI 技能免费吗?

是的。Mininglamp-OSS 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇