skills: add hybrid lead-in option-menu trigger

This commit is contained in:
Eve
2026-04-15 23:44:36 +08:00
parent 38072022b4
commit 099fdca2bc
2 changed files with 30 additions and 9 deletions

View File

@@ -17,11 +17,3 @@ npx skills add <owner>/<repo> --skill telegram-inline-buttons -g -y
## Included skill ## Included skill
- `skills/telegram-inline-buttons/SKILL.md` - `skills/telegram-inline-buttons/SKILL.md`
## What it teaches
Prefer Telegram inline buttons when asking Eric to:
- confirm yes/no
- answer implicit yes/no (`如果你要...`)
- choose from numbered options (`1/2/3`)
- pick one of assistant-proposed next steps
- keep natural Chinese wording and only change the reply path to buttons

View File

@@ -15,6 +15,7 @@ Prefer inline buttons over free-text prompts when sending a proactive Telegram m
- Picking one of a few next actions - Picking one of a few next actions
- Numbered option lists like `1.xxx`, `2.ooo`, `3.yyy` - Numbered option lists like `1.xxx`, `2.ooo`, `3.yyy`
- Agent-proposed next-step menus written as `1. ... 2. ... 3. ...` - Agent-proposed next-step menus written as `1. ... 2. ... 3. ...`
- Hybrid prompts like `如果你要我下一步可以1... 2... 3...`
## Do not use buttons for ## Do not use buttons for
- Purely informational messages - Purely informational messages
@@ -29,6 +30,7 @@ Treat these as button-worthy even if they are not written as direct questions:
- `如果你要我繼續,我就直接做` - `如果你要我繼續,我就直接做`
- `如果你要 ooooxxxxx` - `如果你要 ooooxxxxx`
- `1. 立刻重發一次 2. 改成更明顯的測試文案 3. 直接在這裡做另一種測試` - `1. 立刻重發一次 2. 改成更明顯的測試文案 3. 直接在這裡做另一種測試`
- `如果你要我下一步可以1. 再測一次 2. 重新打包 3. 看修正摘要`
These are usually implicit binary decisions or compact next-step menus and should default to inline buttons rather than requiring free-text confirmation. These are usually implicit binary decisions or compact next-step menus and should default to inline buttons rather than requiring free-text confirmation.
@@ -58,6 +60,27 @@ Avoid:
``` ```
when the whole point is to let Eric choose one. when the whole point is to let Eric choose one.
## Hybrid natural-language + numbered-options rule
When the message uses a natural Chinese lead-in and then lists next actions, preserve the lead-in and turn the numbered choices into buttons.
Good:
- Text: `如果你要,我下一步可以:`
- Buttons: `[再測一次] [重新打包] [看修正摘要]`
Also good:
- Text: `如果你要,我接下來可以這樣做:`
- Buttons: `[先修規則] [再做測試] [直接打包]`
Avoid leaving this as plain text like:
```text
如果你要,我下一步可以
1. 再測一次
2. 重新打包
3. 看修正摘要
```
If the sentence is already natural, keep the sentence. Only convert the reply path into inline buttons.
## Button design ## Button design
- Keep labels short: 1-4 words - Keep labels short: 1-4 words
- 2-4 buttons is ideal - 2-4 buttons is ideal
@@ -67,6 +90,7 @@ when the whole point is to let Eric choose one.
- When the source prompt is implicit yes/no, convert it into a clear binary choice without changing the underlying intent - When the source prompt is implicit yes/no, convert it into a clear binary choice without changing the underlying intent
- Prefer preserving natural Chinese phrasing and only replacing the free-text reply path with buttons - Prefer preserving natural Chinese phrasing and only replacing the free-text reply path with buttons
- When the assistant proposes next steps, use buttons instead of a numbered response menu whenever the user is expected to pick one - When the assistant proposes next steps, use buttons instead of a numbered response menu whenever the user is expected to pick one
- For `如果你要,我下一步可以...` style prompts, keep the lead-in sentence and convert only the listed options into buttons
Recommended layouts: Recommended layouts:
- Binary: one row `[Yes] [No]` - Binary: one row `[Yes] [No]`
@@ -75,6 +99,7 @@ Recommended layouts:
- Numbered list: `[1] [2] [3]` or short labels derived from each option - Numbered list: `[1] [2] [3]` or short labels derived from each option
- Implicit yes/no: `[好,繼續] [先不要]`, `[要] [不用]`, `[現在做] [稍後]` - Implicit yes/no: `[好,繼續] [先不要]`, `[要] [不用]`, `[現在做] [稍後]`
- Next-step menu: `[立刻重發] [改文案] [另一種測試]` - Next-step menu: `[立刻重發] [改文案] [另一種測試]`
- Hybrid lead-in + options: text `如果你要,我下一步可以:` + buttons `[再測一次] [重新打包] [看修正摘要]`
## Telegram message tool pattern ## Telegram message tool pattern
For user-visible delivery, use `message(action="send")` with `buttons`. For user-visible delivery, use `message(action="send")` with `buttons`.
@@ -161,7 +186,11 @@ Buttons: `[好,開始] [先不要]`
Text: `要怎麼測比較好?` Text: `要怎麼測比較好?`
Buttons: `[立刻重發] [改文案] [另一種測試]` Buttons: `[立刻重發] [改文案] [另一種測試]`
### Hybrid lead-in + options
Text: `如果你要,我下一步可以:`
Buttons: `[再測一次] [重新打包] [看修正摘要]`
## Decision rule ## Decision rule
Default to buttons whenever Eric is being asked to choose, confirm, defer, or select the next action on Telegram. This includes numbered lists that would otherwise require a reply like `1`, `2`, or `3`, implicit yes/no prompts that would otherwise require a reply like `好` or `不用`, and assistant-proposed next-step menus where Eric is clearly meant to pick one option. Default to buttons whenever Eric is being asked to choose, confirm, defer, or select the next action on Telegram. This includes numbered lists that would otherwise require a reply like `1`, `2`, or `3`, implicit yes/no prompts that would otherwise require a reply like `好` or `不用`, assistant-proposed next-step menus where Eric is clearly meant to pick one option, and hybrid prompts like `如果你要我下一步可以1... 2... 3...`.
When the original wording is already natural Chinese, keep the wording and just turn the response path into buttons. When the original wording is already natural Chinese, keep the wording and just turn the response path into buttons.