# Init First Agent

Walk the operator through wiring the first NanoClaw agent to a DM channel, resolve the...

- 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 init-first-agent -g -a claude-code -y`
Codex: `npx skills add nanocoai/nanoclaw --skill init-first-agent -g -a codex -y`
Cursor: `npx skills add nanocoai/nanoclaw --skill init-first-agent -g -a cursor -y`
Gemini CLI: `npx skills add nanocoai/nanoclaw --skill init-first-agent -g -a gemini-cli -y`

## Description

Walk the operator through wiring the first NanoClaw agent to a DM channel, resolve the operator's channel identity, select or create the agent, and trigger a welcome DM via the normal delivery path. Use after channel credentials are configured and the service is running.

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

# Init First Agent

Wire the first NanoClaw agent to a channel and verify end-to-end delivery by having the agent DM the operator. Everything the skill does is idempotent, rerunning is safe.

## Prerequisites

- **Service running.** Check: `launchctl list | grep "$(. setup/lib/install-slug.sh && launchd_label)"` (macOS) or `systemctl --user status "$(. setup/lib/install-slug.sh && systemd_unit)"` (Linux). If stopped, tell the user to run `/setup` first.
- **Target channel installed.** At least one `/add-<channel>` skill has run, credentials are in `.env`, and the adapter is uncommented in `src/channels/index.ts`.
- **Adapter connected.** Tail `logs/nanoclaw.log`, look for a recent `channel setup` / `adapter connected` line for the target channel.

## 1. Pick the channel

Read `src/channels/index.ts` to find enabled channels (uncommented imports). Cross-check `.env` for the relevant credentials.

AskUserQuestion: "Which channel should host the welcome DM?" with one option per enabled channel (Discord, Slack, Telegram, WhatsApp, Webex, Teams, Google Chat, Matrix, iMessage, Resend, …).

Record the choice as `CHANNEL` (lowercase, e.g. `discord`).

## 2. Ask for the operator's identity

Read the channel's own skill for its `## Channel Info > how-to-find-id` section (e.g. `.claude/skills/add-discord/SKILL.md`, `.claude/skills/add-telegram/SKILL.md`). Show those instructions to the user in plain text.

Then ask in plain text (NOT `AskUserQuestion`, these are free-form):

1. **Your user id on this channel**, e.g. a Discord user ID, Telegram user ID, Slack user ID. Record as `USER_HANDLE`.
2. **Your display name**, human name, used to name the agent group (`dm-with-<normalized>`) and as the welcome-message addressee. Record as `DISPLAY_NAME`.
3. **Agent persona name**, the assistant's display name. Default: `DISPLAY_NAME`. Record as `AGENT_NAME`.

## 3. Resolve the DM platform id

This depends on whether the channel supports cold DM via `adapter.openDM`.

The rest: https://github.com/nanocoai/nanoclaw/blob/HEAD/.claude/skills/init-first-agent/SKILL.md
