home / skills / phrazzld / claude-config / slack-app-scaffold

slack-app-scaffold skill

/skills/slack-app-scaffold

This skill scaffolds Slack apps using Bolt for JavaScript and Slack CLI to turn existing services into interactive, deployable apps.

npx playbooks add skill phrazzld/claude-config --skill slack-app-scaffold

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

Files (2)
SKILL.md
2.6 KB
---
name: slack-app-scaffold
description: "Scaffold Slack apps from existing functionality using Bolt for JavaScript and the Slack CLI. Use when turning a service, script, or workflow into a Slack app with events, commands, modals, or automations."
effort: high
---

# Slack App Scaffold

Bolt for JavaScript + Slack CLI is the 2026 default. Optimize for fast local runs, clear handlers, and safe deploys.

## Stack (Default)

- Runtime: Node.js (LTS)
- Framework: `@slack/bolt`
- Tooling: Slack CLI (`slack`)
- Config: Slack manifest via CLI-generated project

## Core CLI Commands

```bash
# Create new Slack app project
slack create my-slack-app

# Run locally (socket mode / dev env)
cd my-slack-app
slack run

# Deploy to Slack-hosted runtime / target env
slack deploy
```

## Workflow (CLI-First)

1. Identify integration points in existing functionality.
2. Scaffold app with `slack create`.
3. Model capabilities in the manifest (scopes, events, commands, interactivity).
4. Implement handlers in Bolt (events, commands, actions, views/modals).
5. Run locally with `slack run` and validate in a dev workspace.
6. Deploy with `slack deploy`.

## Project Structure (Typical)

```text
my-slack-app/
├── app/
│   ├── app.js              # Bolt app bootstrap
│   ├── listeners/          # Events, commands, actions, views
│   ├── services/           # Integration layer to existing functionality
│   └── middleware/         # Auth, validation, shared guards
├── manifest.json           # Slack app manifest (CLI-managed)
├── package.json
└── README.md
```

Design rule: keep Slack handlers thin; push real work into `services/`.

## Common Use Cases

- Notifications: post messages from existing jobs or webhooks.
- Slash commands: wrap existing scripts or APIs behind `/commands`.
- Workflows: compose multi-step flows with Slack-native triggers.
- Modals: collect structured input, then call existing systems.

## Implementation Notes

- Map each Slack surface to one listener module.
- Normalize inputs at the edge; pass clean DTOs inward.
- Acknowledge fast (`ack()`), then do work.
- Centralize Slack Web API calls behind a small service.

See `references/bolt-patterns.md` for concrete patterns.

## Verification Steps

```bash
# 1) Install deps
npm install

# 2) Run locally
slack run

# 3) Lint/test if present
npm test

# 4) Deploy
slack deploy
```

Manual checks in Slack workspace:
- Trigger each command or event once.
- Validate permissions/scopes match what handlers need.
- Confirm errors surface as user-visible messages, not silent failures.

Overview

This skill scaffolds Slack apps from existing services, scripts, or workflows using Bolt for JavaScript and the Slack CLI. It provides a CLI-first workflow, a recommended project structure, and practical patterns to convert integration points into Slack events, commands, modals, and automations. The goal is fast local iteration, clear handler boundaries, and safe deploys to Slack-hosted runtimes.

How this skill works

You scaffold a new app with the Slack CLI, model capabilities in the manifest, and implement thin Bolt listeners that delegate to a services layer. Use slack run for local development (socket mode or dev env) to validate behavior in a workspace, then slack deploy to push changes. The scaffold encourages acknowledging events quickly (ack()) and centralizing Web API calls in a service wrapper.

When to use it

  • Turning an existing script, webhook, or API into a Slack-accessible feature
  • Adding slash commands or event-driven notifications to an existing system
  • Building multi-step workflows or modals that collect input and call backend services
  • Prototyping Slack integrations with rapid local testing before production deploys

Best practices

  • Keep Bolt listeners thin; push business logic into a services/ integration layer
  • Model permissions and surfaces in the manifest so scopes match handler needs
  • Normalize and validate inputs at the edge; pass clean DTOs into services
  • Always ack() events/commands immediately, then perform work asynchronously
  • Centralize Slack Web API calls behind a small service to simplify testing and retries

Example use cases

  • Wrap a reporting script as a slash command that returns formatted results
  • Post job or CI notifications to channels from existing webhook outputs
  • Present a modal to collect user input, then trigger a backend workflow
  • Expose a lightweight conversational interface to query an internal API

FAQ

Which runtime and framework does this scaffold target?

The scaffold targets Node.js LTS with @slack/bolt and the Slack CLI for project and manifest management.

How do I test handlers locally before deploying?

Run slack run in the project directory to start a local dev session (socket mode or dev env) and exercise commands/events in a developer workspace.