Getting started
The fast path: the skill
Wingman ships a Claude skill that scaffolds a whole bot — knowledge base included — from a documentation URL:
/create-wingman https://docs.example.com "Acme billing support"
The skill browses the sources you give it, writes the knowledge base as Markdown,
generates the bot package and its wrangler.jsonc, and runs the tests. See
The bot-scaffolding skill.
By hand
-
Create a package that depends on the SDK:
{ "dependencies": { "@wingman/core": "workspace:*", "@wingman/platform-slack": "workspace:*" } } -
Write the bot:
// src/bot.ts import { defineBot, isAddressedToBot, message } from "@wingman/core"; export const bot = defineBot({ name: "acme-support", async onMessage(event, conversation) { if (!isAddressedToBot(event)) return; await conversation.reply( message("How can I help?").button("menu:pricing", "Pricing"), ); }, async onTrigger(event, conversation) { if (event.triggerId === "menu:pricing") await conversation.reply("Plans start at 10 EUR."); }, }); -
Wire the Worker entry point:
// src/index.ts import { createBotRuntime } from "@wingman/core"; import { slackPlatform } from "@wingman/platform-slack"; import { bot } from "./bot"; export default createBotRuntime({ bot, platforms: [slackPlatform] }); -
Set the secrets and deploy. See Deploying a bot.
Running locally
pnpm install
pnpm typecheck
pnpm test
wrangler dev # from the bot's directory
wrangler dev serves the webhook endpoint locally. To exercise it from Slack,
expose it with a tunnel and paste that URL into the Slack app configuration —
see Connecting Slack.
Try it: How do I run a bot locally?
Related: What Wingman is, Deploying a bot, Troubleshooting.