Skip to content

Commit 46a2c4d

Browse files
committed
feat: add visual discord briefing skill with script runtime
1 parent f3f0de7 commit 46a2c4d

27 files changed

Lines changed: 960 additions & 0 deletions

skills/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Here is a complete list of AI Skills available in this repository.
88
| **Long Article Visualization** | 自媒体内容生成 | 将长文章转换为手绘风格的信息图。基于深度阅读、主题规划和视觉设计,最终调用 image-generation skill 生成图片。 | [Source](./long-article-visualization/SKILL.md) |
99
| **Pic Search** | 图片搜索 | Wallhaven 高清壁纸搜索引擎。支持按关键词、颜色、分类搜索高质量图片素材。 | [Source](./pic-search/SKILL.md) |
1010
| **Skill Creator** | 技能开发 | Skill 创建向导。通过交互式 SOP 流程,辅助用户从零创建高质量的 AI Skill。 | [Source](./skill-creator/SKILL.md) |
11+
| **Visual Discord Briefing** | 视觉内容生成 | 生成结构化视觉简报(5 模板)并输出 Discord webhook JSON(embed + 可点击按钮)及 IM Markdown companion。 | [Source](./visual-discord-briefing/SKILL.md) |
1112
| **Viral Article Rewriter** | 自媒体内容生成 | 爆款长文改写助手。通过“澄清目标-搭建框架-接地气改写-迭代优化”四步法,将长文转化为爆款文案。 | [Source](./viral-article-rewriter/SKILL.md) |
1213
| **Xianyu Post Gen** | 自媒体内容生成 | 闲鱼帖子生成器。基于产品文档一键生成闲鱼标题、正文、封面提示词、竞品借鉴与发布检查清单。 | [Source](./xianyu-post-gen/SKILL.md) |
1314
| **Xiaohongshu Post Gen** | 自媒体内容生成 | 小红书爆款内容孵化器。基于“种子”创意(Seed)结合平台热点,批量繁衍具有爆款潜质的标题和文案。 | [Source](./xiaohongshu-post-generator/SKILL.md) |
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
name: visual-discord-briefing
3+
description: Generate deterministic visual cards and Discord-ready companion payloads (embed + clickable buttons) from structured content.
4+
---
5+
6+
# Visual Discord Briefing Skill
7+
8+
This skill routes requests into one of five deterministic templates:
9+
10+
- `daily_brief`
11+
- `hot_list`
12+
- `weekly_digest`
13+
- `cover_card`
14+
- `profile_card`
15+
16+
## Routing Rules
17+
18+
- “日报 / 今日简报 / 今日速览” -> `daily_brief`
19+
- “热搜 / 榜单 / 排行 / trending” -> `hot_list`
20+
- “周报 / 月报 / digest / roundup” -> `weekly_digest`
21+
- “封面 / 头图 / banner / thumbnail” -> `cover_card`
22+
- “资料卡 / 介绍卡 / profile / 名片” -> `profile_card`
23+
24+
If multiple routes match, prefer the user’s requested output artifact over the data source.
25+
26+
## Shared Envelope
27+
28+
All requests should compile into a thin shared envelope:
29+
30+
```json
31+
{
32+
"template_type": "daily_brief",
33+
"goal": "summarize_today_news",
34+
"tone": "editorial",
35+
"source_mode": "manual",
36+
"output": {
37+
"formats": ["png"],
38+
"scale": 2
39+
},
40+
"meta": {
41+
"lang": "zh-CN"
42+
},
43+
"payload": {}
44+
}
45+
```
46+
47+
Rules:
48+
49+
- `template_type` must be one of the five supported templates
50+
- meaningful content belongs in `payload`
51+
- `output.formats` supports `svg`, `png`, `jpg`, `jpeg`, `webp`
52+
- if the user asks for “图片” without naming a format, prefer `png`
53+
- if the user asks for source plus image, prefer `["svg", "png"]`
54+
55+
## Payload Ownership
56+
57+
Do not force a giant shared schema across templates.
58+
59+
- top-level fields are only for routing and output control
60+
- each template owns its own payload shape
61+
- template-specific required fields are validated in code, not guessed at render time
62+
63+
## Providers
64+
65+
Current provider support:
66+
67+
- `local_json`: load payload fields from a local JSON file and merge explicit `payload` fields on top
68+
69+
Example:
70+
71+
```json
72+
{
73+
"template_type": "cover_card",
74+
"source_mode": "local",
75+
"provider": {
76+
"type": "local_json",
77+
"path": "references/examples/cover_card.provider.payload.json"
78+
},
79+
"payload": {},
80+
"output": {
81+
"formats": ["svg", "png"]
82+
}
83+
}
84+
```
85+
86+
## IM Clickable Companion
87+
88+
When you need IM-clickable links, add:
89+
90+
```json
91+
{
92+
"companion": {
93+
"mode": "im_clickable"
94+
}
95+
}
96+
```
97+
98+
Behavior:
99+
100+
- renders normal visual outputs (`svg`, `png`, etc.)
101+
- additionally writes `<output>.im.md` with clickable Markdown links
102+
- if `companion.links` is provided, those links are used
103+
- for `hot_list`, links can be inferred from `payload.items[].url`
104+
105+
For Discord webhook delivery, use:
106+
107+
```json
108+
{
109+
"companion": {
110+
"mode": "discord_webhook",
111+
"links": [
112+
{ "label": "Main", "url": "https://example.com/main" }
113+
]
114+
}
115+
}
116+
```
117+
118+
Discord behavior:
119+
120+
- writes `<output>.discord.json`
121+
- includes `embeds` and URL `buttons` (`components`)
122+
- if `links` are omitted and template is `hot_list`, links are inferred from `payload.items[].url`
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"template_type": "cover_card",
3+
"payload": {
4+
"title": "Discord Cover",
5+
"subtitle": "Launch update"
6+
},
7+
"output": {
8+
"formats": ["png"]
9+
},
10+
"companion": {
11+
"mode": "discord_webhook",
12+
"links": [
13+
{
14+
"label": "Main",
15+
"url": "https://example.com/main"
16+
},
17+
{
18+
"label": "Docs",
19+
"url": "https://example.com/docs"
20+
}
21+
]
22+
}
23+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"template_type": "cover_card",
3+
"goal": "make_cover",
4+
"payload": {
5+
"title": "Cover Story",
6+
"subtitle": "A sharp subtitle"
7+
},
8+
"output": {
9+
"formats": ["svg"]
10+
}
11+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"template_type": "cover_card",
3+
"source_mode": "local",
4+
"provider": {
5+
"type": "local_json",
6+
"path": "cover_card.provider.payload.json"
7+
},
8+
"payload": {},
9+
"output": {
10+
"formats": ["svg", "png"]
11+
}
12+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"title": "Provider Cover",
3+
"subtitle": "Loaded from local JSON"
4+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"template_type": "daily_brief",
3+
"goal": "summarize_today_news",
4+
"payload": {
5+
"title": "Today Brief",
6+
"date": "2026-03-13",
7+
"summary": "Key events moved quickly."
8+
},
9+
"output": {
10+
"formats": ["svg"]
11+
}
12+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"template_type": "hot_list",
3+
"payload": {
4+
"title": "Today Hot List",
5+
"items": [
6+
{
7+
"name": "Topic 1",
8+
"url": "https://example.com/topic-1"
9+
},
10+
{
11+
"name": "Topic 2",
12+
"url": "https://example.com/topic-2"
13+
}
14+
]
15+
},
16+
"output": {
17+
"formats": ["svg", "png"]
18+
},
19+
"companion": {
20+
"mode": "im_clickable"
21+
}
22+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"template_type": "hot_list",
3+
"goal": "show_trending_topics",
4+
"payload": {
5+
"title": "Hot List",
6+
"items": [
7+
{
8+
"rank": 1,
9+
"name": "Topic A"
10+
}
11+
]
12+
},
13+
"output": {
14+
"formats": ["svg"]
15+
}
16+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"template_type": "profile_card",
3+
"goal": "introduce_person",
4+
"payload": {
5+
"name": "Alice",
6+
"role": "Founder"
7+
},
8+
"output": {
9+
"formats": ["svg"]
10+
}
11+
}

0 commit comments

Comments
 (0)