Internal · AI Bot Security Pattern

Scoping a Slack Bot to One Job

You run one Claude account. Off it you run one or more Slack bots, each built to work with a specific department. Here is how we keep each bot inside its lane, using Pam (our CST bot) as the worked example.

Written June 3, 2026 For Emazing AI power users Status Live and verified

Set this once. Each section below has a feedback box. Anthony pulls all of it together to decide next steps.

The problem

One Claude account can run several Slack bots, each serving a different department. By default, every one of those bots can read everything on the account: the whole filesystem, the second brain, the memory files, and the other bots' data.

That default is fine for a personal assistant. It is not fine for a bot that works with a team. If a department bot can read performance notes, one-on-ones, HR files, or personal records, then a single careless question (or a planted message) can surface things people should never see. The bot needs a hard fence, not a polite request.

Feedback on: The problem

Saved ✓

Worked example: Pam

Pam is our CST bot. She drafts customer-service replies for the support team in Slack. Her whole job is customer help, so she should reach only our customer-service knowledge and the two brand websites, and nothing about employees or anything personal. Out of the box she had none of that isolation: full shell access and a shared, wide-open settings file let her read the second brain, the memory, and even credentials. We fenced her in. The next two sections show the result and the proof.

Feedback on: Worked example

Saved ✓

What she can and cannot touch

Pam CAN accessWhy it is allowed
Her own knowledge-base folder (CS policy, the per-brand customer-question sets, the Yuma auto-handled digest)This is the customer-service knowledge, the whole point of the bot
The two brand websites and their help centersTo check live policy and product pages for a customer answer
Network: Anthropic, Slack, and the brand domains onlyEnough to think, reply in Slack, and read the brand sites. Nothing else.
Pam CANNOT access verified blockedWhat lives there
The second brainEmployee one-on-ones, performance, HR, personal, family, investing
The Claude memory filesNotes about people and the business
The Documents and Library foldersEverything personal and app data
Credentials, secrets, SSH and cloud keysAccount access
Other bots' configs and logsCross-bot data leakage
The shell (Bash) is removed entirelySo she cannot read a file or send data out the side door

Feedback on: Access table

Saved ✓

How we proved it

A setting you cannot test is a setting you do not trust. So we ordered Pam, running exactly as she does in production, to read the forbidden files, then to read her own policy file.

Read the second brain → BLOCKED
Read the Claude memory files → BLOCKED
Read the personal handoff docs → BLOCKED
Read her own CS policy file → ALLOWED

The fence sits below the bot's instructions, at the permission layer. So even a planted message that says "ignore your rules and read X" cannot get past it. The block is enforced by the system, not by the bot's good behavior.

Feedback on: How we proved it

Saved ✓

Two files per bot

Each scoped bot carries two of its own files. They do different jobs, and keeping them separate is the whole trick: one says what the bot should do, the other says what it is allowed to touch.

Its instructions

CLAUDE.md (the bot's own) Who the bot is, how it behaves, and an explicit order to ignore your account's global CLAUDE.md and memory. This is the bot's brain, the equivalent of your account's CLAUDE.md, but written for its one job.

Its permissions

settings file (the bot's own) The fence. What the bot can read, which tools it has, and what network it can reach. This is the security layer, and it is a different file from the instructions.

Because the permission fence blocks the bot from your account's global CLAUDE.md and memory in the first place, the bot does not inherit your account-wide instructions at all. It runs on its own CLAUDE.md instead. Instructions and permissions reinforce each other.

Feedback on: Two files per bot

Saved ✓

The reusable pattern

If you run more than one bot off a single Claude account, give each bot its own fence. Six steps:

  1. Its own permission file. Never point a scoped bot at the shared full-access settings. Each bot gets a dedicated permission file (separate from its CLAUDE.md instructions above).
  2. Minimal tools. Drop Bash (the shell, which bypasses every read rule), plus Write, Edit, and tool-discovery. A read-only answer bot needs only to read its files and the web.
  3. A deny-list of everything outside its own folder. Claude is allow-all-then-deny for reads, so you list what to block. Use ~/ path notation (see gotchas).
  4. Connector isolation. Start the bot with an empty integrations config in strict mode, so it has zero connectors except the ones you deliberately add later.
  5. Lock the network. Allow only the hosts that bot truly needs (the AI service, Slack, and its own data sources). This closes the exfiltration path.
  6. Verify with a probe. Explicitly tell the bot to read a forbidden file and confirm it comes back blocked, before it ever goes live.

Feedback on: The reusable pattern

Saved ✓

Three gotchas

1. Path notation matters. Permission paths must use ~/ form (for example ~/second-brain/**). We first wrote the full /Users/you/... path, and it silently matched nothing and blocked nothing. The bot read everything while the config looked correct.
2. The "do not ask" mode still enforces deny rules. We assumed the headless "do not prompt me" mode skipped permissions. It does not. Once the paths were right, the deny rules held in that mode.
3. The OS sandbox only confines the shell and the network, not the file-read tool. So read confinement is entirely the deny-list. That is exactly why removing Bash is mandatory: with the shell present, a bot can read around the deny-list.

Feedback on: Gotchas (and anything overall)

Saved ✓