Skills
Utility Official

Init First Agent

Create your first NanoClaw agent for a DM channel and verify end-to-end delivery with a welcome message.

What it does

  • Stand up the first agent group with one skill invocation
  • Resolves your channel identity (cold-DM, pair-code, or direct platform ID)
  • Wires the DM messaging group to a fresh agent automatically
  • Sends a welcome DM through the normal delivery path — verifies end-to-end
  • Idempotent: rerunning is safe

What you'll need

  • NanoClaw installed and running
  • At least one channel installed via /add-<channel>
  • Channel credentials set in .env and adapter uncommented in src/channels/index.ts

Install

/init-first-agent

How it works

The /init-first-agent skill walks the operator through standing up the first NanoClaw agent for a chosen channel and sends a welcome DM through the normal delivery path. If the welcome arrives, the whole pipeline — channel adapter, router, agent container, outbound delivery — is working end-to-end.

This is meant for the first agent on an instance, the one that bootstraps owner privileges and verifies your channel install. After this, use /manage-channels for additional channels and groups.

What it does

  1. Picks the channel — reads src/channels/index.ts for enabled adapters and asks which one should host the welcome DM.
  2. Asks for your identity — your user ID on the channel and your display name. The agent group is named dm-with-<normalized-name> and the agent persona uses your display name by default.
  3. Resolves the DM platform ID, with three paths:
    • Direct-addressable channels (Telegram, WhatsApp, iMessage, Matrix, Resend) — your handle doubles as the DM chat ID.
    • Cold-DM channels (Discord, Slack, Teams, Webex, Google Chat) — you DM the bot once, the router records the messaging group, the skill picks it up.
    • Telegram pair-code pathsetup/index.ts --step pair-telegram issues a code, you post @bot CODE in the chat, the skill captures the resulting PLATFORM_ID and PAIRED_USER_ID.
  4. Runs the init script — upserts the user, grants owner if no owner exists, creates the agent group with initGroupFilesystem, reuses or creates the DM messaging group, wires them via messaging_group_agents, and queues the welcome message via the running service’s CLI socket.
  5. Verifies — asks you to confirm the welcome DM arrived. If not, falls back to direct DB inspection (no waiting loops).

What you get

  • An agent group named dm-with-<you> with files initialized at groups/dm-with-<you>/.
  • Owner role on your user record (global, not scoped to a single agent group).
  • Wiringmessaging_group_agents row connecting your DM messaging group to the new agent group, plus the companion agent_destinations entry so the agent can address the channel by name.
  • A welcome DM in your messaging app, confirming the whole pipeline works.

Tips

  • Run this immediately after /setup and your first /add-<channel> — it’s the bridge from “I have credentials” to “I have a working agent.”
  • The skill is idempotent. Rerunning with the same display name reuses the existing agent group. Pass a different display name to get a distinct folder.
  • If the welcome DM doesn’t arrive in two minutes, the most useful diagnostics are:
    • outbound.db — check for stuck pending rows in messages_out
    • logs/nanoclaw.log — search for Unauthorized channel destination (ACL issue) or container.*exited (container crash)
  • Don’t tail logs in a sleep loop — the message either delivered or it didn’t, and the DB will tell you which.
  • After this, /manage-channels is the right tool for everything else: more channels, more agent groups, isolation changes.