|
| 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` |
0 commit comments