agentleFS
ruizricaruizrica/agent-pi/skills/slack-web/SKILL.md

slack-web

Skill274 starsChanged 8 months agoMITView on GitHub

Slack web automation via agent-browser. Use when the user asks to check Slack, read messages, send messages, reply in threads, search Slack, check notifications, react to messages, send DMs, or any Slack communication task. Triggers include "check my Slack", "send a message on Slack", "reply to that Slack thread", "search Slack for...", "what's new on Slack", "read my DMs", "react to that message", "check Slack notifications", "message [person] on Slack".

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every Slack interaction follows this pattern:

    line 19
  2. Distinctive:

    Interact: Use refs to click, type, navigate

    line 24
  3. Distinctive:

    Re-snapshot: After every action — Slack's DOM changes constantly

    line 25
  4. Very specific:

    Use type not fill — Slack's compose box is contenteditable.

    line 105
  5. Distinctive:

    ALWAYS re-snapshot: after every action — refs invalidate constantly

    line 187
  6. Distinctive:

    When refs don't match:

    line 197

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Slack Web Automation

Interact with Slack through its web interface using agent-browser.

Core Workflow

Every Slack interaction follows this pattern:

  1. Restore session: agent-browser state load ~/.slack-auth-state.json
  2. Open Slack: agent-browser --headed open "https://app.slack.com"
  3. Snapshot: agent-browser snapshot -i -c (get refs)
  4. Interact: Use refs to click, type, navigate
  5. Re-snapshot: After every action — Slack's DOM changes constantly
# Restore and open
agent-browser state load ~/.slack-auth-state.json
agent-browser --headed open "https://app.slack.com"
agent-browser wait --load networkidle
agent-browser set viewport 1920 1080

# Verify logged in (URL should contain /client/)
agent-browser get url

# Navigate with quick switcher
agent-browser press "Meta+k"
agent-browser wait 500
agent-browser snapshot -i
agent-browser fill @eXX "general"
agent-browser wait 1000
agent-browser snapshot -i
agent-browser click @eXX
agent-browser wait --load networkidle

# Read messages
agent-browser snapshot -c

Authentication

First-Time Login (Manual)

agent-browser --headed open "https://app.slack.com"
# PAUSE — tell user to log in manually
# After login confirmed:
agent-browser get url  # verify /client/ in URL
agent-browser state save ~/.slack-auth-state.json

Restore Session

agent-browser state load ~/.slack-auth-state.json
agent-browser --headed open "https://app.slack.com"
agent-browser wait --load networkidle
agent-browser get url
# If URL contains "signin" → session expired, user must re-login

Actions

Read Messages

# Navigate to channel (quick switcher is fastest)
agent-browser press "Meta+k"
agent-browser wait 500
agent-browser snapshot -i
agent-browser fill @eXX "channel-name"
agent-browser wait 1000
agent-browser snapshot -i
agent-browser click @eXX
agent-browser wait --load networkidle

# Read
agent-browser snapshot -c

Send a Message

# In the target channel, find compose box
agent-browser snapshot -i
# Look for textbox with "Message #channel" placeholder
agent-browser click @eXX  # compose area
agent-browser type @eXX "Your message"
agent-browser press "Enter"
agent-browser wait 1000
agent-browser snapshot -c  # verify sent

Use type not fill — Slack's compose box is contenteditable.

Reply to Thread

agent-browser snapshot -c
agent-browser hover @eXX  # hover message to show toolbar
agent-browser snapshot -i
agent-browser click @eXX  # reply/thread button
agent-browser wait --load networkidle
agent-browser snapshot -i
agent-browser click @eXX  # thread compose box
agent-browser type @eXX "Thread reply"
agent-browser press "Enter"

Send DM

agent-browser press "Meta+k"
agent-browser wait 500
agent-browser snapshot -i
agent-browser fill @eXX "Person Name"
agent-browser wait 1000
agent-browser snapshot -i
agent-browser click @eXX  # person result
agent-browser wait --load networkidle
agent-browser snapshot -i
agent-browser click @eXX  # compose box
agent-browser type @eXX "Your DM"
agent-browser press "Enter"

Search

agent-browser press "Meta+g"  # Slack search
agent-browser wait 500
agent-browser snapshot -i
agent-browser fill @eXX "search query"
agent-browser press "Enter"
agent-browser wait --load networkidle
agent-browser snapshot -c

React with Emoji

agent-browser snapshot -c
agent-browser hover @eXX  # hover over message
agent-browser snapshot -i
agent-browser click @eXX  # emoji/reaction button (smiley icon)
agent-browser wait 500
agent-browser snapshot -i
agent-browser fill @eXX "thumbsup"  # emoji search
agent-browser wait 500
agent-browser snapshot -i
agent-browser click @eXX  # emoji result

Check Notifications

# Click "Activity" in sidebar or navigate:
agent-browser snapshot -i -c
agent-browser click @eXX  # Activity link
agent-browser wait --load networkidle
agent-browser snapshot -c

Check Unreads

agent-browser snapshot -i -c
# Look for bold channel names or "Unreads" section
agent-browser click @eXX  # Unreads link
agent-browser wait --load networkidle
agent-browser snapshot -c

Critical Rules

  1. ALWAYS re-snapshot after every action — refs invalidate constantly
  2. Use --headed mode so user can see and intervene
  3. Set viewport 1920x1080 — Slack hides features at small widths
  4. Use Meta+k (quick switcher) as primary navigation
  5. Use type not fill for compose boxes (contenteditable)
  6. Wait after actions: agent-browser wait --load networkidle
  7. Save auth state often: agent-browser state save ~/.slack-auth-state.json

Semantic Locator Fallbacks

When refs don't match:

agent-browser find text "general" click
agent-browser find role textbox fill "Hello"
agent-browser find placeholder "Message #general" type "Hello"
agent-browser find role button click --name "Send"

Debugging

agent-browser screenshot /tmp/slack-debug.png
agent-browser get url
agent-browser snapshot  # full unfiltered tree

Deep-Dive References

ReferenceWhen to Use
references/workflows.mdFull workflow examples

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.