{"id":"add-dial-number","name":"add-dial-number","summary":"既存のダイヤルチャンネルにもう一つの電話番号を追加すれば、エージェント用の2つ目(または3つ目)の公衆回線として、1つのNanoClawのインストールで複数の番号のSMSやAI音声通話に応答できます。","body":"# Add another Dial number\n\nOne NanoClaw install can serve **multiple Dial numbers** at once. Each number is\nits own **public, threaded line** — its own messaging group (`platform_id` = the\nDial number), each remote correspondent a thread inside it — and the agent\nreplies from whichever number a person texted.\n\nThis skill is for adding a number to an **already-installed** Dial channel. Its\nmechanical steps use `nc:` directives so an agent and the deterministic skill\nengine perform the same validated, idempotent workflow.\n\n## Pre-flight\n\nConfirm Dial is installed and registered. If this fails, run `/add-dial` first,\nthen retry:\n\n```nc:run effect:check\ntest -f src/channels/dial.ts && grep -q \"import './dial.js';\" src/channels/index.ts\n```\n\nAdding another number requires the multi-number adapter, which routes on the\nline each event arrived on (`data.to`). If this fails, run `/update-skills` to\nrefresh the installed adapter, rebuild, and retry:\n\n```nc:run effect:check\ngrep -q \"eventLine\" src/channels/dial.ts\n```\n\nResolve the Dial CLI and the install's user-agent token once for every account\nrequest below:\n\n```nc:run capture:dial_path validate:^/.+ effect:fetch\ncommand -v dial\n```\n\n```nc:run capture:dial_ua validate:^nanoclaw/\\S+$ effect:fetch\nnode -p \"'nanoclaw/'+(require('./package.json').version||'unknown')\" 2>/dev/null || echo nanoclaw/unknown\n```\n\n## Choose the number\n\nList the account's current numbers:\n\n```nc:run capture:dial_numbers effect:fetch\nDIAL_USER_AGENT={{dial_ua}} \"{{dial_path}}\" number list --json | jq -r 'if (.numbers|length)==0 then \"none\" else [.numbers[].number] | join(\", \") end'\n```\n\nTell the operator what is available. Buying a number spends account funds, so\nleave that explicit: if they need a new one, they should purchase it with\n`dial number purchase --inbound-instruction \"…\" --explicit-programmatic-consent\n\"<account-holder consent attestation>\"`, then enter the returned number below.\n\n```nc:operator\nDial numbers on this account: {{dial_numbers}}. Choose one that is not already wired to NanoClaw. If you need a new number, purchase it first; this may charge the Dial account.\n```\n\n```nc:prompt platform_id validate:^[+][1-9]\\d{6,14}$ normalize:trim\nWhich Dial number should be added? Enter its E.164 value, for example +14155550123.\n```\n\nVerify that the chosen number belongs to the signed-in account:\n\n```nc:run effect:check\nDIAL_USER_AGENT={{dial_ua}} \"{{dial_path}}\" number list --json | jq -e --arg number '{{platform_id}}' '.numbers[] | select(.number==$number)' >/dev/null\n```\n\n## Choose the agent\n\nList the agent groups:\n\n```nc:run capture:agent_groups effect:fetch\nncl groups list --json | jq -r 'if (.data|length)==0 then \"no agent groups yet\" else [.data[] | \"\\(.id) (\\(.name))\"] | join(\", \") end'\n```\n\n```nc:operator\nAgent groups on this install: {{agent_groups}}.\n```\n\n```nc:prompt agent_group_id validate:^ag-[A-Za-z0-9-]+$ normalize:trim\nWhich agent group should answer this number? Enter its ag-… id.\n```\n\nReject a typo before creating anything:\n\n```nc:run effect:check\nncl groups list --json | jq -e --arg id '{{agent_group_id}}' '.data[] | select(.id==$id)' >/dev/null\n```\n\nChoose a safe display name and who may start conversations on this line.\n`strict` admits only known users; `public` lets anyone who knows the number reach\nthe agent. The choice belongs to this number and does not change existing lines:\n\n```nc:prompt line_name validate:^[A-Za-z0-9][A-Za-z0-9_.-]*(\\x20[A-Za-z0-9][A-Za-z0-9_.-]*)*$ normalize:trim\nWhat should this line be called? Use letters, numbers, spaces, dots, dashes, or underscores.\n```\n\n```nc:prompt inbound_access validate:^(strict|public)$ normalize:trim\nWho may text this line: strict or public?\n```\n\n## Wire the line\n\nCreate the threaded Dial messaging group. This is idempotent on the number, so\na re-run returns an existing row without resetting later policy changes:\n\n```nc:run effect:wire\nncl messaging-groups create --channel-type dial --platform-id {{platform_id}} --is-group 1 --name \"{{line_name}}\" --unknown-sender-policy {{inbound_access}}\n```\n\nWire it to the selected agent group. The adapter's declaration supplies the\nthread and engagement defaults:\n\n```nc:run effect:wire\nncl wirings create --channel-type dial --platform-id {{platform_id}} --agent-group-id {{agent_group_id}}\n```\n\n## Restart and verify\n\nRestart the service so the new line is picked up consistently:\n\n```nc:run effect:restart\nbash setup/lib/restart.sh\n```\n\nVerify the exact messaging-group and wiring pair exists:\n\n```nc:run effect:check\nmg=$(ncl messaging-groups list --json | jq -er --arg number '{{platform_id}}' '.data[] | select(.channel_type==\"dial\" and .platform_id==$number) | .id') && ncl wirings list --json | jq -e --arg mg \"$mg\" --arg ag '{{agent_group_id}}' '.data[] | select(.messaging_group_id==$mg and .agent_group_id==$ag)' >/dev/null\n```\n\nThe new number now reaches the selected agent as a separate threaded line, and\nreplies leave from the number that received the message. Existing lines are\nunchanged.\n\n## Troubleshooting\n\n- **The multi-number check fails** → run `/update-skills`, rebuild, and retry.\n- **The selected number is rejected** → sign in to the correct Dial account or\n  purchase the number first, then copy its exact E.164 value.\n- **New texts land in an old line or replies use the wrong number** → the running\n  service still has the old adapter; refresh it and restart again.\n- **New inbound events never arrive** → one `dial listen` daemon covers the\n  whole account; confirm `dial doctor --json` reports `listen.running: true` and\n  `dial local-target list --json` contains NanoClaw's command target.\n- **`ncl` errors** → the host service must be running; `ncl` connects over a\n  Unix socket.","author":"@nanocoai","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/nanocoai/nanoclaw/tree/main/.claude/skills/add-dial-number","license":"MIT","category":"testing","lang":"en","tokens":1466,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"apply-fixtures.json","size":1055,"sha256":"0cb3dc5e1ea697799f3b8c27c6b41f15759fb969f4e7f550211a660307ce1d98"}],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}