Logo Simulator Chat

Simulator Chat

Tổ chức
corezoid
simulator-chat

Chuyên gia về chat và nhắn tin của Simulator.Company — gửi tin nhắn cho người dùng, tạo hoặc dùng lại chat p2p (1:1) và chat nhóm. Trong Simulator, một chat là actor của biểu mẫu hệ thống Events (data.chatType = "p2p" | "group"), người tham gia là thành viên trong các quy tắc truy cập của actor và tin nhắn là các reaction `comment`. Dùng khi người dùng muốn "message", "write to", "DM", "send a message to" ai đó, "open a chat with", "start a conversation" hoặc "reply in the chat". Kích hoạt với "write a message to user N", "send N a message", "open a chat with", "message someone", "напиши повідомлення користувачу", "надішли повідомлення", "відкрий чат з", "почни розмову з", "напиши юзеру", "напиши сообщение пользователю", "отправь сообщение", "открой чат с", "напиши в чат". Với bình luận/phê duyệt trên một actor bất kỳ (không phải chat), dùng `simulator-reactions`; với tệp, dùng `simulator-attachments`; để chia sẻ/quản lý quyền truy cập nói chung, dùng `simulator-access`.

Add to TypingMind

Tổng quan

Nhà phát hànhcorezoid
Kho mãsimulator-ai-plugin
Tên kỹ năngsimulator-chat
Sao
61
Bản fork
13
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được corezoid công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Simulator Chat trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/corezoid/simulator-ai-plugin/tree/main/plugins/simulator/skills/simulator-chat
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/corezoid/simulator-ai-plugin.git /tmp/simulator-ai-plugin
mkdir -p .claude/skills
cp -r /tmp/simulator-ai-plugin/plugins/simulator/skills/simulator-chat .claude/skills/simulator-chat
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Simulator Chat trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Simulator Chat ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Simulator Chat với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Curated tool names (v2 server): searchUsers, getUsers, getSystemActor, getForms, filterActors, createActor, getActorByRef, saveAccessRules, createReaction, getReactions. Call them by these exact names. There is no dedicated "create chat" / "send message" tool — a chat is composed from these.

Simulator.Company Chat Specialist

In Simulator.Company a chat is an actor of the Events system form:

  • data.chatType = "p2p" → a 1:1 chat · "group" → a group chat · empty → a plain event / SIP meeting (not a chat).
  • Participants = the chat actor's access-rule members (keyed by userId) — not a data field. The creator is the implicit owner; other participants are added with saveAccessRules.
  • Messages = comment reactions posted under the chat actor.

There is no server-side "p2p has exactly two members / don't duplicate" enforcement — this skill owns that discipline, and it must match the platform's standard p2p convention or two clients will create duplicate chats for the same pair. The convention:

  • Deterministic ref = p2pConversation_<minUserId>_<maxUserId> — both participants' raw workspace userIds sorted ascending, joined with _. This is the p2p dedup key; the UI finds/reuses a chat only by this ref.
  • title = <nickA>:p2p:<nickB> — nicks ordered by the same ascending userId sort.
  • data = { chatType:"p2p", startDate:<nowSec>, endDate:<nowSec>, scheduleMeeting:false }.
  • Participants are added by a separate saveAccessRules call (never inline in the create body); the creator is owner implicitly.

Read $CLAUDE_PLUGIN_ROOT/docs/entities/chats.md for the full model, the verbatim Events-form field list, and the current-user constraint.

Reply to the user in their own language.


Test case: "write a message to user N"

This is the canonical flow. Each step names the exact tool.

1 — Resolve user N

searchUsers(query="N")          # accId defaults to the active workspace

Take N's userId from the result (e.g. 4210). If several match, ask the user which one (or show name + email). getUsers lists everyone if you need to browse.

getSystemActor(objType="user", objId=<userId>) returns N's system "twin" actor. You usually do not need it to chat — membership uses the raw userId — but it get-or-creates the twin if some flow needs N represented as an actor.

2 — Resolve the Events form id (per workspace)

getForms(formTypes="system")    # find the row whose title == "Events" → its id

The Events form id differs per workspace, so don't hardcode it. (You may instead pass formName="Events" to createActor and let it resolve the id.)

3 — Build the canonical ref + title (reuse key)

The p2p dedup key needs both userIds. The recipient's came from step 1; resolve the sender's userId too (see the box below), then:

ids   = sortAscending(senderUserId, N_userId)        # numeric ascending
ref   = "p2pConversation_" + ids[0] + "_" + ids[1]   # e.g. p2pConversation_4210_4310
title = nick(ids[0]) + ":p2p:" + nick(ids[1])        # e.g. olena:p2p:petro

Getting the sender's userId. There is no PAPI "current user" endpoint, and the auth token carries the caller's saId+nick, not the per-workspace userId. So: ask the user, take it from context, or getUsers and match the token's saId/nick to a member's id. If you cannot get it, fall back to discovery-by-member in step 4 and skip the ref (note: a ref-less chat may be duplicated later by the web UI, which keys reuse on ref).

