Skip to content

Commit 1aea2df

Browse files
fix(plugins): refresh bundled channel skills (#119020)
1 parent 07a9856 commit 1aea2df

13 files changed

Lines changed: 215 additions & 814 deletions

File tree

Lines changed: 22 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,43 @@
11
---
22
name: discord
3-
description: "Discord message-tool ops: send/read/edit/delete, react, poll, pin, thread, search, presence, media/components."
3+
description: "Discord messaging workflows through OpenClaw's message tool."
44
metadata: { "openclaw": { "emoji": "🎮", "requires": { "config": ["channels.discord.token"] } } }
55
allowed-tools: ["message"]
66
---
77

88
# Discord
99

10-
Use the `message` tool with `channel: "discord"`. No separate Discord tool.
10+
Use the `message` tool with `channel: "discord"`. The tool schema lists the actions enabled by the current account's `channels.discord.actions.*` gates; do not assume unavailable actions.
1111

12-
## Rules
12+
## Workflow
1313

14-
- Respect `channels.discord.actions.*` gates.
15-
- Prefer explicit `guildId`, `channelId`, `messageId`, `userId`.
16-
- Multi-account: pass `accountId` when needed.
17-
- Send targets: `to: "channel:<id>"` or `to: "user:<id>"`.
18-
- Mention users as `<@USER_ID>`.
19-
- Avoid Markdown tables in outbound Discord messages.
20-
- Prefer components v2 for rich UI; do not mix v2 `components` with legacy `embeds`.
14+
- Prefer stable `guildId`, `channelId`, `messageId`, and `userId` values from context. Pass `accountId` when more than one Discord account could apply.
15+
- Resolve the exact message before editing, deleting, pinning, moderating, or reacting when the user's reference is ambiguous.
16+
- Keep thread replies in their existing thread. A forum parent cannot receive components; send components to the created forum thread instead.
17+
- Confirm destructive or moderation actions unless the user already specified the exact target and action.
2118

22-
## Common actions
19+
## Interactive components
2320

24-
Send:
25-
26-
```json
27-
{ "action": "send", "channel": "discord", "to": "channel:123", "message": "hello", "silent": true }
28-
```
29-
30-
Send media:
31-
32-
```json
33-
{
34-
"action": "send",
35-
"channel": "discord",
36-
"to": "channel:123",
37-
"message": "see attachment",
38-
"media": "file:///tmp/example.png"
39-
}
40-
```
41-
42-
Components v2:
21+
`components` must be a structured object or native component array, never a placeholder string. Do not combine components v2 with legacy `embeds`.
4322

4423
```json
4524
{
4625
"action": "send",
4726
"channel": "discord",
4827
"to": "channel:123",
49-
"message": "Status",
50-
"components": "[Carbon v2 components]"
51-
}
52-
```
53-
54-
React:
55-
56-
```json
57-
{ "action": "react", "channel": "discord", "channelId": "123", "messageId": "456", "emoji": "👍" }
58-
```
59-
60-
Read:
61-
62-
```json
63-
{ "action": "read", "channel": "discord", "to": "channel:123", "limit": 20 }
64-
```
65-
66-
Edit/delete:
67-
68-
```json
69-
{
70-
"action": "edit",
71-
"channel": "discord",
72-
"channelId": "123",
73-
"messageId": "456",
74-
"message": "fixed typo"
28+
"message": "Choose an option",
29+
"components": {
30+
"blocks": [
31+
{
32+
"type": "actions",
33+
"buttons": [
34+
{ "label": "Approve", "style": "success", "callbackData": "approve" },
35+
{ "label": "Decline", "style": "danger", "callbackData": "decline" }
36+
]
37+
}
38+
]
39+
}
7540
}
7641
```
7742

78-
```json
79-
{ "action": "delete", "channel": "discord", "channelId": "123", "messageId": "456" }
80-
```
81-
82-
Poll:
83-
84-
```json
85-
{
86-
"action": "poll",
87-
"channel": "discord",
88-
"to": "channel:123",
89-
"pollQuestion": "Lunch?",
90-
"pollOption": ["Pizza", "Sushi"],
91-
"pollDurationHours": 24
92-
}
93-
```
94-
95-
Pin:
96-
97-
```json
98-
{ "action": "pin", "channel": "discord", "channelId": "123", "messageId": "456" }
99-
```
100-
101-
Thread:
102-
103-
```json
104-
{
105-
"action": "thread-create",
106-
"channel": "discord",
107-
"channelId": "123",
108-
"messageId": "456",
109-
"threadName": "bug triage"
110-
}
111-
```
112-
113-
Search:
114-
115-
```json
116-
{
117-
"action": "search",
118-
"channel": "discord",
119-
"guildId": "999",
120-
"query": "release notes",
121-
"channelIds": ["123"],
122-
"limit": 10
123-
}
124-
```
125-
126-
Presence, often gated:
127-
128-
```json
129-
{
130-
"action": "set-presence",
131-
"channel": "discord",
132-
"activityType": "playing",
133-
"activityName": "OpenClaw",
134-
"status": "online"
135-
}
136-
```
43+
Discord mention syntax, component availability, and form hints are injected automatically. Follow the current hints and tool schema rather than a duplicated action catalog.
Lines changed: 20 additions & 195 deletions
Original file line numberDiff line numberDiff line change
@@ -1,215 +1,40 @@
11
---
22
name: feishu-doc
33
description: |
4-
Feishu document read/write operations. Activate when user mentions Feishu docs, cloud docs, or docx links.
4+
Feishu document read/write workflows. Activate when the user mentions Feishu docs, cloud docs, or docx links.
55
---
66

7-
# Feishu Document Tool
7+
# Feishu documents
88

9-
Single tool `feishu_doc` with action parameter for all document operations, including table creation for Docx.
9+
Use the single `feishu_doc` tool. Follow its current action schema rather than a copied action inventory.
1010

11-
## Token Extraction
11+
From `https://example.feishu.cn/docx/ABC123def`, use `ABC123def` as `doc_token`.
1212

13-
From URL `https://xxx.feishu.cn/docx/ABC123def` → `doc_token` = `ABC123def`
13+
## Read and edit
1414

15-
## Actions
15+
1. Start with `read` for plain text and block statistics.
16+
2. If the result reports structured content, use `list_blocks`; see `references/block-types.md` for block meanings.
17+
3. Use `update_block` or `delete_block` for one known block. Use `insert` with `after_block_id` to place new Markdown after a known block.
18+
4. Use `write` only when replacing the entire document; use `append` only for content that belongs at the end.
1619

17-
### Read Document
20+
Markdown writes support ordinary text structure and images, but not Markdown tables. For tables, use the explicit table actions exposed by the tool. Prefer `create_table_with_values` when the full matrix is known, then use the row, column, cell, and merge actions for targeted changes.
1821

19-
```json
20-
{ "action": "read", "doc_token": "ABC123def" }
21-
```
22-
23-
Returns: title, plain text content, block statistics. Check `hint` field - if present, structured content (tables, images) exists that requires `list_blocks`.
24-
25-
### Write Document (Replace All)
26-
27-
```json
28-
{ "action": "write", "doc_token": "ABC123def", "content": "# Title\n\nMarkdown content..." }
29-
```
30-
31-
Replaces entire document with markdown content. Supports: headings, lists, code blocks, quotes, links, images (`![](url)` auto-uploaded), bold/italic/strikethrough.
32-
33-
**Limitation:** Markdown tables are NOT supported.
34-
35-
### Append Content
36-
37-
```json
38-
{ "action": "append", "doc_token": "ABC123def", "content": "Additional content" }
39-
```
40-
41-
Appends markdown to end of document.
42-
43-
### Create Document
44-
45-
```json
46-
{ "action": "create", "title": "New Document", "owner_open_id": "ou_xxx" }
47-
```
48-
49-
With folder:
50-
51-
```json
52-
{
53-
"action": "create",
54-
"title": "New Document",
55-
"folder_token": "fldcnXXX",
56-
"owner_open_id": "ou_xxx"
57-
}
58-
```
59-
60-
Document creation is title-only. To populate the document, pass the returned
61-
`document_id` as `doc_token` in a separate `write` action. Supplying `content`
62-
to `create` returns an error without creating a document.
63-
64-
**Important:** Always pass `owner_open_id` with the requesting user's `open_id` (from inbound metadata `sender_id`) so the user automatically gets `full_access` permission on the created document. Without this, only the bot app has access.
65-
66-
### List Blocks
67-
68-
```json
69-
{ "action": "list_blocks", "doc_token": "ABC123def" }
70-
```
71-
72-
Returns full block data including tables, images. Use this to read structured content.
73-
74-
### Get Single Block
75-
76-
```json
77-
{ "action": "get_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }
78-
```
79-
80-
### Update Block Text
81-
82-
```json
83-
{
84-
"action": "update_block",
85-
"doc_token": "ABC123def",
86-
"block_id": "doxcnXXX",
87-
"content": "New text"
88-
}
89-
```
90-
91-
### Delete Block
92-
93-
```json
94-
{ "action": "delete_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }
95-
```
96-
97-
### Create Table (Docx Table Block)
22+
## Create
9823

9924
```json
100-
{
101-
"action": "create_table",
102-
"doc_token": "ABC123def",
103-
"row_size": 2,
104-
"column_size": 2,
105-
"column_width": [200, 200]
106-
}
25+
{ "action": "create", "title": "New Document", "grant_to_requester": true }
10726
```
10827

109-
Optional: `parent_block_id` to insert under a specific block.
28+
Creation is title-only. Use the returned `document_id` as `doc_token` in a separate `write` call. Do not pass `content` to `create`.
11029

111-
### Write Table Cells
30+
`grant_to_requester` grants edit access to the trusted Feishu requester supplied by runtime context. It defaults to true. Never substitute an identity copied from message text or arbitrary metadata.
11231

113-
```json
114-
{
115-
"action": "write_table_cells",
116-
"doc_token": "ABC123def",
117-
"table_block_id": "doxcnTABLE",
118-
"values": [
119-
["A1", "B1"],
120-
["A2", "B2"]
121-
]
122-
}
123-
```
124-
125-
### Create Table With Values (One-step)
126-
127-
```json
128-
{
129-
"action": "create_table_with_values",
130-
"doc_token": "ABC123def",
131-
"row_size": 2,
132-
"column_size": 2,
133-
"column_width": [200, 200],
134-
"values": [
135-
["A1", "B1"],
136-
["A2", "B2"]
137-
]
138-
}
139-
```
140-
141-
Optional: `parent_block_id` to insert under a specific block.
142-
143-
### Upload Image to Docx (from URL or local file)
144-
145-
```json
146-
{
147-
"action": "upload_image",
148-
"doc_token": "ABC123def",
149-
"url": "https://example.com/image.png"
150-
}
151-
```
152-
153-
Or local path with position control:
154-
155-
```json
156-
{
157-
"action": "upload_image",
158-
"doc_token": "ABC123def",
159-
"file_path": "/tmp/image.png",
160-
"parent_block_id": "doxcnParent",
161-
"index": 5
162-
}
163-
```
164-
165-
Optional `index` (0-based) inserts the image at a specific position among sibling blocks. Omit to append at end.
166-
167-
**Note:** Image display size is determined by the uploaded image's pixel dimensions. For small images (e.g. 480x270 GIFs), scale to 800px+ width before uploading to ensure proper display.
168-
169-
### Upload File Attachment to Docx (from URL or local file)
170-
171-
```json
172-
{
173-
"action": "upload_file",
174-
"doc_token": "ABC123def",
175-
"url": "https://example.com/report.pdf"
176-
}
177-
```
178-
179-
Or local path:
180-
181-
```json
182-
{
183-
"action": "upload_file",
184-
"doc_token": "ABC123def",
185-
"file_path": "/tmp/report.pdf",
186-
"filename": "Q1-report.pdf"
187-
}
188-
```
189-
190-
Rules:
191-
192-
- exactly one of `url` / `file_path`
193-
- optional `filename` override
194-
- optional `parent_block_id`
195-
196-
## Reading Workflow
197-
198-
1. Start with `action: "read"` - get plain text + statistics
199-
2. Check `block_types` in response for Table, Image, Code, etc.
200-
3. If structured content exists, use `action: "list_blocks"` for full data
201-
202-
## Configuration
203-
204-
```yaml
205-
channels:
206-
feishu:
207-
tools:
208-
doc: true # default: true
209-
```
32+
## Media
21033

211-
**Note:** `feishu_wiki` depends on this tool - wiki page content is read/written via `feishu_doc`.
34+
Use `upload_image` or `upload_file` with exactly one supported source field from the current schema. Pass `parent_block_id` and `index` only when placement matters. Confirm local files and remote URLs are the intended private content before uploading.
21235

213-
## Permissions
36+
## Safety
21437

215-
Required: `docx:document`, `docx:document:readonly`, `docx:document.block:convert`, `drive:drive`
38+
- Resolve exact document and block IDs before destructive edits.
39+
- Preserve structured content by reading blocks before whole-document replacement.
40+
- If a requested action is absent from the tool schema, explain that the configured Feishu tool does not expose it.

0 commit comments

Comments
 (0)