Agent skill

Wire First NanoClaw Agent

by nanocoai in nanocoai/nanoclaw

Connects the first NanoClaw agent to a chat channel and proves delivery by having it send the operator a welcome direct message.

MITAuto-check: notesProductivity & Automation

Install Wire First NanoClaw Agent

skills CLI
$ npx skills add nanocoai/nanoclaw --skill init-first-agent -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nanocoai/nanoclaw init-first-agent --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nanocoai/nanoclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/init-first-agent .claude/skills/init-first-agent && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
init-first-agent
GitHub stars
31k
Token cost
~2.5k tokens
SKILL.md length
1,283 words
Files
1
Skills in repo
59
Repo updated
First seen
Licence
MIT

At a glance

Connects the first NanoClaw agent to a chat channel and proves delivery by having it send the operator a welcome direct message.

  • Works in 6 steps: Pick the channel → Ask for the operator's identity → Resolve the DM platform id → …
  • Right after a channel is installed and the NanoClaw service is running
  • SKILL.md covers Prerequisites, 1. Pick the channel, 2. Ask for the operator's… and 3. Resolve the DM platform id, plus 4 more sections
  • Calls pnpm and npx

What it does

Three prerequisites are checked first: the service is running, at least one channel skill has been installed with credentials in .env, and the adapter shows as connected in the host log. The agent then asks which enabled channel should carry the welcome DM, and asks, in plain text, for the operator's user ID on that channel, a display name and a persona name for the agent.

Next it works out the DM platform ID. Telegram, WhatsApp, iMessage, Matrix and Resend can use the user handle directly, while Discord, Slack, Teams, Webex and Google Chat need an extra resolution step, for example the user messaging the bot once. The agent group is selected or created, and the welcome message goes through the normal delivery path. Every step is idempotent, so rerunning is safe.

When your agent uses it

  • Right after a channel is installed and the NanoClaw service is running
  • Verifying end-to-end delivery from a new channel to the operator
  • Creating the first agent group for a direct-message conversation

Example prompts

  • “My Discord channel is connected; set up the first agent and send me a welcome DM.”
  • “Run the first-agent setup for Telegram and use my display name for the agent group.”

