Agent skill
slack-unanswered
Find unanswered Slack messages where you are mentioned or threads you created. Searches slack-sync/data/ for messages mentioning @Kohei, @Kohei Nakamura, @minicoohei, or @Kohei(TokenPocket) that have no replies.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/slack-unanswered
SKILL.md
Slack Unanswered Messages Finder
This skill finds Slack messages that need your attention and helps you reply to them.
Target Directory
All searches are performed in: slack-sync/data/
Your Identifiers
Search for these names (case-insensitive):
@Kohei@Kohei Nakamura@minicoohei@Kohei (TokenPocket)@Kohei(TokenPocket)- Messages posted by:
Kohei Nakamura,Kohei (TokenPocket),minicoohei
Workflow
Step 1: Find Unanswered Messages
Search for messages containing your identifiers:
grep -rn -B2 -A10 -E "@Kohei|@minicoohei|Kohei Nakamura|Kohei \(TokenPocket\)" slack-sync/data/
Step 2: Identify Unanswered Messages
A message is unanswered if:
- It contains a mention of your name (or you posted it)
- It ends with a question (
?) or contains a request - There are NO lines starting with
> ####immediately after it (before the next###or---)
Focus on recent messages (last 7 days). Exclude bot messages (Sentry, Vercel, etc.).
Step 3: Present Findings
For each unanswered message, provide:
- Channel name
- Date/Time
- Sender
- Content summary
- Slack link
- Whether it needs a reply or is a follow-up
Step 4: Generate Reply Draft
For messages that need replies, generate a draft reply in Japanese. Ask the user to review and edit.
Step 5: Send Reply (with confirmation)
IMPORTANT: Always get user confirmation before sending!
The reply flow is:
- Show the draft reply to the user
- Ask: "この内容で送信してよろしいですか? (修正があれば教えてください)"
- Wait for user confirmation or edits
- Only after explicit approval, use the reply script
Replying to Messages
Reply Script Location
slack-sync/scripts/reply_slack.py
Usage
# Dry run (preview without sending)
python slack-sync/scripts/reply_slack.py \
--url "https://xxx.slack.com/archives/CHANNEL/pTIMESTAMP" \
--message "返信内容" \
--dry-run
# Actually send (only after user confirms!)
python slack-sync/scripts/reply_slack.py \
--url "https://xxx.slack.com/archives/CHANNEL/pTIMESTAMP" \
--message "返信内容"
Environment Variable Required
SLACK_USER_TOKEN=xoxp-...
This token needs the chat:write scope. See setup instructions below.
Reply Flow Example
Claude: 以下の返信案を作成しました:
---
宛先: @Yuta Sato(佐藤 勇太)
チャンネル: datadev-ai
Slack: [リンク](https://...)
返信案:
「田村さんのSlackアカウントは @xxx です!」
---
この内容で送信してよろしいですか? (修正があれば教えてください)
User: OKです
Claude: [reply_slack.py を実行して送信]
送信しました!
Setup: Adding chat:write Scope
To enable reply functionality:
- Go to Slack API Apps
- Select your app (e.g., "Message Archiver")
- Navigate to OAuth & Permissions
- Under User Token Scopes, add:
chat:write- Post messages
- Click Reinstall to Workspace
- Copy the new
xoxp-...token - Update
SLACK_USER_TOKENin your environment/GitHub Secrets
Message Format Reference
Messages in markdown files:
- Main message:
### HH:MM - Sender Name [[Slack]](url) - Reply: Lines starting with
> ####
TODO File Management
TODO File Location
slack-sync/TODO.md
TODO Format
- [ ] **[channel-name]** Sender名 (日付 時刻)
- 内容: メッセージの要約
- Slack: URL
- 返信案: 返信内容のドラフト
Workflow with TODO
- 検索時: 未回答メッセージを見つけたらTODO.mdに追加
- 返信時: 返信したらチェックボックスを
[x]に変更 - 完了時: 「完了したメッセージ」セクションに移動
Adding a Task
When you find an unanswered message, add it to slack-sync/TODO.md:
- [ ] **[datadev-ai]** Yuta Satoさん (1/7 19:10)
- 内容: 田村さんのSlackアカウント名の確認
- Slack: https://...
- 返信案: アカウント名を確認して回答
Completing a Task
After sending a reply:
- Change
- [ ]to- [x] - Move the item to the "完了したメッセージ" section
Quick Commands
Find mentions in recent files:
grep -rn -B2 -A10 "@Kohei" slack-sync/data/ | head -200
Find your posts:
grep -rn "### [0-9:]* - Kohei" slack-sync/data/ | head -100
Find questions to you:
grep -rn -A5 "@Kohei" slack-sync/data/ | grep -E "\?$|でしょうか|ですか|ますか|ください"
View current TODO:
cat slack-sync/TODO.md
Didn't find tool you were looking for?