slack-api-1-basic-slack-bot-with-bolt
Sub-skill of slack-api: 1. Basic Slack Bot with Bolt.
Best use case
slack-api-1-basic-slack-bot-with-bolt is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of slack-api: 1. Basic Slack Bot with Bolt.
Teams using slack-api-1-basic-slack-bot-with-bolt should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/1-basic-slack-bot-with-bolt/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How slack-api-1-basic-slack-bot-with-bolt Compares
| Feature / Agent | slack-api-1-basic-slack-bot-with-bolt | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of slack-api: 1. Basic Slack Bot with Bolt.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 1. Basic Slack Bot with Bolt
## 1. Basic Slack Bot with Bolt
```python
# app.py
# ABOUTME: Basic Slack bot using Bolt framework
# ABOUTME: Handles messages, mentions, and slash commands
import os
from dotenv import load_dotenv
from slack_bolt import App
from slack_bolt.adapter.socket_mode import SocketModeHandler
load_dotenv()
# Initialize app with bot token and signing secret
app = App(
token=os.environ.get("SLACK_BOT_TOKEN"),
signing_secret=os.environ.get("SLACK_SIGNING_SECRET")
)
# Listen for messages containing "hello"
@app.message("hello")
def message_hello(message, say):
"""Respond to messages containing 'hello'"""
user = message['user']
say(f"Hey there <@{user}>!")
# Listen for app mentions
@app.event("app_mention")
def handle_app_mention(event, say, client):
"""Respond when bot is mentioned"""
user = event['user']
channel = event['channel']
text = event['text']
# Get user info
user_info = client.users_info(user=user)
user_name = user_info['user']['real_name']
say(f"Hi {user_name}! You mentioned me with: {text}")
# Handle message events
@app.event("message")
def handle_message_events(body, logger):
"""Log all message events"""
logger.info(f"Message event: {body}")
# Slash command handler
@app.command("/greet")
def handle_greet_command(ack, say, command):
"""Handle /greet slash command"""
ack() # Acknowledge command within 3 seconds
user = command['user_id']
text = command.get('text', 'everyone')
say(f"<@{user}> sends greetings to {text}!")
# Error handler
@app.error
def custom_error_handler(error, body, logger):
"""Handle errors gracefully"""
logger.exception(f"Error: {error}")
logger.info(f"Request body: {body}")
# Run with Socket Mode (no public URL needed)
if __name__ == "__main__":
handler = SocketModeHandler(
app,
os.environ.get("SLACK_APP_TOKEN")
)
print("Bot is running...")
handler.start()
```Related Skills
slack-gif-creator
Create custom animated GIFs for Slack reactions and celebrations. Use for team milestones, custom emoji reactions, inside jokes, and workplace fun.
mkdocs-basic-code-block
Sub-skill of mkdocs: Basic Code Block.
web-artifacts-builder-basic-template
Sub-skill of web-artifacts-builder: Basic Template.
usage-tracker-1-basic-usage-logging
Sub-skill of usage-tracker: 1. Basic Usage Logging (+1).
parallel-batch-executor-1-basic-parallel-execution-with-xargs
Parallel batch processing with xargs. Use when running commands concurrently over a list of items with controlled parallelism.
interactive-menu-builder-1-basic-menu-structure
Sub-skill of interactive-menu-builder: 1. Basic Menu Structure.
docker-1-basic-dockerfile-patterns
Sub-skill of docker: 1. Basic Dockerfile Patterns.
windmill-integration-with-database-and-slack
Sub-skill of windmill: Integration with Database and Slack.
n8n-integration-with-slack-google-sheets-and-email
Sub-skill of n8n: Integration with Slack, Google Sheets, and Email.
github-actions-integration-with-slack-notifications
Sub-skill of github-actions: Integration with Slack Notifications (+1).
github-actions-1-basic-workflow-structure
Sub-skill of github-actions: 1. Basic Workflow Structure.
airflow-1-basic-dag-structure
Sub-skill of airflow: 1. Basic DAG Structure.