
slack-cli
Use when a developer works with the Slack CLI (slack command) to create, run, or manage a Slack app from the terminal: logging in or authenticating (slack login), adding a team or switching workspaces, running locally (slack run), deploying, editing the app manifest, calling Web API methods (slack api), or searching Slack docs (slack docs search).
- Installs
- 482
- Last 24h
- +13
- Trending rank
- #7698
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/slackapi/slack-skills-plugin --skill slack-cli- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads slack-cli automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Slack CLI
Use the Slack CLI to create, run, and manage Slack apps — including calling Web API methods directly and searching Slack developer documentation from the terminal.
For initial setup (sandbox creation, project scaffolding from templates), use the slack:create-slack-app skill instead.
Step 1: Detect the Slack CLI
Resolve the path to the public Slack CLI before running any other command. We refer to the resolved value as SLACK_CMD — substitute it everywhere below. Try 1a → 1b → 1c in order; do not skip ahead.
1a. Standard install path (preferred — no verification needed)
The official install scripts place the binary at a fixed per-user path. If the file exists, use it directly: only the install script writes to that path.
- macOS / Linux:
~/.slack/bin/slack - Windows:
%USERPROFILE%\AppData\Local\slack-cli\bin\slack.exe(or%USERPROFILE%\.slack-cli\bin\slack.exeas a fallback)
POSIX shell:
[ -x "$HOME/.slack/bin/slack" ] && echo "$HOME/.slack/bin/slack"
PowerShell:
$p = "$env:USERPROFILE\AppData\Local\slack-cli\bin\slack.exe"
if (Test-Path $p) { $p } elseif (Test-Path "$env:USERPROFILE\.slack-cli\bin\slack.exe") { "$env:USERPROFILE\.slack-cli\bin\slack.exe" }
If a path is returned, set SLACK_CMD to that absolute path and proceed to Step 2. Do not also run _fingerprint.
1b. slack on PATH (verify with fingerprint)
If 1a found nothing, try slack on PATH:
slack _fingerprint 2>/dev/null
If it outputs d41d8cd98f00b204e9800998ecf8427e, set SLACK_CMD=slack and proceed.
1c. Ask about an alias, or install
If 1b fails or returns a different value, ask the developer using AskUserQuestion:
-
"The
slackcommand on your system doesn't appear to be the public Slack CLI. Do you have it installed under a different name or alias?" -
Options: "Yes, it's aliased as..." (let them provide the alias), "No, I need to install it"
-
If they provide an alias, verify it with
<alias> _fingerprint 2>/dev/nulland setSLACK_CMD=<alias>. -
If they need to install it, run:
curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bashThen re-run 1a — the install script will have written
~/.slack/bin/slack.
Common mistakes: Don't use which slack to discover the binary — which resolves any shell alias and defeats the point of 1a. In Git Bash on Windows, use the POSIX probe form, not PowerShell.
Step 2: Command Discovery via Help
Always run SLACK_CMD <command> --help before constructing a command you have not used in the current session. Do not guess at flags — the help output is the source of truth.
SLACK_CMD help— lists all available command groupsSLACK_CMD <command> --help— shows subcommands, flags, and usage examples
Resolving --app and --team values
When a command requires --app or --team:
- App ID: Run
SLACK_CMD app listfrom the project directory to see installed apps and their IDs. - Team ID: Run
SLACK_CMD auth listto see authenticated workspaces and their team IDs.
Step 3: Searching Documentation (slack docs search)
Search Slack's developer documentation directly from the terminal.
SLACK_CMD docs search "<query>" --output=text --limit=5
Use --output=text for concise terminal-readable results. Use this when you are already running CLI commands and want to:
- Check a Slack feature before implementing it
- Verify API behavior or required scopes
- Look up Block Kit elements, event types, or method parameters
Step 4: Calling Web API Methods (slack api)
Call any Slack Web API method directly. Run SLACK_CMD api --help for full details and examples.
Parameters are passed as positional key=value pairs (NOT --key=value flags):
SLACK_CMD api chat.postMessage channel=C0123456789 text="Hello from the CLI"
Important distinction: --team, --token, --json, and --data are meta-flags (prefixed with --). API method parameters use positional key=value syntax without dashes.
Reference: Full method list at https://docs.slack.dev/reference/methods.md.
Step 5: Authentication (slack auth)
When to run this flow
Slack auth is per-team, not a single boolean. Run the seamless login flow below whenever any of these is true:
- The developer is not authenticated to any team yet.
- The developer wants to add a new team / workspace / sandbox, even if
SLACK_CMD auth listalready shows other teams. - The developer asks to log in, switch teams, or re-authenticate.
SLACK_CMD auth list showing other teams is not a reason to skip login — those are different teams. Ask the developer which team they want, then run the flow.
The flow below is the same for every kind of workspace. /slackauthticket works in any workspace the developer belongs to, whether that is a developer sandbox, a Free Team, or a production workspace, so there is no sandbox-specific login. Which target to prefer is the slack:create-slack-app skill's call (Step 3: Choose Where to Install the App).
Inspect existing auth (optional)
SLACK_CMD auth list
Use this to show the developer which teams are already authenticated, or to confirm a successful login. Do not treat a non-empty list as "auth complete" when the developer asked to log in to a new team.
Run the seamless login flow
The agent drives this end-to-end — no separate terminal window, no browser confirmation.
SLACK_CMD login --no-prompt makes the CLI emit a single-use ticket and exit immediately instead of waiting on stdin. Slack itself renders the challenge code inside a workspace modal when the developer sends the /slackauthticket slash command — there is no browser step. The agent submits the challenge back to the CLI to complete login.
1. Start login and capture the ticket
SLACK_CMD login --no-prompt
The CLI prints a /slackauthticket <ticket> slash command and exits. Capture the ticket — you will need it in step 4. Sample output:
📋 Run the following slash command from any Slack channel in the workspace
you'd like to authenticate
/slackauthticket eyJ0eXAiOiJKV1QiLCJh…
? Slack will then show you a challenge code. Submit it via:
slack login --ticket <ticket> --challenge <code>
2. Hand the slash command to the developer
Show the full /slackauthticket … line and ask the developer to paste it into the message box of the Slack workspace they want to authenticate, then send it. Slack responds with a modal containing a short challenge code (e.g. JDt1IK7X).
3. Collect the challenge code
Use AskUserQuestion to ask the developer for the challenge code shown in the Slack modal. Wait for their answer — do not guess or default.
4. Complete login
SLACK_CMD login --ticket <ticket> --challenge <code>
On success the CLI returns the team name and ID. Verify with SLACK_CMD auth list and report the team back to the developer.
Troubleshooting: tickets are single-use and time-limited. If step 4 fails with an invalid/expired ticket or wrong challenge, restart from step 1 with a fresh SLACK_CMD login --no-prompt — do not retry the same ticket.
Use --team <team_id> on individual commands to target a specific workspace without switching globally.
Red flags — STOP
If you catch yourself thinking any of these, you are about to regress to the old broken flow:
| Rationalization | Reality |
|---|---|
"auth list already shows teams, so login isn't needed." | Auth is per-team. The developer asked for a new team — drive the flow. |
"slack login needs browser confirmation, so I can't drive it." | False with --no-prompt. The challenge code appears in Slack's modal, not a browser. The agent runs both slack login invocations itself. |
"I should tell the developer to run slack login in a separate terminal." | Never. Step 5 is the agent's job from start to finish. |
All of these mean: run SLACK_CMD login --no-prompt yourself and follow the four numbered steps above.
Step 6: Running an App Locally (slack run)
Run SLACK_CMD run --help for all available flags.
Resolve the app or team target
Run SLACK_CMD app list from the project directory to check for installed apps:
- If an app exists: Use
--app=<app_id>in the run command. - If no apps are listed: Use
--team=<team_id>instead (get the team ID fromSLACK_CMD auth list).
Start the dev server in the background
Run this command as a background process so the developer can continue working:
If an app ID was found:
cd <project-dir> && SLACK_CMD run --org-workspace-grant=all --app=<app_id>
If no apps — use the team ID:
cd <project-dir> && SLACK_CMD run --org-workspace-grant=all --team=<team_id>
Tell the developer the app is running in the background. They can ask:
- "What's the status of the dev server?" — to check on it
- "Show me the output from slack run" — to see activity logs
- "Stop the dev server" — to terminate the process
Step 7: Managing the Manifest
Run SLACK_CMD manifest --help for subcommands (validate, info) and the --source local|remote flag.
Use SLACK_CMD manifest validate before deploying or when something seems wrong with the app configuration.
Step 8: Other Commands
For any other command group (e.g., trigger, datastore, env, collaborator, external-auth, deploy), run SLACK_CMD <command> --help to discover subcommands and flags. Run SLACK_CMD help to see all available command groups.
Notes
SLACK_CMDis a placeholder — always substitute the actual command name resolved in Step 1.- Always run
--helpbefore constructing a command you have not used in the current session. - Interactive commands (e.g.,
slack trigger createwithout--trigger-def) cannot be run in the background. Tell the developer to run these in a new terminal window.slack loginis not in this category — drive it inline using the--no-prompt/--ticket/--challengeflow in Step 5. slack runruns locally for development.slack deploydeploys to Slack's hosted infrastructure, unless.slack/hooks.jsondefines adeployhook, in which case it runs that hook instead (see theslack:deploy-slack-appskill). These are different operations, so do not confuse them.
FAQ
What does the slack-cli skill do?
Use when a developer works with the Slack CLI (slack command) to create, run, or manage a Slack app from the terminal: logging in or authenticating (slack login), adding a team or switching workspaces, running locally (slack run), deploying, editing the app manifest, calling Web API methods (slack api), or searching Slack docs (slack docs search).
How do I install slack-cli?
Run npx skills add https://github.com/slackapi/slack-skills-plugin --skill slack-cli in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/slack-cli/ (personal) or .claude/skills/slack-cli/ (project).
Which AI agents can use slack-cli?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is slack-cli safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains slack-cli?
It is published by slackapi in slackapi/slack-skills-plugin. It has 482 recorded installs.
More from slackapi/slack-skills-plugin
slack-api
slackapi/slack-skills-plugin
Use when a developer asks which Slack Web API method does something, needs a method's OAuth scopes or token type, wants to call or test a family.method endpoint (chat.postMessage, conversations.history, users.info, views.open), is handling cursor pagination (nextcursor) or rate limits (tier/ratelimited/Retry-After), or is debugging errors like missingscope, invalidauth, or channelnotfound. Also trigger on a pasted slack.com/api/ URL or docs.slack.dev/reference/methods link.
slack-messaging
slackapi/slack-skills-plugin
Use when writing, drafting, scheduling, or improving a Slack message, announcement, or reply sent via the Slack MCP tools (slacksendmessage, slacksendmessagedraft, slackschedulemessage). Covers Slack markdown formatting, message structure, thread etiquette, reactions, and scheduling, and points to the right dialect for canvases and Block Kit.
slack-docs
slackapi/slack-skills-plugin
Use when answering a conceptual or how-to question about Slack platform features, or when asked to look up, fetch, or summarize a docs.slack.dev page, including a pasted docs.slack.dev link. Covers finding and reading official Slack docs as clean markdown.
slack-search
slackapi/slack-skills-plugin
Use when locating messages, files, channels, or people across Slack, or gathering context before answering, with the search MCP tools (slacksearchpublic, slacksearchpublicandprivate, slacksearchchannels, slacksearchusers). Covers search modifiers (in:, from:, before:), file-type filters, natural-language vs. keyword search, and reading results in context.
block-kit
slackapi/slack-skills-plugin
Use when a developer wants to build or validate Block Kit layouts for Slack messages, modals, or Home tabs: message layouts, modals/forms/dialogs, Home tab interfaces, interactive buttons or menus, or modifying existing Block Kit JSON. Also trigger on any Slack UI component (sections, actions, inputs, headers, alerts, tables, carousels), the words "blocks" or "Block Kit Builder", a request to preview rendered blocks, or pasted JSON like "type": "section". Validates via the blocks.validate API method.
create-slack-app
slackapi/slack-skills-plugin
Open the skill to read its SKILL.md instructions.
Popular productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。