slack-scan
Skill3 starsChanged 10 days agoMITView on GitHub
Summarize today's Slack channel activity on demand (bot-member channels). NOT for pings/mentions -- use slack-mention-watch.
- Reads credentials
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- covidence-full-text-reviewSkill
- covidence-full-text-retrievalSkill
- covidence-screeningSkill
- impeccableSkill
- ilearning-autoadvanceSkill
- oh-my-piSkill
- auditing-worktreesSkill
- camofox-browserSkill
- demo-runbookSkill
- hermes-deepseek-cacheSkill
- i-have-adhdSkill
- memory-uiSkill
- multi-repo-pr-review-merge-roundSkill
- oh-my-ghosttySkill
- tldrSkill
- writing-reportsSkill
- sci-hub-accessSkill
- slack-mention-watchSkill
- superpowers-using-superpowersSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 65
No channel named -> enumerate every conversation the bot is a member of:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Slack notification summary (on demand)
"Who pinged me / any notifications / what did I miss / mentions of @you"? Do NOT use this skill -- load
slack-mention-watchand runpython3 ~/.hermes/skills/slack/slack-mention-watch/scripts/watch_mentions.py --recent 24(one terminal call, foreground, no notify/heartbeat args). It searches every channel and DM the user can see; this skill only sees channels the bot was invited to.
When to use this
There is no cron job for this by design -- the user asked to hold off on scheduling. This
skill runs entirely inside the current chat, the moment it's asked for, and produces nothing
persistent (no state file, no write to ~/tasks/inbox.md) unless the user explicitly asks for
that. Two shapes of request:
- "Summarize today" / "what did I miss?" (no channel named) -- recap every channel and DM the bot is currently a member of.
- "What's in #channel today?" (channel named) -- recap just that one.
Prerequisites
- The bot must be a member of any channel it's asked to cover (
/inviteyour Hermes bot in it). Public channels the bot never joined, and private channels it wasn't invited to, are invisible to it -- there is no workaround. SLACK_BOT_TOKENis set in~/.hermes/.env.- Bot scopes
channels:history/groups:history/im:history/mpim:historyare granted (already part of the standard manifest -- seeslack-todo-bot/README.mdstep 2).
Never rely on $SLACK_BOT_TOKEN from the shell environment -- it is always empty. Hermes
strips SLACK_BOT_TOKEN (plus SLACK_APP_TOKEN, SLACK_HOME_CHANNEL) from every subprocess it
spawns, including this skill's own terminal-tool calls, because those names are registered
gateway-managed "messaging" credentials in tools/environments/local.py
_HERMES_PROVIDER_ENV_BLOCKLIST (SECURITY.md section 2.3 / GHSA-rhgp-j443-p4rf). This is
unconditional: no required_environment_variables frontmatter declaration and no config.yaml
terminal.env_passthrough entry can re-allow it -- both paths explicitly refuse to register a
blocklisted name. Confirmed empirically: a live hermes --toolsets terminal -z '...' turn that
echoed ${#SLACK_BOT_TOKEN} printed 0, even with the token exported in the parent shell before
hermes was invoked.
The strip only filters inherited process environment -- not plain file reads. Every command
below extracts the token straight out of ~/.hermes/.env at call time instead:
$(grep '^SLACK_BOT_TOKEN=' ~/.hermes/.env | cut -d= -f2-). Apply the same pattern to any new
API call you add to this skill.
There is no slack_history or similar agent-callable tool. Every step below goes through the
terminal tool calling Slack's Web API directly with curl/python3, reading the token from
~/.hermes/.env as shown above.
Steps
1. Determine scope
- Channel named in the request -> resolve just that one ID (see "Resolve a channel name" below).
No channel named -> enumerate every conversation the bot is a member of:
SLACK_TOKEN=$(grep '^SLACK_BOT_TOKEN=' ~/.hermes/.env | cut -d= -f2-) curl -s -H "Authorization: Bearer $SLACK_TOKEN" \ "https://slack.com/api/conversations.list?types=public_channel,private_channel,mpim,im&limit=200&exclude_archived=true"Paginate on
response_metadata.next_cursor. Keep only entries whereis_memberistrue(private channels and IMs/MPIMs the bot can see are always ones it's already in; public channels need the explicitis_membercheck since the list includes ones it never joined).
2. Compute "today" as a Unix timestamp
Midnight today, in the user's local timezone if known from context, else the machine's local time:
python3 -c "from datetime import datetime; print(datetime.now().replace(hour=0,minute=0,second=0,microsecond=0).timestamp())"3. Fetch each channel's history since that timestamp
SLACK_TOKEN=$(grep '^SLACK_BOT_TOKEN=' ~/.hermes/.env | cut -d= -f2-)
curl -s -H "Authorization: Bearer $SLACK_TOKEN" \
"https://slack.com/api/conversations.history?channel=CHANNEL_ID&oldest=OLDEST_TS&limit=200"Paginate on response_metadata.next_cursor. Rate limit: conversations.history is Tier 3
(~50 req/min per workspace). If scope is "every channel" and the bot is in more than a handful,
write a short throwaway Python script via the terminal tool that loops over channel IDs with a
time.sleep(1.2) between calls and retries once on HTTP 429 honoring the Retry-After header --
don't fire a burst of sequential curl calls with no delay.
Drop any channel that returns zero messages after filtering (step 4) -- don't mention it in the final summary.
4. Filter
Drop messages where subtype == "bot_message" (avoids echoing digests/other bots' output). Keep
user, ts, text for the rest.
5. Summarize -- this is a general recap, not just a TODO list
For each channel with activity today, reason over its messages and produce 2-5 bullets covering whatever's actually there:
- decisions made or announcements posted
- direct mentions of the requesting user, or messages addressed to them
- open questions / blockers with no visible resolution
- explicit asks or deadline language ("by EOD", "ASAP", "before standup") -- call these out as action items within the recap, but don't force every channel into a TODO-shaped bullet list if the activity was just discussion or FYI-style updates.
6. Reply
One message, grouped by channel (#channel-name or DM name as a heading), most-active or
most-urgent channel first. If scope was "everything" and nothing had activity today, say so
plainly. Don't write anything to disk -- this is a pull; only append to ~/tasks/inbox.md if the
user explicitly says "add these to my list" (tag with [d:t], dedup by the Slack message ts).
Resolve a channel name
SLACK_TOKEN=$(grep '^SLACK_BOT_TOKEN=' ~/.hermes/.env | cut -d= -f2-)
curl -s -H "Authorization: Bearer $SLACK_TOKEN" \
"https://slack.com/api/conversations.list?types=public_channel,private_channel&limit=200" \
| python3 -c "import json,sys; d=json.load(sys.stdin); print([c['id'] for c in d['channels'] if c['name']=='channel-name'])"Paginate if the workspace has more than 200 channels.
Errors
| Response | Meaning | Action |
not_in_channel | Bot isn't a member | Tell the user to /invite the Hermes bot in that channel, skip it (don't fail the whole summary). |
missing_scope | A history scope isn't granted | Point to slack-todo-bot/README.md step 2, stop. |
channel_not_found | Bad ID or private channel bot can't see | Ask the user to confirm the channel name/ID. |
ratelimited (HTTP 429) | Too many conversations.history calls | Sleep for the Retry-After header value, retry once, then skip that channel and note it in the reply. |
Empty messages everywhere | No activity today | Say so plainly -- don't fabricate items. |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

