slack-api-2-block-kit-messages
БесплатноБез исполняемых скриптовНе проверенSub-skill of slack-api: 2. Block Kit Messages.
от vamseeachanta★ 21 звезда на GitHubОб этом скилле
2. Block Kit Messages
2. Block Kit Messages
# blocks.py
# ABOUTME: Block Kit message construction utilities
# ABOUTME: Creates rich, interactive Slack messages
from slack_bolt import App
import os
app = App(token=os.environ.get("SLACK_BOT_TOKEN"))
def create_deployment_message(
environment: str,
version: str,
status: str,
deploy_url: str,
logs_url: str
) -> list:
"""Create a deployment notification with Block Kit"""
status_emoji = {
"success": ":white_check_mark:",
"failure": ":x:",
"in_progress": ":hourglass_flowing_sand:",
"pending": ":clock3:"
}
emoji = status_emoji.get(status, ":question:")
blocks = [
{
"type": "header",
"text": {
"type": "plain_text",
"text": f"{emoji} Deployment {status.title()}",
"emoji": True
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": f"*Environment:*\n{environment}"
},
{
"type": "mrkdwn",
"text": f"*Version:*\n{version}"
},
{
"type": "mrkdwn",
"text": f"*Status:*\n{status.title()}"
},
{
"type": "mrkdwn",
"text": f"*Time:*\n<!date^{int(time.time())}^{{date_short}} at {{time}}|now>"
}
]
},
{
"type": "divider"
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "View Deployment",
"emoji": True
},
"url": deploy_url,
"style": "primary"
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "View Logs",
"emoji": True
},
"url": logs_url
}
]
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Deployed by CI/CD Pipeline"
}
]
}
]
return blocks
def create_approval_message(
request_id: str,
requester: str,
description: str,
details: dict
) -> list:
"""Create an approval request with interactive buttons"""
blocks = [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":clipboard: Approval Request",
"emoji": True
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": f"*Request ID:* `{request_id}`\n*Requested by:* <@{requester}>\n\n{description}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Details:*\n" + "\n".join(
f"- {k}: {v}" for k, v in details.items()
)
}
},
{
"type": "divider"
},
{
"type": "actions",
"block_id": f"approval_{request_id}",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Approve",
"emoji": True
},
"style": "primary",
"action_id": "approve_request",
"value": request_id
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Reject",
"emoji": True
},
"style": "danger",
"action_id": "reject_request",
"value": request_id
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Request Info",
"emoji": True
},
"action_id": "request_info",
"value": request_id
}
]
}
]
return blocks
def create_poll_message(question: str, options: list) -> list:
"""Create a poll with radio buttons"""
option_elements = [
{
"text":
Установить slack-api-2-block-kit-messages в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл slack-api-2-block-kit-messages?
Sub-skill of slack-api: 2. Block Kit Messages.
Как установить скилл slack-api-2-block-kit-messages?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл slack-api-2-block-kit-messages запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic