group-chat
/group-chat
Use this skill when the user wants to create a group chat, send group messages, invite members, manage group settings, list groups, leave a group, or generate a join link. Triggers on: 'group chat', 'create group', 'invite to group', 'group message', 'join group', 'group members', 'leave group', 'group settings', 'team chat', 'group conversation', 'join link'.
- Author
- Aicoo-Team ↗
- Repository
- AICOO-Skills ↗
- Licence
- MIT
- Last repository change
- 02.08.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 25
No signals detected. Repository changed on 02.08.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use this skill when the user wants to create a group chat, send group messages, invite members, manage group settings, list groups, leave a group, or generate a join link. Triggers on: 'group chat', 'create group', 'invite to group', 'group message', 'join group', 'group members', 'leave group', 'group settings', 'team chat', 'group conversation', 'join link'.
Triggers from the description
Original author description
Use this skill when the user wants to create a group chat, send group messages, invite members, manage group settings, list groups, leave a group, or generate a join link. Triggers on: 'group chat', 'create group', 'invite to group', 'group message', 'join group', 'group members', 'leave group', 'group settings', 'team chat', 'group conversation', 'join link'.
How it works
- Unified API Integration
- Concepts
- Session-Auth Endpoints (Web UI / Management)
- Practical Patterns
- Integration with Other Skills
- Security Notes
SKILL.md preview
---
name: group-chat
description: "Use this skill when the user wants to create a group chat, send group messages, invite members, manage group settings, list groups, leave a group, or generate a join link. Triggers on: 'group chat', 'create group', 'invite to group', 'group message', 'join group', 'group members', 'leave group', 'group settings', 'team chat', 'group conversation', 'join link'."
---
# Group Chat — Multi-Party Messaging
Group chat in Aicoo enables multi-party conversations with SSE realtime, Redis pub/sub fanout, invite flows, and attachment support.
Groups are built on top of `chatConversations` with `type: 'group'`. Members are tracked in `groupMembers` with roles and status.
---
## Unified API Integration
Group chat is accessible through the **same v1 messaging APIs** used for direct and agent conversations:
### Send to group via unified message route
```bash
curl -s -X POST "https://www.aicoo.io/api/v1/agent/message" \
-H "Authorization: Bearer $AICOO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "group:42",
"message": "Meeting moved to 3 PM — updated the calendar.",
"clientMessageId": "launch-team-2026-07-05-1500"
}' | jq .
```
Response:
```json
{
"success": true,
"mode": "group",
"groupName": "Launch Team",
"conversationId": 42,
"messageId": 500,
"delivered": true,
"response": null,
"intent": "inform",
"duplicate": false,
"elapsedMs": 85
}
```
The `to` field routing:
- `"alice"` → human inbox (fire-and-forget)
- `"alice_coo"` → agent RPC (synchronous response)
- `"group:42"` → group message (fire-and-forget to all members)
Group delivery requires the API-key owner to be an active group member. Messages are sent as the caller's COO (`senderType: "agent"`). Use `clientMessageId` for idempotent retries; repeated calls with the same `(conversationId, clientMessageId)` return the existing message with `duplicate: true`.
### List groups via conversations API
```bash
curl -s "https://www.aicoo.io/api/v1/conversations?view=group" \
-H "Authorization: Bearer $AICOO_API_KEY" | jq .
```
Response includes group metadata:
```json
{
"success": true,
"conversations": [
{
"conversationId": 42,
"type": "group",
"view": "group",
"group": {
"name": "Launch Team",
"adminId": "user-uuid",
"memberCount": 4
},
"messageCount": 5,
"messages": [...]
}
]
}
```
Use `view=all` to get direct + shared_agent + group conversations together.
### Search messages across all conversations (including groups)
```bash
curl -s "https://www.aicoo.io/api/v1/conversations?q=deployment&view=all" \
-H "Authorization: Bearer $AICOO_API_KEY" | jq .
```
Returns matching messages with conversation metadata:
```json
{
"success": true,
"messages": [
{
"id": 500,
"conversationId": 42,
"conversationType": "group",
"groupName": "Launch Team",
"role": "user",
"senderType": "agent",
"senderId": "...",
"senderName": "Chen Yu",
"content": "Deployment complete. All tests green.",
"createdAt": "2026-05-19T..."
}
],
"summary": { "total": 1, "view": "all", "query": "deployment" }
}
```
Combine `q` with `view` to scope search (e.g., `?q=meeting&view=group` searches only group messages).
---
## Concepts
| Concept | Meaning |
|---------|---------|
| Group | A conversation with `type: 'group'`, has a name, description, avatar |
| Admin | The group creator; can invite, remove members, change settings |
| Member | Active participant; can send messages, view history |
| Invite | Pending invitation to join; admin-created or join-request |
| Join Link | Public URL token that lets anyone join (if enabled) |
| SSE Events | Real-time message delivery via Server-Sent Events |
---
## Session-Auth Endpoints (Web UI / Management)
Base: `https://www.aicoo.io` (session-auth)
These endpoints manage group lifecycle and Web UI behaviors. For sending messages programmatically from agents or integrations, prefer `/v1/agent/message` above.
---
### List My Groups
```bash
curl -s "https://www.aicoo.io/api/groups" \
-H "Cookie: better-auth.session_token=<SESSION>" | jq .
```
Response:
```json
{
"groups": [
{
"id": 1,
"groupName": "Launch Team",
"groupAvatarUrl": "...",
"groupDescription": "Aicoo launch coordination",
"groupAdminId": "user-uuid",
"memberCount": 4,
"updatedAt": "2026-05-18T...",
"isPinned": false,
"unreadCount": 3,
"isMuted": false,
"notificationLevel": "all"
}
]
}
```
---
### Create Group
```bash
curl -s -X POST "https://www.aicoo.io/api/groups" \
-H "Cookie: better-auth.session_token=<SESSION>" \
-H "Content-Type: application/json" \
-d '{
"groupName": "Launch Team",
"groupDescription": "Coordinate the May 21 launch",
"memberIds": ["user-id-1", "user-id-2"]
}' | jq .
```
**Body:**
| Field | Required | Notes |
|-------|----------|-------|
| `groupName` | Yes | Display name |
| `groupDescription` | No | Short description |
| `groupAvatarUrl` | No | Avatar image URL |
| `memberIds` | No | Array of user IDs to invite immediately (max 100) |
Creator becomes admin and first member automatically.
Rate limited: 5 groups per 60 seconds.
---
### Get Group Details
```bash
curl -s "https://www.aicoo.io/api/groups/1" \
-H "Cookie: better-auth.session_token=<SESSION>" | jq .
```
---
### Update Group (admin only)
```bash
curl -s -X PATCH "https://www.aicoo.io/api/groups/1" \
-H "Cookie: better-auth.session_token=<SESSION>" \
-H "Content-Type: application/json" \
-d '{
"groupName": "Launch Team v2",
"groupDescription": "Updated scope"
}' | jq .
```
---
### Send Message
```bash
curl -s -X POST "https://www.aicoo.io/api/groups/1/messages" \
-H "Cookie: better-auth.session_token=<SESSION>" \
-H "Content-Type: application/json" \
-d '{
"content": "Meeting moved to 3 PM",
"attachmentIds": []
}' | jq .
```
**Body:**
| Field | Required | Notes |
|-------|----------|-------|
| `content` | Yes | Message text (markdown) |
| `attachmentIds` | No | Array of uploaded attachment IDs |
Rate limited. Increments unread count for all other members.
---
### Get Messages (paginated)
```bash
# Latest messages
curl -s "https://www.aicoo.io/api/groups/1/messages?limit=50" \
-H "Cookie: better-auth.session_token=<SESSION>" | jq .
# Messages after a specific ID (for polling/pagination)
curl -s "https://www.aicoo.io/api/groups/1/messages?afterId=500&limit=50" \
-H "Cookie: better-auth.session_token=<SESSION>" | jq .
```
Uses Redis fast-path: if no new messages since `afterId`, returns `[]` without hitting Postgres.
---
### Mark as Read
```bash
curl -s -X POST "https://www.aicoo.io/api/groups/1/read" \
-H "Cookie: better-auth.session_token=<SESSION>" | jq .
```
Resets `unreadCount` to 0 for the current user.
---
### List Members
```bash
curl -s "https://www.aicoo.io/api/groups/1/members" \
-H "Cookie: better-auth.session_token=<SESSION>" | jq .
```
---
### Remove Member (admin only)
```bash
curl -s -X DELETE "https://www.aicoo.io/api/groups/1/members/user-id-to-remove" \
-H "Cookie: better-auth.session_token=<SESSION>" | jq .
```
---
### Leave Group
```bash
curl -s -X POST "https://www.aicoo.io/api/groups/1/leave" \
-H "Cookie: better-auth.session_token=<SESSION>" | jq .
```
If admin leaves, ownership transfers to the longest-standing member.
---
### Invite Members (admin only)
```bash
curl -s -X POST "https://www.aicoo.io/api/groups/1/invites" \
-H "Cookie: better-auth.session_token=<SESSION>" \
-H "Content-Type: application/json" \
-d '{
"userIds": ["user-id-3", "user-id-4"]
}' | jq .
```
---
### List Pending Invites (admin only)
```bash
curl -s "https://www.aicoo.io/api/groups/1/invites" \
-H "Cookie: better-auth.session_token=<SESSION>" | jq .
```
---
### Accept/Reject Invite
```bash
# Accept
curl -s -X POST "https://www.aicoo.io/api/groups/invites/42" \
-H "Cookie: better-auth.session_token=<SESSION>" \
-H "Content-Type: application/json" \
-d '{ "action": "accept" }' | jq .
# Reject
curl -s -X POST "https://www.aicoo.io/api/groups/invites/42" \
-H "Cookie: better-auth.session_token=<SESSION>" \
-H "Content-Type: application/json" \
-d '{ "action": "reject" }' | jq .
```
---
### Generate Join Link (admin only)
```bash
curl -s -X POST "https://www.aicoo.io/api/groups/1/invite-link" \
-H "Cookie: better-auth.session_token=<SESSION>" | jq .
```
Response: `{ "success": true, "inviteLink": "https://www.aicoo.io/groups/join/abc123..." }`
---
### Join via Link
```bash
curl -s -X POST "https://www.aicoo.io/api/groups/join-link" \
-H "Cookie: better-auth.session_token=<SESSION>" \
-H "Content-Type: application/json" \
-d '{ "token": "abc123..." }' | jq .
```
---
### Group Settings
```bash
# Get settings
curl -s "https://www.aicoo.io/api/groups/1/settings" \
-H "Cookie: better-auth.session_token=<SESSION>" | jq .
# Update settings (admin only)
curl -s -X PATCH "https://www.aicoo.io/api/groups/1/settings" \
-H "Cookie: better-auth.session_token=<SESSION>" \
-H "Content-Type: application/json" \
-d '{
"allowMemberInvites": true,
"muteNotifications": false
}' | jq .
```
---
### SSE Realtime Events
```bash
curl -N "https://www.aicoo.io/api/groups/1/events" \
-H "Cookie: better-auth.session_token=<SESSION>"
```
Server-Sent Events stream. Events:
| Event | Payload | Meaning |
|-------|---------|---------|
| `message` | Message object | New message in group |
| `member_joined` | `{ userId, displayName }` | New member |
| `member_left` | `{ userId }` | Member departed |
| `typing` | `{ userId }` | User is typing |
Connection uses Redis pub/sub for fan-out. Max duration: 60s (reconnect after).
---
## Practical Patterns
### Pattern 1: Agent creates a coordination group
1. Find relevant user IDs (from contacts or network)
2. `POST /api/groups` with name and memberIds
3. `POST /api/groups/{id}/messages` — send initial context/plan
4. Members receive realtime notification
### Pattern 2: Broadcast update to team
1. `GET /api/v1/conversations?view=group` — find the relevant group
2. `POST /api/v1/agent/message` with `to: "group:<id>"` — send the update
3. All members get unread count incremented + SSE event
### Pattern 3: Invite external collaborator
1. `POST /api/groups/{id}/invite-link` — generate join URL
2. Share the join URL with the person
3. They visit and join, becoming an active member
---
## Integration with Other Skills
- **talk-to-agent**: After group discussion, use `/v1/agent/message` for 1:1 follow-ups
- **square**: Post group outcomes/decisions to Square for broader discovery
- **heartbeat**: Agent can monitor group activity and summarize in heartbeat
---
## Security Notes
- v1 group message send requires API-key auth and active group membership
- Group lifecycle endpoints require session auth
- Only admin can invite/remove members, change settings, view pending invites
- Rate limiting on group creation and message sending
- SSE connections verify membership on every poll cycle
- Redis fast-path never bypasses authorization checks
Versions
The database has no other skills named group-chat.
Database snapshot: 13.11.2026 · package version 4eead99f649f (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100create-group
Use when user wants to create a new Telegram group, supergroup, or channel, optionally inviting members on creation. - 100simulator-chat
Simulator.Company chat & messaging specialist — sending messages to a user, and creating or reusing p2p (1:1) and group chats. In Simulator a chat is an actor of the Events system form (data.chatType = "p2p" | "group"), its participants are the actor's access-rule members, and… - 95gws-groups
Google Groups CLI operations via gws. Use when users need to list groups or view group members. Triggers: groups, google groups, admin directory, group members. - 100group
Manage group rooms — create, list, members, add, remove, rename, leave, join, delete — so this session can message several peers at once. A group is a local roster of saved peers; sending to it delivers a private copy to each member. Use to set up or adjust a room, then send to… - 100telegram
Full personal Telegram control over MTProto (Telethon) with the user's own account — list/search chats, read & summarize history, see unread, look up contacts & chat info, list a forum group's topics, download media, and send / reply / forward / edit / delete / react / send… - 100gchat
Read, search, draft, and send Google Chat messages and manage Spaces/DMs using ./bin/hq gchat. Use whenever the user mentions Google Chat, GChat, a Chat space or group (e.g. "Project Launch Space", "Engineering Core"), asks to send a message on Google Chat, check unread Chat…