[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69A3EY3ER7DRNP9CM07EM8D":3,"skill-same:01M69A3EY3ER7DRNP9CM07EM8D":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":21,"linkOnly":22,"markdownContent":23,"markdownBody":24,"frontMatter":25,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M69A3EY3ER7DRNP9CM07EM8D","add-emacs",null,"Add Emacs as a channel. Opens an interactive chat buffer and org-mode integration so you can talk to NanoClaw from within Emacs (Doom, Spacemacs, or vanilla). Local HTTP bridge — no bot token or external service needed.","microsoft\u002Famplifier-app-nanoclaw","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69A31J3GTKVZDZZVPRQWWR5",5,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-nanoclaw\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fadd-emacs\u002FSKILL.md",[],[19,20],"add emacs","bot","2026-11-10 10:12:30",false,"---\nname: add-emacs\ndescription: Add Emacs as a channel. Opens an interactive chat buffer and org-mode integration so you can talk to NanoClaw from within Emacs (Doom, Spacemacs, or vanilla). Local HTTP bridge — no bot token or external service needed.\n---\n\n# Add Emacs Channel\n\nAdds Emacs support via a local HTTP bridge. Works with Doom Emacs, Spacemacs, and vanilla Emacs 27.1+.\n\n## What you can do with this\n\n- **Ask while coding** — open the chat buffer (`C-c n c` \u002F `SPC N c`), ask about a function or error without leaving Emacs\n- **Code review** — select a region and send it with `nanoclaw-org-send`; the response appears as a child heading inline in your org file\n- **Meeting notes** — send an org agenda entry; get a summary or action item list back as a child node\n- **Draft writing** — send org prose; receive revisions or continuations in place\n- **Research capture** — ask a question directly in your org notes; the answer lands exactly where you need it\n\n## Install\n\nNanoClaw doesn't ship channels in trunk. This skill copies the Emacs adapter and the Lisp client in from the `channels` branch. Native HTTP bridge — no Chat SDK, no adapter package.\n\n### Pre-flight (idempotent)\n\nSkip to **Enable** if all of these are already in place:\n\n- `src\u002Fchannels\u002Femacs.ts` exists\n- `emacs\u002Fnanoclaw.el` exists\n- `src\u002Fchannels\u002Findex.ts` contains `import '.\u002Femacs.js';`\n\nOtherwise continue. Every step below is safe to re-run.\n\n### 1. Fetch the channels branch\n\n```bash\ngit fetch origin channels\n```\n\n### 2. Copy the adapter and Lisp client\n\n```bash\nmkdir -p emacs\ngit show origin\u002Fchannels:src\u002Fchannels\u002Femacs.ts      > src\u002Fchannels\u002Femacs.ts\ngit show origin\u002Fchannels:src\u002Fchannels\u002Femacs.test.ts > src\u002Fchannels\u002Femacs.test.ts\ngit show origin\u002Fchannels:emacs\u002Fnanoclaw.el          > emacs\u002Fnanoclaw.el\n```\n\n### 3. Append the self-registration import\n\nAppend to `src\u002Fchannels\u002Findex.ts` (skip if the line is already present):\n\n```typescript\nimport '.\u002Femacs.js';\n```\n\n### 4. Build\n\n```bash\npnpm run build\n```\n\nNo npm package to install — the adapter uses only Node builtins (`http`).\n\n## Enable\n\nThe adapter is gated by `EMACS_ENABLED` so the HTTP port isn't opened on hosts that aren't running Emacs. Add to `.env`:\n\n```bash\nEMACS_ENABLED=true\nEMACS_CHANNEL_PORT=8766       # optional — change only if 8766 is taken\nEMACS_AUTH_TOKEN=             # optional — set to a random string to lock the endpoint\nEMACS_PLATFORM_ID=default     # optional — only change if you want a non-default chat id\n```\n\nGenerate an auth token (recommended even on single-user machines — prevents other local processes from poking the endpoint):\n\n```bash\nnode -e \"console.log(require('crypto').randomBytes(16).toString('hex'))\"\n```\n\n## Wire the channel\n\nEmacs is a single-user, single-chat channel. One host = one messaging group with `platform_id = \"default\"`.\n\n### If this is your first agent group\n\nRun `\u002Finit-first-agent` — pick **Emacs** as the channel, use any short handle as the \"user id\" (e.g. your OS username), and the skill will create the agent group, wire the channel, and write a welcome message that the agent delivers back to your Emacs buffer.\n\n### Otherwise — wire to an existing agent group\n\nRun the `register` step directly. The `EMACS_PLATFORM_ID` (default `default`) becomes the messaging group's platform id:\n\n```bash\npnpm exec tsx setup\u002Findex.ts --step register -- \\\n  --platform-id \"default\" --name \"Emacs\" \\\n  --folder \"\u003Cexisting-folder>\" --channel \"emacs\" \\\n  --session-mode \"agent-shared\" \\\n  --assistant-name \"\u003Cexisting-assistant-name>\"\n```\n\n`agent-shared` puts Emacs messages in the same session as any other channel wired to the same agent group — so a conversation you started in Telegram continues in Emacs. Use `shared` to keep an independent Emacs thread with the same workspace, or a new `--folder` for a dedicated Emacs-only agent.\n\n## Configure Emacs\n\n`nanoclaw.el` needs only Emacs 27.1+ builtins (`url`, `json`, `org`) — no package manager.\n\nAskUserQuestion: Which Emacs distribution are you using?\n- **Doom Emacs** — `config.el` with `map!` keybindings\n- **Spacemacs** — `dotspacemacs\u002Fuser-config` in `~\u002F.spacemacs`\n- **Vanilla Emacs \u002F other** — `init.el` with `global-set-key`\n\n**Doom Emacs** — add to `~\u002F.config\u002Fdoom\u002Fconfig.el` (or `~\u002F.doom.d\u002Fconfig.el`):\n\n```elisp\n;; NanoClaw — personal AI assistant channel\n(load (expand-file-name \"~\u002Fsrc\u002Fnanoclaw\u002Femacs\u002Fnanoclaw.el\"))\n\n(map! :leader\n      :prefix (\"N\" . \"NanoClaw\")\n      :desc \"Chat buffer\"  \"c\" #'nanoclaw-chat\n      :desc \"Send org\"     \"o\" #'nanoclaw-org-send)\n```\n\nReload: `M-x doom\u002Freload`\n\n**Spacemacs** — add to `dotspacemacs\u002Fuser-config` in `~\u002F.spacemacs`:\n\n```elisp\n;; NanoClaw — personal AI assistant channel\n(load-file \"~\u002Fsrc\u002Fnanoclaw\u002Femacs\u002Fnanoclaw.el\")\n\n(spacemacs\u002Fset-leader-keys \"aNc\" #'nanoclaw-chat)\n(spacemacs\u002Fset-leader-keys \"aNo\" #'nanoclaw-org-send)\n```\n\nReload: `M-x dotspacemacs\u002Fsync-configuration-layers` or restart Emacs.\n\n**Vanilla Emacs** — add to `~\u002F.emacs.d\u002Finit.el`:\n\n```elisp\n;; NanoClaw — personal AI assistant channel\n(load-file \"~\u002Fsrc\u002Fnanoclaw\u002Femacs\u002Fnanoclaw.el\")\n\n(global-set-key (kbd \"C-c n c\") #'nanoclaw-chat)\n(global-set-key (kbd \"C-c n o\") #'nanoclaw-org-send)\n```\n\nReload: `M-x eval-buffer` or restart Emacs.\n\nReplace `~\u002Fsrc\u002Fnanoclaw\u002Femacs\u002Fnanoclaw.el` with your actual NanoClaw checkout path.\n\nIf `EMACS_AUTH_TOKEN` is set, also add (any distribution):\n\n```elisp\n(setq nanoclaw-auth-token \"\u003Cyour-token>\")\n```\n\nIf you changed `EMACS_CHANNEL_PORT` from the default:\n\n```elisp\n(setq nanoclaw-port \u003Cyour-port>)\n```\n\n## Restart NanoClaw\n\nRun from your NanoClaw project root:\n\n```bash\npnpm run build\nsource setup\u002Flib\u002Finstall-slug.sh\nlaunchctl kickstart -k gui\u002F$(id -u)\u002F$(launchd_label)   # macOS\n# systemctl --user restart $(systemd_unit)             # Linux\n```\n\n## Verify\n\n### HTTP endpoint\n\n```bash\ncurl -s http:\u002F\u002Flocalhost:8766\u002Fapi\u002Fmessages?since=0\n```\n\nExpected: `{\"messages\":[]}`. With an auth token:\n\n```bash\ncurl -s -H \"Authorization: Bearer \u003Ctoken>\" http:\u002F\u002Flocalhost:8766\u002Fapi\u002Fmessages?since=0\n```\n\n### From Emacs\n\nTell the user:\n\n> 1. Open the chat buffer with your keybinding (`SPC N c`, `SPC a N c`, or `C-c n c`)\n> 2. Type a message and press `C-c C-c` to send (RET inserts newlines)\n> 3. A response should appear within a few seconds\n>\n> For org-mode: open any `.org` file, position the cursor on a heading, and use `SPC N o` \u002F `SPC a N o` \u002F `C-c n o`\n\n### Log line\n\n`tail -f logs\u002Fnanoclaw.log` should show `Emacs channel listening` at startup.\n\n## Channel Info\n\n- **type**: `emacs`\n- **terminology**: Single local buffer. There are no \"groups\" or separate chats — one host = one chat, addressed by a `platform_id` string (default `default`).\n- **how-to-find-id**: The platform id is whatever you set in `EMACS_PLATFORM_ID` (default `default`). User handles are arbitrary; your OS username or first name is fine (e.g. `emacs:\u003Cusername>`).\n- **supports-threads**: no\n- **typical-use**: Single developer talking to the assistant from within Emacs, alongside whatever other channel they use (Slack, Telegram, Discord).\n- **default-isolation**: Same agent group as the primary DM, with `session-mode = agent-shared` so a conversation started elsewhere continues in Emacs. Pick a separate folder only if you specifically want an Emacs-only persona.\n\n### Features\n\n- Interactive chat buffer (`nanoclaw-chat`) with markdown → org-mode rendering\n- Org integration (`nanoclaw-org-send`) — sends the current subtree or region; reply lands as a child heading\n- Optional bearer-token auth for the local endpoint\n- Single-user: the adapter exposes exactly one messaging group per host\n\nNot applicable (design): multi-user channels, threads, cold DM initiation, typing indicators, attachments.\n\n## Troubleshooting\n\n### Port already in use\n\n```\nError: listen EADDRINUSE: address already in use :::8766\n```\n\nEither a stale NanoClaw is running or another app has the port. Kill stale process or change port:\n\n```bash\nlsof -ti :8766 | xargs kill -9\n# or set EMACS_CHANNEL_PORT in .env and mirror in Emacs config (nanoclaw-port)\n```\n\n### Adapter not starting\n\nIf `grep \"Emacs channel listening\" logs\u002Fnanoclaw.log` returns nothing, check that `EMACS_ENABLED=true` is in `.env` and that the adapter import is present:\n\n```bash\ngrep -q '^EMACS_ENABLED=true' .env && echo \"enabled\" || echo \"not enabled\"\ngrep -q \"import '.\u002Femacs.js'\" src\u002Fchannels\u002Findex.ts && echo \"imported\" || echo \"not imported\"\n```\n\n### No response from agent\n\n1. NanoClaw running: `launchctl list | grep \"$(. setup\u002Flib\u002Finstall-slug.sh && launchd_label)\"` (macOS) \u002F `systemctl --user status \"$(. setup\u002Flib\u002Finstall-slug.sh && systemd_unit)\"` (Linux)\n2. Messaging group wired: `pnpm exec tsx scripts\u002Fq.ts data\u002Fv2.db \"SELECT mg.platform_id, ag.folder FROM messaging_groups mg JOIN messaging_group_agents mga ON mg.id = mga.messaging_group_id JOIN agent_groups ag ON ag.id = mga.agent_group_id WHERE mg.channel_type = 'emacs'\"`\n3. Logs show inbound: `grep 'channel_type=emacs\\|Emacs' logs\u002Fnanoclaw.log | tail -20`\n\nIf no messaging group row exists, run the `register` command above.\n\n### Auth token mismatch (401 Unauthorized)\n\n```elisp\nM-x describe-variable RET nanoclaw-auth-token RET\n```\n\nMust match `EMACS_AUTH_TOKEN` in `.env`. If you didn't set one server-side, clear it in Emacs too:\n\n```elisp\n(setq nanoclaw-auth-token nil)\n```\n\n### nanoclaw.el not loading\n\n```bash\nls ~\u002Fsrc\u002Fnanoclaw\u002Femacs\u002Fnanoclaw.el\n```\n\nIf NanoClaw is cloned elsewhere, update the `load`\u002F`load-file` path in your Emacs config.\n\n## Agent Formatting\n\nThe Emacs bridge converts markdown → org-mode automatically. Agents should output standard markdown, **not** org-mode syntax:\n\n| Markdown | Org-mode |\n|----------|----------|\n| `**bold**` | `*bold*` |\n| `*italic*` | `\u002Fitalic\u002F` |\n| `~~text~~` | `+text+` |\n| `` `code` `` | `~code~` |\n| ` ```lang ` | `#+begin_src lang` |\n\nIf an agent outputs org-mode directly, markers get double-converted and render incorrectly.\n\n## Removal\n\nRun from your NanoClaw project root:\n\n```bash\nrm src\u002Fchannels\u002Femacs.ts src\u002Fchannels\u002Femacs.test.ts emacs\u002Fnanoclaw.el\n# Remove the `import '.\u002Femacs.js';` line from src\u002Fchannels\u002Findex.ts\n# Remove EMACS_* lines from .env\npnpm run build\nsource setup\u002Flib\u002Finstall-slug.sh\nlaunchctl kickstart -k gui\u002F$(id -u)\u002F$(launchd_label)   # macOS\n# systemctl --user restart $(systemd_unit)             # Linux\n\n# Remove the NanoClaw block from your Emacs config\n# Optionally clean up the messaging group:\npnpm exec tsx scripts\u002Fq.ts data\u002Fv2.db \"DELETE FROM messaging_group_agents WHERE messaging_group_id IN (SELECT id FROM messaging_groups WHERE channel_type='emacs'); DELETE FROM messaging_groups WHERE channel_type='emacs';\"\n```\n","# Add Emacs Channel\n\nAdds Emacs support via a local HTTP bridge. Works with Doom Emacs, Spacemacs, and vanilla Emacs 27.1+.\n\n## What you can do with this\n\n- **Ask while coding** — open the chat buffer (`C-c n c` \u002F `SPC N c`), ask about a function or error without leaving Emacs\n- **Code review** — select a region and send it with `nanoclaw-org-send`; the response appears as a child heading inline in your org file\n- **Meeting notes** — send an org agenda entry; get a summary or action item list back as a child node\n- **Draft writing** — send org prose; receive revisions or continuations in place\n- **Research capture** — ask a question directly in your org notes; the answer lands exactly where you need it\n\n## Install\n\nNanoClaw doesn't ship channels in trunk. This skill copies the Emacs adapter and the Lisp client in from the `channels` branch. Native HTTP bridge — no Chat SDK, no adapter package.\n\n### Pre-flight (idempotent)\n\nSkip to **Enable** if all of these are already in place:\n\n- `src\u002Fchannels\u002Femacs.ts` exists\n- `emacs\u002Fnanoclaw.el` exists\n- `src\u002Fchannels\u002Findex.ts` contains `import '.\u002Femacs.js';`\n\nOtherwise continue. Every step below is safe to re-run.\n\n### 1. Fetch the channels branch\n\n```bash\ngit fetch origin channels\n```\n\n### 2. Copy the adapter and Lisp client\n\n```bash\nmkdir -p emacs\ngit show origin\u002Fchannels:src\u002Fchannels\u002Femacs.ts      > src\u002Fchannels\u002Femacs.ts\ngit show origin\u002Fchannels:src\u002Fchannels\u002Femacs.test.ts > src\u002Fchannels\u002Femacs.test.ts\ngit show origin\u002Fchannels:emacs\u002Fnanoclaw.el          > emacs\u002Fnanoclaw.el\n```\n\n### 3. Append the self-registration import\n\nAppend to `src\u002Fchannels\u002Findex.ts` (skip if the line is already present):\n\n```typescript\nimport '.\u002Femacs.js';\n```\n\n### 4. Build\n\n```bash\npnpm run build\n```\n\nNo npm package to install — the adapter uses only Node builtins (`http`).\n\n## Enable\n\nThe adapter is gated by `EMACS_ENABLED` so the HTTP port isn't opened on hosts that aren't running Emacs. Add to `.env`:\n\n```bash\nEMACS_ENABLED=true\nEMACS_CHANNEL_PORT=8766       # optional — change only if 8766 is taken\nEMACS_AUTH_TOKEN=             # optional — set to a random string to lock the endpoint\nEMACS_PLATFORM_ID=default     # optional — only change if you want a non-default chat id\n```\n\nGenerate an auth token (recommended even on single-user machines — prevents other local processes from poking the endpoint):\n\n```bash\nnode -e \"console.log(require('crypto').randomBytes(16).toString('hex'))\"\n```\n\n## Wire the channel\n\nEmacs is a single-user, single-chat channel. One host = one messaging group with `platform_id = \"default\"`.\n\n### If this is your first agent group\n\nRun `\u002Finit-first-agent` — pick **Emacs** as the channel, use any short handle as the \"user id\" (e.g. your OS username), and the skill will create the agent group, wire the channel, and write a welcome message that the agent delivers back to your Emacs buffer.\n\n### Otherwise — wire to an existing agent group\n\nRun the `register` step directly. The `EMACS_PLATFORM_ID` (default `default`) becomes the messaging group's platform id:\n\n```bash\npnpm exec tsx setup\u002Findex.ts --step register -- \\\n  --platform-id \"default\" --name \"Emacs\" \\\n  --folder \"\u003Cexisting-folder>\" --channel \"emacs\" \\\n  --session-mode \"agent-shared\" \\\n  --assistant-name \"\u003Cexisting-assistant-name>\"\n```\n\n`agent-shared` puts Emacs messages in the same session as any other channel wired to the same agent group — so a conversation you started in Telegram continues in Emacs. Use `shared` to keep an independent Emacs thread with the same workspace, or a new `--folder` for a dedicated Emacs-only agent.\n\n## Configure Emacs\n\n`nanoclaw.el` needs only Emacs 27.1+ builtins (`url`, `json`, `org`) — no package manager.\n\nAskUserQuestion: Which Emacs distribution are you using?\n- **Doom Emacs** — `config.el` with `map!` keybindings\n- **Spacemacs** — `dotspacemacs\u002Fuser-config` in `~\u002F.spacemacs`\n- **Vanilla Emacs \u002F other** — `init.el` with `global-set-key`\n\n**Doom Emacs** — add to `~\u002F.config\u002Fdoom\u002Fconfig.el` (or `~\u002F.doom.d\u002Fconfig.el`):\n\n```elisp\n;; NanoClaw — personal AI assistant channel\n(load (expand-file-name \"~\u002Fsrc\u002Fnanoclaw\u002Femacs\u002Fnanoclaw.el\"))\n\n(map! :leader\n      :prefix (\"N\" . \"NanoClaw\")\n      :desc \"Chat buffer\"  \"c\" #'nanoclaw-chat\n      :desc \"Send org\"     \"o\" #'nanoclaw-org-send)\n```\n\nReload: `M-x doom\u002Freload`\n\n**Spacemacs** — add to `dotspacemacs\u002Fuser-config` in `~\u002F.spacemacs`:\n\n```elisp\n;; NanoClaw — personal AI assistant channel\n(load-file \"~\u002Fsrc\u002Fnanoclaw\u002Femacs\u002Fnanoclaw.el\")\n\n(spacemacs\u002Fset-leader-keys \"aNc\" #'nanoclaw-chat)\n(spacemacs\u002Fset-leader-keys \"aNo\" #'nanoclaw-org-send)\n```\n\nReload: `M-x dotspacemacs\u002Fsync-configuration-layers` or restart Emacs.\n\n**Vanilla Emacs** — add to `~\u002F.emacs.d\u002Finit.el`:\n\n```elisp\n;; NanoClaw — personal AI assistant channel\n(load-file \"~\u002Fsrc\u002Fnanoclaw\u002Femacs\u002Fnanoclaw.el\")\n\n(global-set-key (kbd \"C-c n c\") #'nanoclaw-chat)\n(global-set-key (kbd \"C-c n o\") #'nanoclaw-org-send)\n```\n\nReload: `M-x eval-buffer` or restart Emacs.\n\nReplace `~\u002Fsrc\u002Fnanoclaw\u002Femacs\u002Fnanoclaw.el` with your actual NanoClaw checkout path.\n\nIf `EMACS_AUTH_TOKEN` is set, also add (any distribution):\n\n```elisp\n(setq nanoclaw-auth-token \"\u003Cyour-token>\")\n```\n\nIf you changed `EMACS_CHANNEL_PORT` from the default:\n\n```elisp\n(setq nanoclaw-port \u003Cyour-port>)\n```\n\n## Restart NanoClaw\n\nRun from your NanoClaw project root:\n\n```bash\npnpm run build\nsource setup\u002Flib\u002Finstall-slug.sh\nlaunchctl kickstart -k gui\u002F$(id -u)\u002F$(launchd_label)   # macOS\n# systemctl --user restart $(systemd_unit)             # Linux\n```\n\n## Verify\n\n### HTTP endpoint\n\n```bash\ncurl -s http:\u002F\u002Flocalhost:8766\u002Fapi\u002Fmessages?since=0\n```\n\nExpected: `{\"messages\":[]}`. With an auth token:\n\n```bash\ncurl -s -H \"Authorization: Bearer \u003Ctoken>\" http:\u002F\u002Flocalhost:8766\u002Fapi\u002Fmessages?since=0\n```\n\n### From Emacs\n\nTell the user:\n\n> 1. Open the chat buffer with your keybinding (`SPC N c`, `SPC a N c`, or `C-c n c`)\n> 2. Type a message and press `C-c C-c` to send (RET inserts newlines)\n> 3. A response should appear within a few seconds\n>\n> For org-mode: open any `.org` file, position the cursor on a heading, and use `SPC N o` \u002F `SPC a N o` \u002F `C-c n o`\n\n### Log line\n\n`tail -f logs\u002Fnanoclaw.log` should show `Emacs channel listening` at startup.\n\n## Channel Info\n\n- **type**: `emacs`\n- **terminology**: Single local buffer. There are no \"groups\" or separate chats — one host = one chat, addressed by a `platform_id` string (default `default`).\n- **how-to-find-id**: The platform id is whatever you set in `EMACS_PLATFORM_ID` (default `default`). User handles are arbitrary; your OS username or first name is fine (e.g. `emacs:\u003Cusername>`).\n- **supports-threads**: no\n- **typical-use**: Single developer talking to the assistant from within Emacs, alongside whatever other channel they use (Slack, Telegram, Discord).\n- **default-isolation**: Same agent group as the primary DM, with `session-mode = agent-shared` so a conversation started elsewhere continues in Emacs. Pick a separate folder only if you specifically want an Emacs-only persona.\n\n### Features\n\n- Interactive chat buffer (`nanoclaw-chat`) with markdown → org-mode rendering\n- Org integration (`nanoclaw-org-send`) — sends the current subtree or region; reply lands as a child heading\n- Optional bearer-token auth for the local endpoint\n- Single-user: the adapter exposes exactly one messaging group per host\n\nNot applicable (design): multi-user channels, threads, cold DM initiation, typing indicators, attachments.\n\n## Troubleshooting\n\n### Port already in use\n\n```\nError: listen EADDRINUSE: address already in use :::8766\n```\n\nEither a stale NanoClaw is running or another app has the port. Kill stale process or change port:\n\n```bash\nlsof -ti :8766 | xargs kill -9\n# or set EMACS_CHANNEL_PORT in .env and mirror in Emacs config (nanoclaw-port)\n```\n\n### Adapter not starting\n\nIf `grep \"Emacs channel listening\" logs\u002Fnanoclaw.log` returns nothing, check that `EMACS_ENABLED=true` is in `.env` and that the adapter import is present:\n\n```bash\ngrep -q '^EMACS_ENABLED=true' .env && echo \"enabled\" || echo \"not enabled\"\ngrep -q \"import '.\u002Femacs.js'\" src\u002Fchannels\u002Findex.ts && echo \"imported\" || echo \"not imported\"\n```\n\n### No response from agent\n\n1. NanoClaw running: `launchctl list | grep \"$(. setup\u002Flib\u002Finstall-slug.sh && launchd_label)\"` (macOS) \u002F `systemctl --user status \"$(. setup\u002Flib\u002Finstall-slug.sh && systemd_unit)\"` (Linux)\n2. Messaging group wired: `pnpm exec tsx scripts\u002Fq.ts data\u002Fv2.db \"SELECT mg.platform_id, ag.folder FROM messaging_groups mg JOIN messaging_group_agents mga ON mg.id = mga.messaging_group_id JOIN agent_groups ag ON ag.id = mga.agent_group_id WHERE mg.channel_type = 'emacs'\"`\n3. Logs show inbound: `grep 'channel_type=emacs\\|Emacs' logs\u002Fnanoclaw.log | tail -20`\n\nIf no messaging group row exists, run the `register` command above.\n\n### Auth token mismatch (401 Unauthorized)\n\n```elisp\nM-x describe-variable RET nanoclaw-auth-token RET\n```\n\nMust match `EMACS_AUTH_TOKEN` in `.env`. If you didn't set one server-side, clear it in Emacs too:\n\n```elisp\n(setq nanoclaw-auth-token nil)\n```\n\n### nanoclaw.el not loading\n\n```bash\nls ~\u002Fsrc\u002Fnanoclaw\u002Femacs\u002Fnanoclaw.el\n```\n\nIf NanoClaw is cloned elsewhere, update the `load`\u002F`load-file` path in your Emacs config.\n\n## Agent Formatting\n\nThe Emacs bridge converts markdown → org-mode automatically. Agents should output standard markdown, **not** org-mode syntax:\n\n| Markdown | Org-mode |\n|----------|----------|\n| `**bold**` | `*bold*` |\n| `*italic*` | `\u002Fitalic\u002F` |\n| `~~text~~` | `+text+` |\n| `` `code` `` | `~code~` |\n| ` ```lang ` | `#+begin_src lang` |\n\nIf an agent outputs org-mode directly, markers get double-converted and render incorrectly.\n\n## Removal\n\nRun from your NanoClaw project root:\n\n```bash\nrm src\u002Fchannels\u002Femacs.ts src\u002Fchannels\u002Femacs.test.ts emacs\u002Fnanoclaw.el\n# Remove the `import '.\u002Femacs.js';` line from src\u002Fchannels\u002Findex.ts\n# Remove EMACS_* lines from .env\npnpm run build\nsource setup\u002Flib\u002Finstall-slug.sh\nlaunchctl kickstart -k gui\u002F$(id -u)\u002F$(launchd_label)   # macOS\n# systemctl --user restart $(systemd_unit)             # Linux\n\n# Remove the NanoClaw block from your Emacs config\n# Optionally clean up the messaging group:\npnpm exec tsx scripts\u002Fq.ts data\u002Fv2.db \"DELETE FROM messaging_group_agents WHERE messaging_group_id IN (SELECT id FROM messaging_groups WHERE channel_type='emacs'); DELETE FROM messaging_groups WHERE channel_type='emacs';\"\n```\n",{"name":5,"description":7},"main","85a2d934766d21e4696ac1b00157179f28bca9e3",".claude\u002Fskills\u002Fadd-emacs",2,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-nanoclaw","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-10-30 04:24:16",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add microsoft\u002Famplifier-app-nanoclaw --skill add-emacs",{"tool":41,"command":42},"bunx","bunx skills add microsoft\u002Famplifier-app-nanoclaw --skill add-emacs",{"tool":44,"command":45},"pnpm","pnpm dlx skills add microsoft\u002Famplifier-app-nanoclaw --skill add-emacs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-nanoclaw\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fadd-emacs\u002FSKILL.md",true,[],[50,59,66,77,91,104],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":21},"01M69A6E27JZN10H82TZ2GMC3A","whatsapp-formatting","Format messages for WhatsApp, including mentions that render as real WhatsApp tags. Use when responding in a WhatsApp conversation (platform_id \u002F chatJid ends with @s.whatsapp.net or @g.us).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-nanoclaw\u002Fblob\u002Fmain\u002Fcontainer\u002Fskills\u002Fwhatsapp-formatting\u002FSKILL.md",[],[57,58],"whatsapp","whatsapp formatting",{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":21},"01M69A6CGJ968RNVGYTRSWZKWB","welcome","Introduce yourself to a newly connected channel. Triggered automatically when a channel is first wired. Send a friendly greeting and brief overview of what you can do.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-nanoclaw\u002Fblob\u002Fmain\u002Fcontainer\u002Fskills\u002Fwelcome\u002FSKILL.md",[],[61],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":21},"01M69A6ADX690STSN63WKRD37K","vercel-cli","Deploy apps to Vercel. Use when asked to deploy, ship, or publish a web application, or manage Vercel projects, domains, and environment variables.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-nanoclaw\u002Fblob\u002Fmain\u002Fcontainer\u002Fskills\u002Fvercel-cli\u002FSKILL.md",[],[73,74,75,76],"cli","vercel cli","web","deploy",{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":88,"publishedAt":21},"01M69A68WJ94V4MXGXGK9T0QG7","slack-formatting","Format messages for Slack using mrkdwn syntax. Use when responding to Slack channels (folder starts with \"slack_\" or JID contains slack identifiers).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-nanoclaw\u002Fblob\u002Fmain\u002Fcontainer\u002Fskills\u002Fslack-formatting\u002FSKILL.md",[83],{"categoryNo":84,"categoryName":85,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000005","邮件与沟通","SCENARIO","使用场景",[89,90],"slack","slack formatting",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":100,"publishedAt":21},"01M69A673Z17TDXK3DBC5YJFM7","self-customize","Customize your own agent — add capabilities, install packages, add MCP servers, edit code or CLAUDE.md. Use when the user asks you to add a feature, install a tool, or modify how you work. For non-trivial code changes, delegate to a builder agent via create_agent.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-nanoclaw\u002Fblob\u002Fmain\u002Fcontainer\u002Fskills\u002Fself-customize\u002FSKILL.md",[97],{"categoryNo":98,"categoryName":99,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000023","Skill与智能体开发",[101,102,103],"customize","self customize","MCP",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":111,"publishedAt":21},"01M69A657JFNEG45Z1Y05BVK5R","onecli-gateway","OneCLI Gateway: transparent HTTPS proxy that injects stored credentials into outbound calls. You MUST use this skill when the user asks you to read emails, check calendar, access GitHub repos, create issues, check Stripe payments, or interact with ANY external service or API. Do NOT use browser extensions or OAuth CLI tools. Make HTTP requests directly; the gateway injects credentials automatically.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-nanoclaw\u002Fblob\u002Fmain\u002Fcontainer\u002Fskills\u002Fonecli-gateway\u002FSKILL.md",[110],{"categoryNo":98,"categoryName":99,"taxonomyType":86,"taxonomyTypeDesc":87},[112,73,113,114],"onecli gateway","github","repos"]