{"id":"8d7c3a8d-2bf7-4aeb-8808-658f4d684c04","slug":"liush2yuxjtu-telebutton","name":"telebutton","description":"Telegram 选择按钮交互 Skill。用于在 Telegram 对话中向用户展示选择按钮（InlineKeyboard），获取用户反馈。\n\n使用场景：\n- 需要用户从多个选项中选择\n- 多轮嵌套菜单（选择后显示子菜单）\n- 简单的确认/取消交互\n- 工作流分支选择（如 HPC 任务提交方式选择）\n\n核心特点：\n- 配置驱动：通过 YAML/JSON 定义按钮结构，无需修改代码\n- 支持嵌套：多级菜单，选择后自动展开子选项\n- 临时状态：无需持久化存储，适合快速交互\n- 通用接口：与具体执行逻辑解耦，Agent 自行处理选择结果","canonicalUrl":"https://xpersona.co/skill/liush2yuxjtu-telebutton","sourceUrl":"https://github.com/liush2yuxjtu/telebutton","homepage":null,"source":"GITHUB_OPENCLEW","vendor":{"slug":"liush2yuxjtu","label":"Liush2yuxjtu","url":"https://github.com/liush2yuxjtu/telebutton"},"protocols":["OPENCLEW"],"capabilities":[],"trustScore":null,"trustConfidence":"unknown","artifactCount":0,"benchmarkCount":0,"lastRelease":null,"freshnessAt":"2026-04-14T22:23:52.272Z","freshnessLabel":"Apr 14, 2026","securityReviewed":true,"openapiReady":false,"stats":[{"label":"Trust score","value":"Unknown"},{"label":"Compatibility","value":"OpenClaw"},{"label":"Freshness","value":"Apr 14, 2026"},{"label":"Vendor","value":"Liush2yuxjtu"},{"label":"Artifacts","value":"0"},{"label":"Benchmarks","value":"0"},{"label":"Last release","value":"Unpublished"}],"factsPreview":[{"factKey":"docs_crawl","category":"integration","label":"Crawlable docs","value":"6 indexed pages on the official domain","href":"https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar","sourceUrl":"https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar","sourceType":"search_document","confidence":"medium","observedAt":"2026-04-15T05:03:46.393Z","isPublic":true},{"factKey":"vendor","category":"vendor","label":"Vendor","value":"Liush2yuxjtu","href":"https://github.com/liush2yuxjtu/telebutton","sourceUrl":"https://github.com/liush2yuxjtu/telebutton","sourceType":"profile","confidence":"medium","observedAt":"2026-04-14T22:23:52.272Z","isPublic":true},{"factKey":"protocols","category":"compatibility","label":"Protocol compatibility","value":"OpenClaw","href":"https://xpersona.co/api/v1/agents/liush2yuxjtu-telebutton/contract","sourceUrl":"https://xpersona.co/api/v1/agents/liush2yuxjtu-telebutton/contract","sourceType":"contract","confidence":"medium","observedAt":"2026-04-14T22:23:52.272Z","isPublic":true},{"factKey":"handshake_status","category":"security","label":"Handshake status","value":"UNKNOWN","href":"https://xpersona.co/api/v1/agents/liush2yuxjtu-telebutton/trust","sourceUrl":"https://xpersona.co/api/v1/agents/liush2yuxjtu-telebutton/trust","sourceType":"trust","confidence":"medium","observedAt":null,"isPublic":true}],"highlights":["Trust evidence available"],"agentCard":{"name":"telebutton","description":"Telegram 选择按钮交互 Skill。用于在 Telegram 对话中向用户展示选择按钮（InlineKeyboard），获取用户反馈。\n\n使用场景：\n- 需要用户从多个选项中选择\n- 多轮嵌套菜单（选择后显示子菜单）\n- 简单的确认/取消交互\n- 工作流分支选择（如 HPC 任务提交方式选择）\n\n核心特点：\n- 配置驱动：通过 YAML/JSON 定义按钮结构，无需修改代码\n- 支持嵌套：多级菜单，选择后自动展开子选项\n- 临时状态：无需持久化存储，适合快速交互\n- 通用接口：与具体执行逻辑解耦，Agent 自行处理选择结果","source":"GITHUB_OPENCLEW","sourceId":"github:1151980340","repository":"https://github.com/liush2yuxjtu/telebutton","documentation":"https://xpersona.co/skill/liush2yuxjtu-telebutton/agent/liush2yuxjtu-telebutton","protocols":["OPENCLEW"],"languages":["typescript"],"install":{"command":"git clone https://github.com/liush2yuxjtu/telebutton.git","ecosystem":"git"},"examples":[{"kind":"example","language":"python","snippet":"from telebutton import ButtonMenu, show_menu, wait_selection\n\n# 定义菜单\nmenu = ButtonMenu(\n    question=\"选择执行方式：\",\n    options=[\n        {\"text\": \"本地运行\", \"callback\": \"local\"},\n        {\"text\": \"远程服务器\", \"callback\": \"remote\", \"sub_menu\": {\n            \"question\": \"选择服务器：\",\n            \"options\": [\n                {\"text\": \"HPC-01\", \"callback\": \"hpc_01\"},\n                {\"text\": \"HPC-02\", \"callback\": \"hpc_02\"}\n            ]\n        }}\n    ]\n)\n\n# 发送按钮\nmessage_id = show_menu(menu)\n\n# 等待用户选择（阻塞式）\nresult = wait_selection(timeout=300)  # 5分钟超时\n\nprint(f\"用户选择了: {result['callback']}\")\n# 输出: 用户选择了: hpc_01"},{"kind":"example","language":"python","snippet":"from telebutton import load_menu_from_file, show_menu, wait_selection\n\n# 从 YAML 加载\nmenu = load_menu_from_file(\"config/hpc_menu.yaml\")\nshow_menu(menu)\nresult = wait_selection()"}]}}