Loading...
Loading...
Use when user needs Slack app development, @slack/bolt implementation, Block Kit UI design, event handling, OAuth flows, or Slack API integrations for bots and interactive components.
npx skill4agent add 404kidwiz/claude-supercode-skills slack-expertimport { App } from '@slack/bolt';
const app = new App({
token: process.env.SLACK_BOT_TOKEN,
signingSecret: process.env.SLACK_SIGNING_SECRET,
socketMode: true,
appToken: process.env.SLACK_APP_TOKEN,
});
app.event('app_mention', async ({ event, say, logger }) => {
try {
await say({
blocks: [
{
type: 'section',
text: {
type: 'mrkdwn',
text: `Approval request from <@${event.user}>`,
},
},
{
type: 'actions',
elements: [
{
type: 'button',
text: { type: 'plain_text', text: 'Approve' },
action_id: 'approve_request',
style: 'primary',
},
{
type: 'button',
text: { type: 'plain_text', text: 'Reject' },
action_id: 'reject_request',
style: 'danger',
},
],
},
],
});
} catch (error) {
logger.error('Error handling app_mention:', error);
}
});