agentleFS
jaskirat1616jaskirat1616/grok-skills/skills/comms-slack/SKILL.md

comms-slack

Skill22 starsChanged 2 months agoMITView on GitHub

Search Slack messages, people, channels, DMs, and threads using John's personal token. Use for Slack permalinks or requests to find a conversation, colleague, message, channel, or thread.

  • Reads credentials

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 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.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Search Slack workspace content using your personal user token (xoxp-...).

    line 7
  2. Very specific:

    Add your Slack User Token as SLACK_USER_TOKEN through the active harness's environment or secret-management mechanism:

    line 11
  3. Very specific:

    All commands accept --json for structured output (useful when piping to jq).

    line 26
  4. Very specific:

    missing_scope: add the missing scope in your Slack App's OAuth settings, then reinstall the app.

    line 99

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

comms-slack

Search Slack workspace content using your personal user token (xoxp-...).

Setup

Add your Slack User Token as SLACK_USER_TOKEN through the active harness's environment or secret-management mechanism:

{
  "env": {
    "SLACK_USER_TOKEN": "xoxp-...",
    "SLACK_USER_ID": "U..."
  }
}

The skill also falls back to a .env in the current working directory if present.

Commands

All commands accept --json for structured output (useful when piping to jq).

Search messages

uv run python slack_search.py search "keyword"

# Filters
uv run python slack_search.py search "deploy" --channel engineering --from sam --limit 10

# Slack search modifiers also work inside the query
uv run python slack_search.py search "bug after:2026-01-01 has:link"

Fetch a thread

Paste any Slack permalink, or pass <channel-id>:<ts>:

uv run python slack_search.py thread https://your-team.slack.com/archives/C0123456/p1700000000000001
uv run python slack_search.py thread C0123456:1700000000.000001 --json

Returns the parent message + all replies, with <@U…> mentions resolved to @username. Each message also includes a files array with metadata for any attached images / videos / docs.

Download attachments

search and thread both accept --download [DIR]. When set, file attachments on each message are downloaded and the local path is added to the files entry as local_path. Omit DIR to use ~/.cache/slack-search/files/<scope>/.

# default cache dir
uv run python slack_search.py thread C0123456:1700000000.000001 --download --json

# explicit dir
uv run python slack_search.py thread <permalink> --download /tmp/slack-files

Requires the files:read scope on the user token; without it Slack returns the workspace login HTML and the downloader prints a clear error.

List channels / users / profile (lookup helpers for filters)

uv run python slack_search.py channels   # public + private the user is in
uv run python slack_search.py users      # active workspace members
uv run python slack_search.py me         # your profile (auth check)

Search modifiers

Slack's native modifiers work inside the query string:

  • in:channel — restrict to channel
  • from:user — restrict to author
  • before:YYYY-MM-DD, after:YYYY-MM-DD
  • has:link, has:reaction

--channel / --from are sugar for in: / from:.

Required scopes

Personal user token (xoxp-…) needs:

  • search:read
  • channels:read, groups:read
  • users:read
  • channels:history, groups:history (for thread)
  • files:read (only required for --download; without it, Slack bounces file URLs to the workspace login page)

Troubleshooting

  • missing_scope: add the missing scope in your Slack App's OAuth settings, then reinstall the app.
  • invalid_auth: token expired — regenerate at https://api.slack.com/apps.
  • Token not picked up: confirm with printenv SLACK_USER_TOKEN. If empty, reload the active harness after updating its environment.

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.

Reviews can't be read right now.

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.