/slackcli:slackcli [what to do in Slack]from slackcli
Read, send, search, and manage Slack workspaces via the slackcli binary. Installs slackcli if missing and handles authentication.
Ships in slackcli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Three phases, always in this order. Phases 1 and 2 are checks; only do their
setup work when the check fails. $ARGUMENTS, if set, is the request for phase 3.
command -v slackcli && slackcli --version
Passes: go to phase 2. Fails: first check ls ~/.local/bin/slackcli (installed
but off PATH; fix PATH, do not reinstall). Otherwise ask the user with
AskUserQuestion before installing. Never sudo, never system directories.
brew exists): brew tap shaharia-lab/tap && brew install slackcli~/.local/bin: asset from uname -sm: Linux x86_64
slackcli-linux, Linux arm64 slackcli-linux-arm64, Darwin x86_64
slackcli-macos, Darwin arm64 slackcli-macos-arm64.
A=slackcli-linux; B=https://github.com/shaharia-lab/slackcli/releases/latest/download; T=$(mktemp -d)
curl -fsSL "$B/$A" -o "$T/$A" && curl -fsSL "$B/checksums.txt" -o "$T/checksums.txt"
(cd "$T" && grep " $A\$" checksums.txt | sha256sum -c -) # macOS: shasum -a 256 -c
chmod +x "$T/$A" && mkdir -p ~/.local/bin && mv "$T/$A" ~/.local/bin/slackcli
Checksum mismatch: stop, do not install. Tell the user if ~/.local/bin is not on PATH.slackcli-windows.exe).Confirm with slackcli --version.
slackcli auth list # always exits 0
No authenticated workspaces found.: if SLACKCLI_TOKEN or
SLACK_BOT_TOKEN is set, commands use that token with nothing stored; check
it with slackcli auth whoami --json (source env_token). Otherwise
propose authentication (below).(default), each with ID and auth type):
verify the token with slackcli team info --json (add --workspace=<id|name>
if the user named one). On exit 1 the last stderr line is
{"error":{"code":…,"hint":…}}: code auth_failed means stale credentials:
for a Browser profile try slackcli auth login-auto --headless first, else
propose authentication (hint has the command). unknown command, or a last
line that is not JSON, means the binary predates team info or JSON errors:
probe with slackcli conversations list --limit=1 instead and, once
authenticated, offer slackcli update (Homebrew: brew upgrade slackcli),
since the reference in phase 3 describes the latest release. Other codes are
not auth problems; report and continue.Propose authentication with AskUserQuestion; never authenticate unasked.
Credentials are stored locally in ~/.config/slackcli/.
slackcli auth login-auto --timeout=300 with a Bash timeout
above 300 s. A window opens; the user signs in (SSO/2FA included) to every
workspace they want. All of them are enrolled. No browser found: set
SLACKCLI_BROWSER=/path/to/chrome or pick another option.xoxb-/xoxp-): the user runs it themselves so the
token never enters the chat:
! slackcli auth login --token=xoxb-… --workspace-name="Team".
Bot tokens cannot search messages.! slackcli auth parse-curl --from-clipboard --login.Verify with slackcli auth list and slackcli team info.
Read references/commands.md before choosing commands.
slackcli <group> <cmd> --help is authoritative for the installed version.
--json whenever you process output (stdout is JSON only; rest is stderr).--fields with only the fields you
need (--json --fields ts,user,text; dot paths like profile.email), and a
tight --limit. Full Slack objects are often several times larger. Counts and cursors are
always kept; a misspelt field is silently absent, so check --help shapes.--recipient-id="#general", @alice or
[email protected] work wherever an ID does (quote the #). Exact match
only; not_found / invalid_input (ambiguous, lists IDs) mean search
(search channels, search people) and use the ID. Reuse the channel_id
from --json output. Pasted Slack URLs also work; --permalink targets one
message or its thread.usergroups write. Show target and text, get a yes, then run. Add
--yes to usergroups writes only after that confirmation.--dry-run --json
first: it resolves and validates everything, writes nothing, never prompts,
and returns {dry_run, action, workspace, target, payload}. Show that to the
user, then drop --dry-run to run it. A dry run cannot check Slack
permissions, so the real write can still be refused.messages send --json returns channel_id, ts, usually
permalink. Use them for edit/react/reply and give the permalink to the user.$: pipe it, never quote it into
--message. printf '%s' "$TEXT" | slackcli messages send --recipient-id=C… --message-file -,
or a heredoc with a quoted delimiter (--message-file - <<'MSG'). Works on
send, edit and draft; no temp file needed. Slack mrkdwn only (no #
headings, no [text](url)).--types/--limit instead of retrying.messages schedule|list-scheduled|delete-scheduled) is the
reverse: it needs an app-token profile.~/.config/slackcli/ or the browser profile.files info --json contains private download URLs; do not repeat them.auth logout / auth remove unless explicitly asked.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub shaharia-lab/slackcli --plugin slackcliOther plugins' skills for the same job