Agent Skillsyc-software/qm › slack-drafts

slack-drafts

GitHub

用于为用户生成Slack消息草稿并填入其个人编辑器,支持指定接收方、文本内容及线程回复。不自动发送,需用户确认后手动发出。

skills-seed/slack-drafts/SKILL.md yc-software/qm

Trigger Scenarios

起草Slack回复 准备发送给特定频道或用户的消息草稿

Install

npx skills add yc-software/qm --skill slack-drafts -g -y
More Options

Non-standard path

npx skills add https://github.com/yc-software/qm/tree/main/skills-seed/slack-drafts -g -y

Use without installing

npx skills use yc-software/qm@slack-drafts

指定 Agent (Claude Code)

npx skills add yc-software/qm --skill slack-drafts -a claude-code -g -y

安装 repo 全部 skill

npx skills add yc-software/qm --all -g -y

预览 repo 内 skill

npx skills add yc-software/qm --list

SKILL.md

Frontmatter
{
    "name": "slack-drafts",
    "description": "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.",
    "requiredCapabilities": [
        "egress:slack.com"
    ]
}

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:

python3 skills/slack-drafts/scripts/slack_drafts.py create --to '#general' --text 'hello'
python3 skills/slack-drafts/scripts/slack_drafts.py create --to '@jane' --text-file body.txt
python3 skills/slack-drafts/scripts/slack_drafts.py create --to C0123ABCDEF --thread-ts 1712345678.000100 --text '...'
python3 skills/slack-drafts/scripts/slack_drafts.py resolve --to '#general'
  • --to takes 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-ts targets 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:write scope; tokens connected before that scope existed can only draft into conversations that already exist. On a missing_scope error, 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.

Version History

  • 3cb5623 Current 2026-08-12 09:23

Same Skill Collection

.claude/skills/dev-instance/SKILL.md
.claude/skills/update-qm/SKILL.md
.claude/skills/upstream-pr/SKILL.md
.codex/skills/deploy-qm/SKILL.md
.codex/skills/dev-instance/SKILL.md
.codex/skills/update-qm/SKILL.md
.codex/skills/upstream-pr/SKILL.md
cli/templates/deployment/SKILL.md
plugins/onboarding/skills/onboarding/SKILL.md
skills-seed/admin/SKILL.md
skills-seed/browse/SKILL.md
skills-seed/cloud-cli/SKILL.md
skills-seed/connect-apps/SKILL.md
skills-seed/dropbox/SKILL.md
skills-seed/email-draft-in-voice/SKILL.md
skills-seed/email-voice-profile/SKILL.md
skills-seed/github-gitlab/SKILL.md
skills-seed/google-drive-sheets/SKILL.md
skills-seed/google-workspace/SKILL.md
skills-seed/interactive-login/SKILL.md
skills-seed/linear/SKILL.md
skills-seed/memory/SKILL.md
skills-seed/morning-digest/SKILL.md
skills-seed/popular-web-designs/SKILL.md
skills-seed/publish/SKILL.md
skills-seed/taste-skill/SKILL.md
skills-seed/use-shared-credential/SKILL.md

Metadata

Files
0
Version
3cb5623
Hash
e819a883
Indexed
2026-08-12 09:23

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-13 03:57
浙ICP备14020137号-1 $お客様$