home / skills / yonatangross / orchestkit / slack-integration

slack-integration skill

/plugins/ork/skills/slack-integration

This skill integrates Slack notifications for PR lifecycle, reviews, and CI status, delivering timely alerts to channels via a bot token.

npx playbooks add skill yonatangross/orchestkit --skill slack-integration

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.0 KB
---
name: slack-integration
description: Slack MCP server integration patterns for team notifications. Covers PR lifecycle notifications, review alerts, and CI status updates via bot token.
context: fork
version: 1.0.0
author: OrchestKit
tags: [slack, notification, team, mcp, integration]
user-invocable: false
---

# Slack Integration

## Overview

Integrate Slack notifications into your Claude Code workflow using the Slack MCP server. Receive team notifications for PR lifecycle events, review completions, and CI status.

## Configuration

### Slack MCP Server Setup

Add to your MCP configuration:

```json
{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-slack"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-bot-token",
        "SLACK_CHANNEL": "#dev-notifications"
      }
    }
  }
}
```

### Required Bot Permissions

- `chat:write` - Post messages
- `channels:read` - List channels
- `reactions:write` - Add reactions

## PR Lifecycle Notifications

| Event | Message | When |
|-------|---------|------|
| PR Created | "PR #123 opened: Title" | After `create-pr` |
| Review Complete | "PR #123 reviewed: APPROVED" | After `review-pr` |
| PR Merged | "PR #123 merged to main" | After merge |
| CI Failed | "CI failed on PR #123" | On check failure |

## Integration with CC 2.1.20

CC 2.1.20's `/commit-push-pr` flow can auto-post to Slack:

1. Commit changes
2. Push branch
3. Create PR
4. Post Slack notification with PR link

## Usage Patterns

### Post-Review Notification

After completing a PR review:

```
mcp__slack__post_message({
  channel: "#dev-reviews",
  text: "PR #123 reviewed: APPROVED - 0 blockers, 2 suggestions"
})
```

### Post-Create Notification

After creating a PR:

```
mcp__slack__post_message({
  channel: "#dev-prs",
  text: "New PR: #123 - feat: Add user auth | 5 files, +200/-50"
})
```

## Related Skills

- `review-pr` - PR review with optional Slack notification
- `create-pr` - PR creation with optional Slack notification
- `release-management` - Release announcements

Overview

This skill adds Slack MCP server integration patterns to send team notifications for PR lifecycle events, review alerts, and CI status updates. It uses a Slack bot token and channel configuration to post messages from MCP workflows, enabling immediate visibility into code and CI activity. The patterns are production-ready and designed for TypeScript-based Claude Code workflows.

How this skill works

The skill configures an MCP Slack server that runs the official MCP Slack command and reads SLACK_BOT_TOKEN and SLACK_CHANNEL from environment variables. It exposes lightweight actions to post messages (e.g., mcp__slack__post_message) which are invoked after lifecycle hooks like create-pr, review-pr, merge, and CI checks. Messages can include PR links, status, review outcomes, and CI failure alerts.

When to use it

  • Notify the team when a pull request is created to speed up review handoffs.
  • Publish review completion messages to signal approval or requested changes.
  • Report CI failures immediately so engineers can triage broken builds.
  • Announce merges to main for release visibility and post-merge checks.
  • Integrate with commit-push-pr flows to auto-post PR links and summaries.

Best practices

  • Scope each message to a single purpose: PR created, review result, CI status, or merge.
  • Use a dedicated bot token with only required permissions: chat:write, channels:read, reactions:write.
  • Post concise summaries with links and short metrics (files changed, additions/deletions).
  • Send review details to a review-specific channel and CI alerts to a CI or ops channel.
  • Throttle or batch noisy CI notifications to avoid alert fatigue in high-volume repos.

Example use cases

  • Auto-post new PR summaries to #dev-prs when a branch is pushed and a PR is created.
  • Send an approval message to #dev-reviews after a reviewer finishes a review with the decision and blocker count.
  • Notify a team channel when CI fails on a PR including the failing job and link to logs.
  • Announce successful merges to #releases with the PR number and changelog snippet.
  • Embed Slack notifications into automated release or deployment flows for stakeholder awareness.

FAQ

What permissions does the Slack bot need?

Grant chat:write to post messages, channels:read to resolve channels, and reactions:write if you add reactions.

How do I configure the MCP Slack server?

Provide SLACK_BOT_TOKEN and SLACK_CHANNEL in the MCP server env and register an MCP server entry that runs the MCP Slack command.