/slack-go-sdk:slack-web-apifrom slack-go-sdk
Comprehensive guidance for Slack Web API operations with the Go SDK. Use when sending messages, posting to channels, creating or managing channels, retrieving user information, uploading files, composing Block Kit messages, creating or editing Canvases, registering Calls, building an AI Assistant thread, or performing any synchronous Slack API operations.
Ships in slack-go-sdk. 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.
None: SKILL.md is the whole skill.
All Web API methods follow this pattern:
result, err := api.MethodName(params...)
if err != nil {
// Handle error (rate limits, permissions, etc.)
return err
}
// Use result
channelID := "C1234567890"
text := "Hello, Slack!"
_, _, err := api.PostMessage(
channelID,
slack.MsgOptionText(text, false),
)
headerText := slack.NewTextBlockObject("mrkdwn", "*Deployment Complete*", false, false)
headerBlock := slack.NewSectionBlock(headerText, nil, nil)
divider := slack.NewDividerBlock()
bodyText := slack.NewTextBlockObject("mrkdwn", "Version 2.1.0 deployed successfully", false, false)
bodyBlock := slack.NewSectionBlock(bodyText, nil, nil)
_, _, err := api.PostMessage(
channelID,
slack.MsgOptionBlocks(headerBlock, divider, bodyBlock),
)
See web-api-messaging.md for comprehensive messaging patterns including threading, updates, and ephemeral messages.
channelName := "project-updates"
isPrivate := false
channel, err := api.CreateConversation(channelName, isPrivate)
if err != nil {
return err
}
fmt.Printf("Created channel: %s (ID: %s)\n", channel.Name, channel.ID)
params := &slack.GetConversationsParameters{
Types: []string{"public_channel"},
Limit: 100,
}
channels, nextCursor, err := api.GetConversations(params)
See web-api-channels.md for channel management, invites, and metadata operations.
user, err := api.GetUserInfo("U1234567890")
if err != nil {
return err
}
fmt.Printf("User: %s (%s)\n", user.Profile.RealName, user.Profile.Email)
users, err := api.GetUsers()
if err != nil {
return err
}
for _, user := range users {
fmt.Printf("- %s (%s)\n", user.Name, user.ID)
}
See web-api-users.md for user presence, profiles, and groups.
params := slack.FileUploadParameters{
File: "report.pdf",
Channels: []string{"C1234567890"},
Title: "Monthly Report",
}
file, err := api.UploadFile(params)
if err != nil {
return err
}
See web-api-files.md for file downloads, sharing, and multi-part uploads.
Block Kit allows rich, interactive messages. See block-kit-integration.md for:
canvasID, err := api.CreateCanvasContext(ctx, "Sprint Planning", slack.DocumentContent{
Type: "markdown",
Markdown: "# Sprint Planning\n\n## Goals",
})
See canvas-api.md for editing, access control, and section lookups.
call, err := api.AddCallContext(ctx, slack.AddCallParameters{
JoinURL: "https://calls.example.com/join/abc123",
ExternalUniqueID: "call-abc123",
CreatedBy: "U1234567890",
})
See calls-api.md for updating, ending, and managing participants.
err := api.SetAssistantThreadsStatusContext(ctx, slack.AssistantThreadsSetStatusParameters{
ChannelID: channelID,
ThreadTS: threadTS,
Status: "is thinking...",
})
See assistant-api.md for suggested prompts, thread titles, and context search. This is Slack's AI-assistant-app surface, not a general LLM API.
_, _, err := api.PostMessage(channelID, slack.MsgOptionText(text, false))
if err != nil {
if rateLimitErr, ok := err.(*slack.RateLimitedError); ok {
time.Sleep(rateLimitErr.RetryAfter)
// Retry operation
}
return err
}
slack.RateLimitedError - Too many requestschannel_not_found - Invalid channel IDinvalid_auth - Token issuesFor operations returning large result sets, use cursor-based pagination:
cursor := ""
for {
params := &slack.GetConversationsParameters{
Cursor: cursor,
Limit: 100,
}
channels, nextCursor, err := api.GetConversations(params)
if err != nil {
return err
}
// Process channels...
if nextCursor == "" {
break
}
cursor = nextCursor
}
See pagination-patterns.md for advanced pagination strategies.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub freightcognition/linehaulai-claude-marketplace --plugin slack-go-sdk5 skills in this plugin
/slack-admin-apiEnterprise Grid Admin API operations with the Slack Go SDK. Use when managing organization-wide conversations, assigning or listing admin roles, configuring team settings, restricting channel access, or building internal tooling for Slack workspace/org administrators./slack-auth-securityOAuth flows, token management, and security best practices for Slack apps. Use when implementing app distribution, multi-workspace installations, token storage and rotation, managing scopes and permissions, or securing production Slack applications./slack-client-fundamentalsFoundation skill for Slack Go SDK. Use when setting up a new Slack bot, initializing the API client, choosing between Web API vs Socket Mode vs Events API, implementing error handling patterns, or establishing testing strategies for Slack applications./slack-realtime-eventsReal-time event handling with Socket Mode and Events API. Use when building interactive Slack bots, handling message events, app mentions, reactions, button clicks, modal submissions, slash commands, or any event-driven Slack application functionality.