Slack Bot
Scaffolds a TypeScript Slack bot using @slack/bolt with Socket Mode for local development and HTTP for production. Includes AI-powered message and app-mention handlers, an optional /ask slash command, a pluggable LLM provider registry (AWS Bedrock by default — Converse with prompt caching, on IRSA, no keys — plus Anthropic and OpenAI alternates), and thread-aware conversation context for multi-turn AI responses.
| Name | slack-bot |
| Version | 0.1.0 |
| Category | applications |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | typescript, slack, bot, ai, chatbot |
| Source | templates/slack-bot |
Render it
Three front doors, one catalog. Pick whichever suits the caller.
# CLI
npx @nanohype/sdk render slack-bot --out ./my-app
# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "slack-bot", variables);
# MCP — from an agent
get_template({ name: "slack-bot" })Prerequisites
| Tool | Version | Why |
|---|---|---|
node | >=24 | Node.js runtime for the Slack bot |
Variables
Required
ProjectNamestring- Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.
Optional
Descriptionstring — defaults toA Slack bot with AI- Short project description for package.json and README
LlmProviderstring — defaults tobedrock- Default LLM provider — bedrock (AWS Bedrock, IRSA, prompt-cached), anthropic, or openai
IncludeSlashCommandsbool — defaults totrue- Include the /ask slash command
IncludeTestsbool — defaults totrue- Include test files with vitest
What it produces
28 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.
.dockerignore
.env.example
.github/workflows/ci.yml
.gitignore
biome.json
Dockerfile
package.json
README.md
src/__tests__/message.test.ts
src/bootstrap.ts
src/commands/ask.ts
src/config.ts
src/events/app-mention.ts
src/events/message.ts
src/index.ts
src/logger.ts
src/metrics.ts
src/providers/anthropic.ts
src/providers/bedrock.ts
src/providers/index.ts
src/providers/mock.ts
src/providers/openai.ts
src/providers/registry.ts
src/providers/types.ts
src/resilience/__tests__/circuit-breaker.test.ts
src/resilience/circuit-breaker.ts
tsconfig.json
vitest.config.tsComposes with
- Pairs with
module-queue-ts - Pairs with
module-database-ts - Pairs with
agentic-loop - Nests inside
monorepo