Requirements

  • A running NanoClaw service
  • At least one installed channel with credentials in .env
  • Your user ID on the chosen channel

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Pick the channel
  2. Ask for the operator's identity
  3. Resolve the DM platform id
  4. Pick the agent group
  5. Run the init script
  6. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 66f0823. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm and npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Wire First NanoClaw Agent loads about 2.5k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 1,283 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:13
    nel>` skill has run, credentials are in `.env`, and the adapter is uncommented in `src/channels/index.ts`.
  • NoteMentions a .env fileSKILL.md:18
    nels (uncommented imports). Cross-check `.env` for the relevant credentials.
  • NoteMentions a .env fileSKILL.md:108
    t provider (`DEFAULT_AGENT_PROVIDER` in `.env`, or `claude` when unset). To put it on a different provider, switch after

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from nanocoai/nanoclaw at commit 66f0823, republished under its MIT licence (© nanocoai). 1,283 words, ~2,466 tokens.

Download SKILL.mdSave it as .claude/skills/init-first-agent/SKILL.md (or your agent's skills folder).
name
init-first-agent
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.

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.

Channels without cold DM (direct-addressable): telegram, whatsapp, imessage, matrix, resend. The user handle doubles as the DM chat id. Set:

PLATFORM_ID=${CHANNEL}:${USER_HANDLE}

Skip to step 4.

Channels with cold DM (resolution-required): discord, slack, teams, webex, gchat. The bot can DM cold at runtime via Chat SDK, but this skill runs standalone — it can't call the adapter. Two resolutions:

3a. User DMs the bot once (Discord / Slack / Teams / Webex / gChat)

Tell the user:

Send any single message to the bot as a DM from your account on ${CHANNEL}. The router will record the DM as a messaging group. Reply done here when you've sent the message.

Wait for the user's confirmation. Then look up the most recent DM messaging groups:

bash
pnpm exec tsx scripts/q.ts data/v2.db "SELECT id, platform_id, name, created_at FROM messaging_groups WHERE channel_type='${CHANNEL}' AND is_group=0 ORDER BY created_at DESC LIMIT 5"

Show the top rows to the user and confirm which platform_id is theirs (usually the most recent). Record as PLATFORM_ID. If none appeared, check logs/nanoclaw.log for unknown_sender drops — the adapter might be rejecting inbound due to connection or permission issues.

3b. Telegram pair-code path (if the user prefers not to DM first)

For Telegram only, there's an existing pair-code primitive. When you run this tool, take the output and extract the pairing code. Then show it to the user in plain text and ask the user to send the code in the Telegram chat to complete the pairing.

bash
npx tsx setup/index.ts --step pair-telegram -- --intent new-agent:dm-with-<folder>

Parse the PAIR_TELEGRAM_ISSUED status block for CODE and follow the REMINDER_TO_ASSISTANT line in that block. Then wait for the PAIR_TELEGRAM block — read PLATFORM_ID and PAIRED_USER_ID from it. telegram.ts's interceptor has already upserted the user and granted owner if none existed yet. Use PLATFORM_ID and PAIRED_USER_ID directly in step 5.

4. Pick the agent group

List the existing agent groups and their wirings through the admin CLI:

bash
ncl groups list --json
ncl wirings list --json

If setup already installed a template, it appears in the groups result even when it has no wiring. Show the user each group's name, folder, and id, and note which groups already appear as agent_group_id values in the wirings result.

  • If no group exists, continue without AGENT_GROUP_ID; the init script will create one.
  • If groups exist, ask whether to wire one of them or create a new agent. Recommend the sole unwired group when there is exactly one.
  • When the user picks an existing group, record its exact id as AGENT_GROUP_ID. Do not infer it from the display name or folder.
Show full SKILL.md (644 more words)Show less

5. Run the init script

When creating a new agent, first pick the provider. Read src/providers/index.ts and collect the installed providers from its import './<name>.js'; lines — claude is always available as the built-in default. If a non-default provider is installed (e.g. codex), ask the user which one this agent should run on; if only claude is available, skip the question. An existing group keeps the provider and template configuration it already has.

bash
npx tsx scripts/init-first-agent.ts \
  --channel "${CHANNEL}" \
  --user-id "${CHANNEL}:${USER_HANDLE}" \
  --platform-id "${PLATFORM_ID}" \
  --display-name "${DISPLAY_NAME}" \
  --agent-name "${AGENT_NAME}"

When an existing group was selected, append its exact id:

bash
  --agent-group-id "${AGENT_GROUP_ID}"

When the channel runs a named adapter instance (e.g. a second Telegram bot registered as telegram-mega), append --instance "${INSTANCE}" with the registry key (never the short name) so the DM row, the wiring and the welcome all target that bot; omitted = the channel's default instance.

The new group is created on the instance default provider (DEFAULT_AGENT_PROVIDER in .env, or claude when unset). To put it on a different provider, switch after creation with ncl groups config update --id <group-id> --provider <name>. Add --welcome "System instruction: ..." to override the default welcome prompt.

The script:

  1. Upserts the users row and grants owner role if no owner exists.
  2. Uses the selected agent_groups row, or creates one and calls initGroupFilesystem at groups/dm-with-<name>/.
  3. Reuses or creates the DM messaging_groups row.
  4. Wires them via messaging_group_agents (which auto-creates the companion agent_destinations row).
  5. Hands the welcome message to the running service via its CLI socket (data/cli.sock), targeting the DM messaging group. The service routes it into the DM session, which wakes the container synchronously. If the socket isn't reachable (service down), falls back to a direct inbound.db write that the next host sweep picks up.

Show the script's output to the user.

6. Verify

The welcome DM is queued synchronously; the only wait is container cold-start (~60s on first launch) before the agent processes the message and the reply flows through outbound.db to the channel.

Do not tail the log or poll in a sleep loop. Ask the user in plain text:

The welcome DM should arrive shortly. Let me know when you've received it (or if it doesn't arrive within two minutes).

Wait for the user's reply. If they confirm receipt, the skill is done.

If they say it didn't arrive, then diagnose using the DB directly (no waiting loops required — the message either delivered or it didn't):

  • pnpm exec tsx scripts/q.ts data/v2-sessions/<agent-group-id>/<session-id>/outbound.db "SELECT id, status, created_at FROM messages_out ORDER BY created_at DESC LIMIT 5" — check for stuck pending rows. Replace <agent-group-id> and <session-id> with the values from the script's output.
  • grep -E 'Unauthorized channel destination|container.*exited|error' logs/nanoclaw.log | tail -20 — look for ACL rejections or container crashes.
  • ls data/v2-sessions/<agent-group-id>/*/outbound.db — confirm the session exists.

Troubleshooting

"Missing required args" — the script wants --channel, --user-id, --platform-id, --display-name at minimum. Re-check the command you assembled.

No messaging_groups row appears after the user DMs (step 3a) — auto-created rows are stamped with the channel adapter's declared unknown_sender_policy (two-level model: adapter declaration → per-row override; strict only when the adapter has no declaration). Under strict the router silently drops messages from unknown senders but still creates the messaging_groups row; under request_approval an approval card goes to an admin instead. If the row is missing entirely, the adapter isn't receiving the inbound message. Check logs/nanoclaw.log for adapter errors (auth, gateway disconnect, rate limit).

Owner already exists — hasAnyOwner() returned true, so the grant is skipped silently. That's fine; the script still creates the agent and wiring. Reassigning ownership needs a separate flow (not this skill).

Wrong person got the welcome DM — the --platform-id you passed is someone else's DM channel. Rerun with the correct one; the script is idempotent on user/messaging-group/agent-group but writes a new session welcome each run.

Agent group name collision — use step 4 to select the intended group by id. If creating a new agent and dm-with-<display-name> already exists, the script reuses it; pass a different --display-name to get a distinct folder.

© nanocoai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/init-first-agent of nanocoai/nanoclaw.

Open the folder on GitHubat commit 66f0823

Compare with similar skills

Wire First NanoClaw Agent next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Wire First NanoClaw Agent compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Wire First NanoClaw Agent this skillnanocoai/nanoclaw31k—~2.5kAutomated safety check: NotesMIT
Traul Message Searchdandaka/traul113—~3.9kAutomated safety check: NotesAGPL-3.0
Chat SDKdatabuddy-analytics/Databuddy1.2k—~2.6kAutomated safety check: PassAGPL-3.0
Lettabotletta-ai/lettabot326—~3.4kAutomated safety check: PassApache-2.0
Message Push0xranx/golembot323—~984Automated safety check: PassMIT
Ak Dev New Messaging Integrationyaalalabs/agent-kernel191—~4.2kAutomated safety check: PassApache-2.0

Similar skills

  • Drives the traul CLI to sync, search and monitor messages from Slack, Telegram, Discord, Linear, Gmail, WhatsApp, Claude Code sessions and Markdown files.

    113 GitHub stars~3.9k tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check: notes
  • Chat SDK

    databuddy-analytics/Databuddy

    Build multi-platform chat bots with Chat SDK (chat npm package).

    1.2k GitHub stars~2.6k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Lettabot

    letta-ai/lettabot

    Set up and run LettaBot - a multi-channel AI assistant for Telegram, Slack, Discord, WhatsApp, and Signal.

    326 GitHub stars~3.4k tokensUpdated 4 mo ago
    Productivity & AutomationAuto-check passed
  • Message Push

    0xranx/golembot

    Send proactive messages to IM groups or individual users via the gateway Send API.

    323 GitHub stars~984 tokensUpdated 8 days ago
    Productivity & AutomationAuto-check passed
  • Ak Dev New Messaging Integration

    yaalalabs/agent-kernel

    Step-by-step guide for adding a new messaging platform integration to Agent Kernel.

    191 GitHub stars~4.2k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Ak Add Integration

    yaalalabs/agent-kernel

    Add a messaging platform integration to an existing Agent Kernel project.

    191 GitHub stars~2.6k tokensUpdated today
    Productivity & AutomationAuto-check passed

More from nanocoai/nanoclaw

All 59 skills in this repo
  • Installs or refreshes Iron Proxy and its Iron Control web console for NanoClaw, with a local Docker setup, database, credentials and a human approval bridge.

    31k GitHub stars~4.6k tokensUpdated today
    Auto-check: notes
  • Agent Browser

    nanocoai/nanoclaw

    Drives a web browser from the shell with the agent-browser CLI: open pages, read an element snapshot, click and fill by reference, grab text and screenshots.

    31k GitHub starsUsed in 3 repos~1.6k tokens
    Auto-check passed
  • Installs or refreshes OneCLI as the gateway provider for NanoClaw, copying the adapter files, registering the provider and running the setup script.

    31k GitHub stars~1.1k tokensUpdated today
    Auto-check: notes
  • Guides a conversational migration from an OpenClaw install to NanoClaw v2, carrying over identity, channel credentials, scheduled tasks and workspace files.

    31k GitHub stars~6k tokensUpdated today
    Auto-check: notes
  • Wires up an additional phone number onto an already-installed Dial channel, so one NanoClaw install answers SMS and AI voice calls on more than one line.

    31k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • NanoClaw LLM Wiki Setup

    nanocoai/nanoclaw

    Adds a persistent wiki knowledge base to a NanoClaw group following Karpathy's LLM Wiki pattern, with folders, a tailored container skill and a CLAUDE.md section.

    31k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed

Questions about Wire First NanoClaw Agent

What does Wire First NanoClaw Agent do?

Connects the first NanoClaw agent to a chat channel and proves delivery by having it send the operator a welcome direct message. env, and the adapter shows as connected in the host log. The agent then asks which enabled channel should carry the welcome DM, and asks, in plain text, for the operator's user ID on that channel, a display name and a persona name for the agent.

When should I use Wire First NanoClaw Agent?

Wire First NanoClaw Agent fits situations like: right after a channel is installed and the NanoClaw service is running; verifying end-to-end delivery from a new channel to the operator; creating the first agent group for a direct-message conversation.

How do I install Wire First NanoClaw Agent in Claude Code?

Run `npx skills add nanocoai/nanoclaw --skill init-first-agent -a claude-code`. Or copy the skill folder (.claude/skills/init-first-agent in nanocoai/nanoclaw) into .claude/skills/init-first-agent in your project. Claude Code loads it when a task matches its description.

How do I install Wire First NanoClaw Agent in Codex?

Run `npx skills add nanocoai/nanoclaw --skill init-first-agent -a codex`. Or copy the skill folder (.claude/skills/init-first-agent in nanocoai/nanoclaw) into .agents/skills/init-first-agent in your project. Codex loads it when a task matches its description.

Can I use Wire First NanoClaw Agent in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nanocoai/nanoclaw --skill init-first-agent -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/init-first-agent, .gemini/skills/init-first-agent, .github/skills/init-first-agent and .opencode/skills/init-first-agent in your project.

What does Wire First NanoClaw Agent need to run?

Going by SKILL.md and its folder, Wire First NanoClaw Agent needs the command-line tools its instructions call (pnpm and npx). Our summary lists: A running NanoClaw service; At least one installed channel with credentials in .env; Your user ID on the chosen channel.

Does Wire First NanoClaw Agent access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Wire First NanoClaw Agent safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Wire First NanoClaw Agent use?

Wire First NanoClaw Agent is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Wire First NanoClaw Agent use?

About 2.5k tokens (SKILL.md is roughly 9.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Wire First NanoClaw Agent?

Skills that share tags, products or a category with Wire First NanoClaw Agent: Traul Message Search (dandaka/traul, 113 stars), Chat SDK (databuddy-analytics/Databuddy, 1.2k stars), Lettabot (letta-ai/lettabot, 326 stars) and Message Push (0xranx/golembot, 323 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Wire First NanoClaw Agent?

nanocoai (a GitHub organization) maintains it in nanocoai/nanoclaw, which has 30,883 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on October 6, 2026.

Source: nanocoai/nanoclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.