4 — Find an existing chat (reuse, don't duplicate)

Canonical — by the deterministic ref, exactly as the web UI does:

getActorByRef(formId=<EventsFormId>, ref=<ref>)     # found → reuse its id, skip to step 6

Fallback when the sender's userId is unknown — discover by participant (still finds UI-created chats, since the recipient is an access member):

filterActors(formId=<EventsFormId>, q="chatType=p2p", members="<N_userId>:view")

5 — Create the p2p chat (only if none exists)

createActor(
  formName="Events",                       # or formId=<EventsFormId>
  title=<title>,                           # "<nickA>:p2p:<nickB>"
  ref=<ref>,                               # p2pConversation_<minId>_<maxId> — REQUIRED for UI reuse
  data={ "chatType": "p2p",
         "startDate": <nowUnixSeconds>,
         "endDate":   <nowUnixSeconds>,
         "scheduleMeeting": false })        # plain unix SECONDS on Events — not a calendar object

startDate/endDate are required by the Events form. On a chat they are just "now" as integer unix seconds (the nested calendar {startDate,endDate,...} object used elsewhere does not apply here).

Then add N as the second participant (the creator is owner implicitly — do not add a self access-rule):

saveAccessRules(
  objType="actor", objId="<newChatId>",
  rules=[{ "action":"create",
           "data":{ "userId": <N_userId>,
                    "privs":{ "view":true, "modify":true, "remove":true } } }])

saveAccessRules is applied asynchronously and returns a taskId; posting the message next still works.

6 — Post the message (a comment reaction)

createReaction(type="comment", actorId="<chatId>", description="<the message text>")

That comment reaction under the chat actor is the chat message. To read the conversation back: getReactions(actorId="<chatId>", view="flat", orderValue="ASC").


Variations

  • Group chat. Create with data.chatType="group" and no ref (the UI gives group chats no dedup), then saveAccessRules (or bulkSaveAccessRules) for every participant userId. To find a group's members later, filter by them: filterActors(members="11:view,22:view,33:view", q="chatType=group").
  • Reply in a thread. Pass parentId=<reactionId> to createReaction (see simulator-reactions).
  • Attach a file to a message. Upload first (uploadBase64 → attachId), then createReaction(..., attachments=[{attachId:<id>}]) — see simulator-attachments.
  • Post quietly (no notification). createReaction(..., notify=false).
  • Hand the message to the AI agent. createReaction(..., extra={mcp:true}) runs the platform AI agent on it under the requesting user's access (see simulator-reactions).

Reuse & safety rules

  • Always look up (step 4) before creating (step 5). Creating a second p2p Events actor for the same pair silently produces a duplicate chat — the platform does not dedupe; only the deterministic ref does.
  • Always set the canonical ref on create (p2pConversation_<minId>_<maxId>) so the web UI reuses the same chat instead of making its own duplicate.
  • Participants are access rules, never data fields. Do not store member ids in data, and do not add a self access-rule (the creator is owner implicitly).
  • Confirm before messaging on the user's behalf if the message is outward-facing — a chat message notifies the recipient.
  • A chat needs chatType set; an Events actor without it is a plain event/meeting, and comments on it are ordinary discussion, not chat messages.

Relationship to the other skills

SkillBoundary
simulator-agentsDelegating work to a person as an agent (assess who fits, then act / task / message) — it composes this p2p flow for its "message the person" outcome.
simulator-reactionsGeneric comments/approvals/ratings on any actor (a chat message is a comment reaction — that skill covers the reaction mechanics).
simulator-actorsThe Events actor's own data fields and the actor data value protocol.
simulator-accessAccess rules in general (chat participants are access-rule members).
simulator-attachmentsFiles on a message/actor.
simulator-initLogin + workspace selection (needed before any of this).

Reference Documents

PathWhen to read
$CLAUDE_PLUGIN_ROOT/docs/entities/chats.mdThe chat model: Events form, chatType, members-as-access, messages-as-reactions
$CLAUDE_PLUGIN_ROOT/docs/entities/reactions.mdReaction types, tree/threading, AI-agent reactions
$CLAUDE_PLUGIN_ROOT/docs/entities/system-forms.mdThe Events system form among the built-ins

Tips

  • accId/workspace defaults to the active one — make sure simulator-init ran first.
  • The Events form id is per workspace — resolve it (getForms/formName), never hardcode.
  • On Events, startDate/endDate are plain unix seconds, both "now" for a chat.
  • Canonical reuse = getActorByRef(ref="p2pConversation_<minId>_<maxId>") (matches the web UI); it needs both userIds — the sender's isn't in the token (saId/nick only, no PAPI /me), so derive it or fall back to filterActors(members=…, q="chatType=p2p").
  • A message is just createReaction(type="comment", actorId=<chatId>, description=...).

Câu hỏi thường gặp

Kỹ năng AI Simulator Chat làm được gì?

Chuyên gia về chat và nhắn tin của Simulator.Company — gửi tin nhắn cho người dùng, tạo hoặc dùng lại chat p2p (1:1) và chat nhóm. Trong Simulator, một chat là actor của biểu mẫu hệ thống Events (data.chatType = "p2p" | "group"), người tham gia là thành viên trong các quy tắc truy cập của actor và tin nhắn là các reaction `comment`. Dùng khi người dùng muốn "message", "write to", "DM", "send a message to" ai đó, "open a chat with", "start a conversation" hoặc "reply in the chat". Kích hoạt với "write a message to user N", "send N a message", "open a chat with", "message someone", "напиши по...

Vì sao nên dùng Simulator Chat trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Simulator Chat là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Simulator Chat trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/corezoid/simulator-ai-plugin/tree/main/plugins/simulator/skills/simulator-chat. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Simulator Chat?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Simulator Chat với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Simulator Chat với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Simulator Chat có miễn phí không?

Có. Kỹ năng này được corezoid phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