创建 Slack 应用
Slack 应用就是 Kura酱 使用的机器人身份。要一次性配好所需的作用域、事件和全部 8 个斜杠命令,最快的方式是从清单(manifest)创建 —— 只需粘贴一段配置。
-
打开应用列表
前往 api.slack.com/apps,点击 Create New App。
-
选择 “From a manifest”
选中你想让 Kura酱 常驻的工作区,点击 Next。
-
粘贴清单
切换到 YAML 标签页,把内容替换为下面这段,然后点击 Next → Create。
name和display_name可以改成任何你喜欢的名字。display_information:name: Kura酱description: Slack 里属于你的个人 AI 智能体background_color: "#000000"features:app_home:home_tab_enabled: truemessages_tab_enabled: falsemessages_tab_read_only_enabled: falsebot_user:display_name: Kura酱always_online: trueshortcuts:- name: Capture to Kuratype: messagecallback_id: kura_capturedescription: 把这条消息保存给 Kura酱slash_commands:- command: /kura-askdescription: Quick questionshould_escape: false- command: /kura-searchdescription: Search knowledge baseshould_escape: false- command: /kura-summarydescription: Channel summaryshould_escape: false- command: /kura-digestdescription: Daily digestshould_escape: false- command: /kura-reminddescription: Set remindershould_escape: false- command: /kura-filesdescription: Recent filesshould_escape: false- command: /kura-modeldescription: Switch modelshould_escape: false- command: /kura-helpdescription: Show helpshould_escape: falseoauth_config:scopes:bot:- app_mentions:read- channels:history- chat:write- commands- files:read- files:write- groups:history- im:history- im:read- im:write- im:write.topic- mpim:history- mpim:read- mpim:write- reactions:read- reactions:write- users:readpkce_enabled: truesettings:event_subscriptions:bot_events:- app_home_opened- app_mention- message.channels- message.groups- message.iminteractivity:is_enabled: trueorg_deploy_enabled: falsesocket_mode_enabled: truetoken_rotation_enabled: falseis_mcp_enabled: false
清单会设置哪些内容
Section titled “清单会设置哪些内容”- Socket Mode —— 外向连接,无需公网 URL。
- Bot 作用域 —— 发消息(
chat:write)、斜杠命令(commands)、读取与上传文件(files:read、files:write)、读取私信 / 群组私信 / 频道的消息(im:*、mpim:*、groups:history、channels:history)、发起与命名私信(im:write、im:write.topic)、提及(app_mentions:read)、表情回应(reactions:read、reactions:write)、以及识别发言者(users:read)。 - 事件 ——
app_mention、私信 / 群组 / 频道消息(message.im、message.groups、message.channels)、app_home_opened。 - Interactivity、App Home 标签,以及一个 “Capture to Kura” 消息快捷方式(右键任意消息 → 保存给 Kura酱)。
- 全部 8 个
/kura-*斜杠命令。
接着,生成并复制你的凭据:前往两个令牌。
想手动配置?
Section titled “想手动配置?”手动配置清单(不用 manifest)
在 Create New App → From scratch 之后,逐节配置:
- Socket Mode(Settings → Socket Mode):打开 Enable Socket Mode。
- OAuth & Permissions → Bot Token Scopes,全部添加:
app_mentions:read、channels:history、chat:write、commands、files:read、files:write、groups:history、im:history、im:read、im:write、im:write.topic、mpim:history、mpim:read、mpim:write、reactions:read、reactions:write、users:read。 - Event Subscriptions:启用事件,然后在 Subscribe to bot events 添加:
app_home_opened、app_mention、message.channels、message.groups、message.im。 - Interactivity & Shortcuts:打开 Interactivity,然后 Create New Shortcut → On messages,创建名为
Capture to Kura、callback ID 为kura_capture的快捷方式。 - App Home:启用 Home Tab(Messages 标签可保持关闭)。
- Slash Commands:逐个手动创建 8 个命令 ——
/kura-ask、/kura-search、/kura-summary、/kura-digest、/kura-remind、/kura-files、/kura-model、/kura-help。 开启 Socket Mode 后,Request URL 留空即可。