slack-drafts
它能做什么
让助手在你的 Slack 应用中准备一条消息,以你的身份发出,并指向你选择的聊天。适合希望获得回复帮助、但想自己发送的人。
适用场景
- ✓当你希望为 Slack 对话撰写回复,供你审阅时。
- ✓当你希望为某个频道准备消息但不直接发布时。
- ✓当你需要在现有的 Slack 讨论中起草一条话题回复时。
技能链接
https://github.com/yc-software/qm/blob/main/skills-seed/slack-drafts/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在产品 Slack 频道中为 Priya 的问题起草一条回复,并留给我自己发送。”
每周 5 个新技能,1 分钟读完。
工作原理
助手会在你的 Slack 编辑框中创建一份草稿,指向正确的频道或人员。在你审阅并在 Slack 中点击发送之前,不会发布任何内容。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Slack drafts
Use this skill when the user wants a Slack message prepared for them to review and send themselves: "draft a reply to X", "prep a message for #general", "write that up as a Slack draft". The draft lands in their own Slack composer, attributed to them, targeted at the conversation you choose — nothing is posted.
This is an OAuth connector. The resolved user's Slack user token lives on your
computer as $VAULT_TOKEN_SLACK_COM. Do not ask the user for a token, log it, or
use another principal's. If the variable is empty or Slack returns 401/403, the user
either has not connected Slack or connected before this permission existed — tell
them to (re)connect it through the product OAuth flow.
Use the bundled helper for every draft — it owns destination resolution, rich-text block construction, and the required draft envelope:
Run these commands with execute and an explicit sandbox_id, using the absolute
directory reported by the skill read in place of <skill dir>. Keep that ID for
preparing body files and running the helper.
python3 "<skill dir>/scripts/slack_drafts.py" create --to '#general' --text 'hello'
python3 "<skill dir>/scripts/slack_drafts.py" create --to '@jane' --text-file body.txt
python3 "<skill dir>/scripts/slack_drafts.py" create --to C0123ABCDEF --thread-ts 1712345678.000100 --text '...'
python3 "<skill dir>/scripts/slack_drafts.py" resolve --to '#general'
--totakes a channel/IM ID (C…/G…/D…), a user ID (U…/W…),#channel-name, or@name(matched against username, display name, real name, or email; ambiguous matches are refused — fall back to a user ID).- Text is plain; URLs become clickable links. Write it exactly as the user would send it — it goes out under their name, in their voice, once they hit send.
--thread-tstargets the draft at a thread reply instead of the channel composer.- Drafts are create-only through this API: you cannot list, edit, or delete a draft once made. To revise, tell the user to discard the old draft in Slack and create a fresh one. Never work around this by posting messages — drafting means the user sends.
- Opening a brand-new DM needs the
im:writescope; tokens connected before that scope existed can only draft into conversations that already exist. On amissing_scopeerror, tell the user to reconnect Slack. - Slack keeps at most one draft per composer: a second draft into the same channel or
thread fails with
attached_draft_exists. Tell the user to send or discard the existing draft, then retry.
常见问题
助手会替我发布消息吗?
不会。它只创建草稿,由你自己在 Slack 中发送。
它能在话题中回复吗?
可以。它可以指定某个话题,使草稿作为回复出现在该对话中。
如果 Slack 提示缺少访问权限怎么办?
请通过产品的连接流程连接 Slack,因为助手需要你的 Slack 权限才能创建草稿。
详情
作者的原始描述
Create Slack message drafts in the user's own composer, as the user, through their per-user Slack OAuth. Drafting only — the user reviews and sends from Slack.
repo: yc-software/qm
热度
- GitHub 星标
- 16k
- 排名
- #10906
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
deploy-qm
16k按照完整的部署清单,将 QM 软件包部署到 Fly.io、AWS 或 Render,然后设置管理员、连接器,并可选择连接 Slack。
onboarding
16k在一段简短的对话中,引导新用户连接账户、说明自己的工作方式、选择语音,并设置最初的帮助内容。
admin
16k让经过验证的组织管理员在聊天中查看或更改全组织范围的设置及其他范围,并在每项更改前进行确认。
browse
16k从你的 shell 驱动真实的隐身浏览器,在网站上执行操作,例如登录或填写表单,并按人保存登录状态。仅用于操作,不用于阅读。