# Manage Channels

Wire channels to agent groups, manage isolation levels, add new channel groups.

- Repository: https://github.com/nanocoai/nanoclaw (31069 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add nanocoai/nanoclaw --skill manage-channels -g -a claude-code -y`
Codex: `npx skills add nanocoai/nanoclaw --skill manage-channels -g -a codex -y`
Cursor: `npx skills add nanocoai/nanoclaw --skill manage-channels -g -a cursor -y`
Gemini CLI: `npx skills add nanocoai/nanoclaw --skill manage-channels -g -a gemini-cli -y`

## Description

Wire channels to agent groups, manage isolation levels, add new channel groups. Use after adding a channel, during setup, or standalone to reconfigure.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Manage Channels

Wire messaging channels to agent groups. See `docs/isolation-model.md` for the full isolation model.

Privilege is a **user-level** concept, not a channel-level one (see `src/modules/permissions/db/user-roles.ts`, `src/modules/permissions/access.ts`). There is no "main channel" / "main group", any user can be granted `owner` or `admin` (global or scoped to an agent group) via `grantRole()`, and messages from unknown senders are gated per-messaging-group by `unknown_sender_policy` (`strict` | `request_approval` | `public`).

## Assess Current State

Read the central DB (`data/v2.db`) using these canonical queries (column names match the schema, not the CLI flags, the `register` command's `--assistant-name` is stored in `agent_groups.name`).

Run each via the in-tree wrapper, the host setup deliberately ships no `sqlite3` CLI:

```bash
pnpm exec tsx scripts/q.ts data/v2.db "<query>"
```

```sql
SELECT id, name AS assistant_name, folder, agent_provider FROM agent_groups;
SELECT id, channel_type, platform_id, name, unknown_sender_policy FROM messaging_groups;
SELECT messaging_group_id, agent_group_id, engage_mode, engage_pattern, session_mode, threads, priority FROM messaging_group_agents;
SELECT user_id, role, agent_group_id FROM user_roles ORDER BY role='owner' DESC;
```

Also check `.env` for channel tokens and `src/channels/index.ts` for uncommented imports.

Categorize channels as: **wired** (has DB entities + messaging_group_agents row), **configured but unwired** (has credentials + barrel import, no DB entities), or **not configured**.

If the instance has no owner yet (`SELECT COUNT(*) FROM user_roles WHERE role='owner' AND agent_group_id IS NULL` returns 0), tell the user they should run `/init-first-agent` first, it stands up the first agent group, promotes the operator to owner, and verifies delivery end-to-end by having the agent DM them. Then return here for any additional channels/groups.

## First Channel (No Agent Groups Exist)

The rest: https://github.com/nanocoai/nanoclaw/blob/HEAD/.claude/skills/manage-channels/SKILL.md
