Build a personal AI assistant that lives in Slack, knows your context, and works while you're away.
OpenClaw proved something: people want an AI that lives where they already work. Not in a separate app. Not in a browser tab. In Slack, in WhatsApp, in the tools they already have open. The trick isn't building an AI. It's wiring it into the place you already look.
A Slack bot powered by Claude that has access to your strategy folder, your brain, your CLAUDE.md. It can answer questions about your projects, search your files, draft messages, and run tasks. All from a Slack DM.
The whole system is simpler than it sounds:
You (in Slack)
↓ message
Slack Bot (Node.js, always running)
↓ reads your message
Claude API (with your CLAUDE.md as system prompt)
↓ generates response
Slack Bot
↓ posts reply
You (in Slack)
That's it. A small Node.js process that listens for Slack messages, sends them to Claude with your context, and posts the response back. The bot knows who you are because it reads your CLAUDE.md.
chat:write (post messages)im:history (read DMs)im:read (access DM channels)app_mentions:read (respond to @mentions)xoxb-)xapp-)Create a project folder:
mkdir -p ~/strategy/projects/my-slack-bot
cd ~/strategy/projects/my-slack-bot
npm init -y
npm install @slack/bolt @anthropic-ai/sdk
Create the bot file:
// bot.js
const { App } = require('@slack/bolt');
const Anthropic = require('@anthropic-ai/sdk');
const fs = require('fs');
const path = require('path');
// Load your CLAUDE.md as the system prompt
const claudeMd = fs.readFileSync(
path.join(process.env.HOME, 'strategy', 'CLAUDE.md'), 'utf-8'
);
const app = new App({
token: process.env.SLACK_BOT_TOKEN,
appToken: process.env.SLACK_APP_TOKEN,
socketMode: true,
});
const anthropic = new Anthropic();
// Respond to DMs
app.message(async ({ message, say }) => {
if (message.subtype) return; // skip edits, joins, etc.
const response = await anthropic.messages.create({
model: 'claude-sonnet-4-6',
max_tokens: 1024,
system: `You are a personal assistant. Here is context about who you're helping:\n\n${claudeMd}`,
messages: [{ role: 'user', content: message.text }],
});
await say(response.content[0].text);
});
(async () => {
await app.start();
console.log('Bot is running');
})();
export SLACK_BOT_TOKEN="xoxb-your-token-here"
export SLACK_APP_TOKEN="xapp-your-token-here"
export ANTHROPIC_API_KEY="sk-ant-your-key-here"
node bot.js
Open Slack. DM your bot. Ask it anything. It knows who you are because it read your CLAUDE.md.
This is the base version. From here you can add: file search (let the bot grep your strategy folder when you ask "where did I write about X?"), conversation memory (store message history so the bot remembers your last 10 exchanges), slash commands (/summarize, /draft), scheduled check-ins, and multiple channels.
OpenClaw is the fastest-growing open-source AI project ever (240K stars). What made it work:
You don't need to build OpenClaw. But understanding why it took off tells you what people actually want: an AI that lives where they already are.
For personal use, run it on your Mac (node bot.js in a terminal tab). For always-on, deploy to a server:
# On your server (Hetzner, DigitalOcean, etc.)
git clone your-repo
npm install
# Use pm2 to keep it running
npm install -g pm2
pm2 start bot.js --name "slack-bot"
pm2 save
Get the base bot running. DM it three questions about your work. Notice how much better the answers are when your CLAUDE.md is the system prompt vs generic Claude. That's the compounding effect, now available from your phone.