Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Slack

БесплатноБез исполняемых скриптовНе проверен

Slack API托管OAuth,发消息/管频道/搜会话(社区下载版)。Slack API integration with managed OAuth。Send messages, manage channels,。触发关键词: oauth, api, managed, integration, slack。

thcjpот thcjp804 установки в других каталогах

Об этом скилле

Access the Slack API with managed OAuth authentication. Send messages, manage channels, list users, and automate Slack workflows.

Quick Start

详细内容已移至 references/detail.md

Base URL

https://api.maton.ai/slack/{method}

Maton proxies requests to slack.com and automatically injects your OAuth token.

Installation

NPM:

npm install -g @maton/cli

Homebrew:

brew install maton-ai/cli/maton

Authentication

详细内容已移至 references/detail.md

Connection Management

Manage your Slack OAuth connections at https://api.maton.ai.

List Connections

详细内容已移至 references/detail.md

Create Connection

详细内容已移至 references/detail.md

Get Connection

详细内容已移至 references/detail.md

Delete Connection

详细内容已移至 references/detail.md

Specifying Connection

详细内容已移至 references/detail.md

Security & Permissions

  • Access is scoped to messages, channels, users, files, and reactions within the connected Slack account.
  • All write operations require explicit user approval. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.

API Reference

Authentication

Auth Test

GET /slack/api/auth.test

Returns current user and team info.

Example:

maton slack whoami

详细内容已移至 references/detail.md - ### Messages 详细内容已移至 references/detail.md - ### Conversations (Channels) 详细内容已移至 references/detail.md - ### Direct Messages

Users

详细内容已移至 references/detail.md

Stars

详细内容已移至 references/detail.md

Pins

详细内容已移至 references/detail.md

Bots

Get Bot Info

GET /slack/api/bots.info?bot=B0123456789

Example:

maton slack bot view B0123456789

Note: this expects the B-prefixed bot ID (from bot_id on a message), not the bot's U-prefixed user ID. Passing a U… ID returns bot_not_found.

Search

Search Messages

GET /slack/api/search.messages?query=keyword

Example:

maton slack search messages 'keyword'

Search Files

GET /slack/api/search.files?query=keyword

Note: search.files matches against filename and title, not file body content. Newly uploaded files may take a moment to appear in results due to indexing lag.

详细功能列表与边界条件

为了提升功能完整性,以下是对Slack API功能的详细列表,包括边界条件处理。

功能列表:

  • 发送消息:支持发送文本、图片、文件等类型消息,支持@提及用户和频道。
  • 管理频道:支持创建、删除、重命名频道,设置频道权限。
  • 搜索会话:支持按关键字搜索聊天记录,支持时间范围过滤。
  • 列出用户:支持列出当前Slack账户下的所有用户。
  • 星标消息:支持添加、删除星标消息。
  • 锚定消息:支持创建、更新、删除消息锚点。
  • 添加反应:支持添加表情反应到消息。
  • 获取机器人信息:支持获取机器人的详细信息。
  • 搜索消息:支持按关键字搜索消息。
  • 搜索文件:支持按关键字搜索文件。

边界条件处理:

  • 频道ID错误时,返回错误信息。
  • 用户不存在时,返回错误信息。
  • 文件不存在时,返回错误信息。
  • 消息已删除时,返回错误信息。
  • 无权限操作时,返回错误信息。

输入输出参数说明

以下是对Slack API输入输出参数的详细说明,包括默认值、类型和取值范围。

输入参数:

  • channel: 频道ID,类型为字符串,必填。
  • text: 消息内容,类型为字符串,必填。
  • file: 文件对象,类型为二进制数据,可选。
  • ts: 消息时间戳,类型为字符串,可选。
  • emoji: 表情,类型为字符串,可选。

输出参数:

  • ok: 操作是否成功,类型为布尔值。
  • error: 错误信息,类型为字符串。
  • data: 返回的数据,类型为对象数组。

默认值:

  • 无默认值,所有参数均为必填项。

错误码定义与处理方案

以下是对Slack API错误码的定义和处理方案。

错误码:

  • invalid_api_key: 无效的API密钥。
  • missing_scope: 缺少必要的权限。
  • invalid_request: 无效的请求。
  • not_found: 资源未找到。
  • rate_limit_exceeded: 超出请求频率限制。

处理方案:

  • invalid_api_key: 检查API密钥是否正确。
  • missing_scope: 联系Maton Support请求增加权限。
  • invalid_request: 检查请求参数是否正确。
  • not_found: 检查资源是否存在。
  • rate_limit_exceeded: 等待一段时间后重试。

示例

CLI

maton slack message send --channel C0123456789 --text 'Hello team'

maton slack channel list --types public_channel,private_channel

maton slack user lookup --email [email protected]

maton slack reaction add --channel C012 --ts 1700000000.000100 --emoji thumbsup

JavaScript

const response = await fetch('https://api.maton.ai/slack/api/chat.postMessage', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${process.env.MATON_API_KEY}`
  },
  body: JSON.stringify({ channel: 'C0123456', text: 'Hello!' })
});
const result = await response.json();
console.log(result);

Python

import os
import requests

response = requests.post(
    'https://api.maton.ai/slack/api/chat.postMessage',
    headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
    json={'channel': 'C0123456', 'text': 'Hello!'}
)
print(response.json())

Notes

  • Channel IDs: C (public), G (private/group), D (DM)
  • User IDs start with U, Bot IDs start with B, Team IDs start with T
  • Message timestamps (ts) are unique identifiers
  • Use mrkdwn type for Slack-flavored markdown formatting
  • Thread replies use thread_ts to reference the parent message
  • Cursor-based pagination: use cursor from response_metadata.next_cursor

Shell N

Полный SKILL.md на ClawHub

Установить Slack в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

read

FAQ

Что делает скилл Slack?

Slack API托管OAuth,发消息/管频道/搜会话(社区下载版)。Slack API integration with managed OAuth。Send messages, manage channels,。触发关键词: oauth, api, managed, integration, slack。

Как установить скилл Slack?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Slack запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Slack с