
Migrate Slack Agents
Migrate a classic single-bot Slack install to one provisioned Slack app per existing...
Install
npx skills add nanocoai/nanoclaw --skill migrate-slack-agents -g -a claude-code -y- Repository
- nanocoai/nanoclaw31.1k
- Category
- AI and agents
- Updated
- 5d ago
- License
- MIT
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Migrate a classic single-bot Slack install to one provisioned Slack app per existing agent group while preserving agent identities, workspaces, memory, and wiring behavior, or record the operator's choice to stay on classic, which remains supported. Use when /update-nanoclaw surfaces the Slack agents requirement, or standalone any time later.
Migrate classic Slack agents
Turn every agent group wired through the classic instance='slack' adapter into
a named slack-<slug> bot without replacing the agent group. This is an
operator-guided, resumable data migration. It never creates an agent group and
never edits an agent workspace.
Migration is optional. Classic single-bot Slack remains fully supported; this skill first offers the choice, and staying on classic is a valid outcome that also satisfies the update requirement.
Hard invariants:
- Never call
create_agentorncl groups create. - Never change an
agent_groups.idor write undergroups/<folder>/. - Never merge the
channelsbranch; fetch and copy skill-owned files only. - Never print token values. Show key names and masked presence only.
- Keep classic rows, credentials, and the shared Slack app available for rollback until the operator explicitly approves cutover.
Phase 1: Detect classic state
Run from the NanoClaw project root. Read the central DB only through the sanctioned wrapper.
Classic state requires all four signals:
-
src/channels/index.tscontains the Slack barrel importimport './slack.js';. -
.envhas a non-empty unsuffixedSLACK_BOT_TOKENand either a non-emptySLACK_APP_TOKENorSLACK_SIGNING_SECRET. Check presence without echoing values. -
This query returns at least one row:
pnpm exec tsx scripts/q.ts data/v2.db "SELECT mg.id, mga.id, mga.agent_group_id FROM messaging_groups mg JOIN messaging_group_agents mga ON mga.messaging_group_id=mg.id WHERE mg.channel_type='slack' AND mg.instance='slack' ORDER BY mg.id, mga.agent_group_id" -
At least one wired group does not yet have complete named-instance coverage: a stable slug, both
SLACK_BOT_TOKEN_<SUFFIX>andSLACK_APP_TOKEN_<SUFFIX>, that slug inSLACK_INSTANCES, and the expectedslack-<slug>messaging-group/wiring rows.

