Agent skill

Emacs Channel for NanoClaw

by nanocoai in nanocoai/nanoclaw

Lets you chat with NanoClaw from Emacs through a local HTTP bridge, with a chat buffer and org-mode commands that put replies inline.

MITAuto-check: notesProductivity & Automation

Install Emacs Channel for NanoClaw

skills CLI
$ npx skills add nanocoai/nanoclaw --skill add-emacs -a claude-code

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

GitHub CLI
$ gh skill install nanocoai/nanoclaw add-emacs --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/add-emacs .claude/skills/add-emacs && 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
add-emacs
GitHub stars
31k
Token cost
~2.7k tokens
SKILL.md length
1,045 words
Files
2
Skills in repo
59
Repo updated
First seen
Licence
MIT

At a glance

Lets you chat with NanoClaw from Emacs through a local HTTP bridge, with a chat buffer and org-mode commands that put replies inline.

  • Works in 3 steps: Copy the adapter and Lisp client → Append the self-registration import → Build and validate
  • Asking an agent about code or an error without leaving Emacs
  • SKILL.md covers What you can do with this, Install, Enable and Wire the channel, plus 7 more sections
  • Calls pnpm, curl and node; needs EMACS_AUTH_TOKEN

What it does

This skill connects Emacs to NanoClaw over a local HTTP bridge, so no bot token or outside service is involved. It works with Doom Emacs, Spacemacs and vanilla Emacs 27.1 or newer. A chat buffer opens with `C-c n c`, or `SPC N c` in Doom, and `nanoclaw-org-send` sends a selected region or org entry, with the reply landing as a child heading right in the org file.

Typical uses are asking about a function without leaving the editor, getting a review of a selected region, turning an agenda entry into action items, revising draft prose in place and capturing research answers in notes. The adapter and a Lisp client are copied from the `channels` branch and use only Node's built-in `http`, so there is no npm dependency. The channel stays off until `EMACS_ENABLED` is set in `.env`, with optional `EMACS_CHANNEL_PORT` (default 8766) and `EMACS_AUTH_TOKEN` to lock the endpoint.

When your agent uses it

  • Asking an agent about code or an error without leaving Emacs
  • Sending an org-mode region for review, summary or revision
  • Capturing research answers directly inside org notes

Example prompts

  • “Add the Emacs channel to NanoClaw and enable it with an auth token.”
  • “Set up the Lisp client so I can send org regions with nanoclaw-org-send.”
  • “The Emacs bridge port is already in use. Change it and restart the channel.”

Requirements

  • A NanoClaw installation with pnpm
  • Emacs 27.1 or newer

Workflow steps

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

  1. Copy the adapter and Lisp client
  2. Append the self-registration import
  3. Build and validate

What it can do on your machine

Read from SKILL.md and the folder at commit af699e7. 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
    • curl
    • node

    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 curl, 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 these keys or tokens, usually read from environment variables:

    • EMACS_AUTH_TOKEN

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

Context cost

Emacs Channel for NanoClaw loads about 2.7k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 1,045 words of instructions outside code blocks.

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

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:57
    hosts that aren't running Emacs. Add to `.env`:
  • NoteMentions a .env fileSKILL.md:232
    # or set EMACS_CHANNEL_PORT in .env and mirror in Emacs config (nanoclaw-port)
  • NoteMentions a .env fileSKILL.md:237
    , check that `EMACS_ENABLED=true` is in `.env` and that the adapter import is present:
  • NoteMentions a .env fileSKILL.md:240
    grep -q '^EMACS_ENABLED=true' .env && echo "enabled" || echo "not enabled"
  • NoteMentions a .env fileSKILL.md:258
    Must match `EMACS_AUTH_TOKEN` in `.env`. If you didn't set one server-side, clear it in Emacs too:

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 af699e7, republished under its MIT licence (© nanocoai). 1,045 words, ~2,685 tokens.

Download SKILL.mdSave it as .claude/skills/add-emacs/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
add-emacs
description
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.

Add Emacs Channel

Adds Emacs support via a local HTTP bridge. Works with Doom Emacs, Spacemacs, and vanilla Emacs 27.1+.

What you can do with this

  • Ask while coding — open the chat buffer (C-c n c / SPC N c), ask about a function or error without leaving Emacs
  • Code review — select a region and send it with nanoclaw-org-send; the response appears as a child heading inline in your org file
  • Meeting notes — send an org agenda entry; get a summary or action item list back as a child node
  • Draft writing — send org prose; receive revisions or continuations in place
  • Research capture — ask a question directly in your org notes; the answer lands exactly where you need it

Install

NanoClaw 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.

1. Copy the adapter and Lisp client

Fetch the channels branch from the configured remote that carries it, then overwrite the skill-owned files with the canonical registry copies:

nccopy
src/channels/emacs.ts
src/channels/emacs.test.ts
src/channels/emacs-registration.test.ts
emacs/nanoclaw.el
2. Append the self-registration import

Append to src/channels/index.ts (skip if the line is already present):

ncappend
import './emacs.js';
3. Build and validate
ncrun
pnpm run build
ncrun
pnpm exec vitest run src/channels/emacs-registration.test.ts

Both must be clean before proceeding. emacs-registration.test.ts is the one integration test: it imports the real channel barrel and asserts the registry contains emacs. It goes red if the import './emacs.js'; line is deleted or drifts, or if the barrel fails to evaluate (so the channel genuinely would not register). The adapter uses only Node builtins (http), so there is no npm dependency to guard for this channel.

End-to-end message delivery from a real Emacs buffer is verified manually once the service is running — see Verify and Troubleshooting.

Enable

The adapter is gated by EMACS_ENABLED so the HTTP port isn't opened on hosts that aren't running Emacs. Add to .env:

bash
EMACS_ENABLED=true
EMACS_CHANNEL_PORT=8766       # optional — change only if 8766 is taken
EMACS_AUTH_TOKEN=             # optional — set to a random string to lock the endpoint
EMACS_PLATFORM_ID=default     # optional — only change if you want a non-default chat id

Generate an auth token (recommended even on single-user machines — prevents other local processes from poking the endpoint):

bash
node -e "console.log(require('crypto').randomBytes(16).toString('hex'))"

Wire the channel

Emacs is a single-user, single-chat channel. One host = one messaging group with platform_id = "default".

If this is your first agent group

Run /init-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.

Otherwise — wire to an existing agent group

Run the register step directly. The EMACS_PLATFORM_ID (default default) becomes the messaging group's platform id:

bash
pnpm exec tsx setup/index.ts --step register -- \
  --platform-id "default" --name "Emacs" \
  --folder "<existing-folder>" --channel "emacs" \
  --session-mode "agent-shared" \
  --assistant-name "<existing-assistant-name>"

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.

Alternatively create the rows with ncl — the host service must be running (ncl connects to it over a Unix socket). Engage mode/pattern and unknown_sender_policy default to the Emacs adapter's declared channel defaults:

bash
ncl messaging-groups create --channel-type emacs --platform-id "default" --name "Emacs"
ncl wirings create --messaging-group-id <mg-id-from-above> --agent-group-id <ag-id> \
  --session-mode agent-shared

Configure Emacs

nanoclaw.el needs only Emacs 27.1+ builtins (url, json, org) — no package manager.

AskUserQuestion: Which Emacs distribution are you using?

  • Doom Emacs — config.el with map! keybindings
  • Spacemacs — dotspacemacs/user-config in ~/.spacemacs
  • Vanilla Emacs / other — init.el with global-set-key

Doom Emacs — add to ~/.config/doom/config.el (or ~/.doom.d/config.el):

elisp
;; NanoClaw — personal AI assistant channel
(load (expand-file-name "~/src/nanoclaw/emacs/nanoclaw.el"))

(map! :leader
      :prefix ("N" . "NanoClaw")
      :desc "Chat buffer"  "c" #'nanoclaw-chat
      :desc "Send org"     "o" #'nanoclaw-org-send)

Reload: M-x doom/reload

Spacemacs — add to dotspacemacs/user-config in ~/.spacemacs:

elisp
;; NanoClaw — personal AI assistant channel
(load-file "~/src/nanoclaw/emacs/nanoclaw.el")

(spacemacs/set-leader-keys "aNc" #'nanoclaw-chat)
(spacemacs/set-leader-keys "aNo" #'nanoclaw-org-send)

Reload: M-x dotspacemacs/sync-configuration-layers or restart Emacs.

Vanilla Emacs — add to ~/.emacs.d/init.el:

elisp
;; NanoClaw — personal AI assistant channel
(load-file "~/src/nanoclaw/emacs/nanoclaw.el")

(global-set-key (kbd "C-c n c") #'nanoclaw-chat)
(global-set-key (kbd "C-c n o") #'nanoclaw-org-send)

Reload: M-x eval-buffer or restart Emacs.

Replace ~/src/nanoclaw/emacs/nanoclaw.el with your actual NanoClaw checkout path.

If EMACS_AUTH_TOKEN is set, also add (any distribution):

elisp
(setq nanoclaw-auth-token "<your-token>")

If you changed EMACS_CHANNEL_PORT from the default:

elisp
(setq nanoclaw-port <your-port>)

Restart NanoClaw

Run from your NanoClaw project root:

bash
pnpm run build
source setup/lib/install-slug.sh
launchctl kickstart -k gui/$(id -u)/$(launchd_label)   # macOS
# systemctl --user restart $(systemd_unit)             # Linux

Verify

HTTP endpoint
bash
curl -s http://localhost:8766/api/messages?since=0

Expected: {"messages":[]}. With an auth token:

bash
curl -s -H "Authorization: Bearer <token>" http://localhost:8766/api/messages?since=0
Show full SKILL.md (441 more words)Show less
From Emacs

Tell the user:

  1. Open the chat buffer with your keybinding (SPC N c, SPC a N c, or C-c n c)
  2. Type a message and press C-c C-c to send (RET inserts newlines)
  3. A response should appear within a few seconds

For org-mode: open any .org file, position the cursor on a heading, and use SPC N o / SPC a N o / C-c n o

Log line

tail -f logs/nanoclaw.log should show Emacs channel listening at startup.

Channel Info

  • type: emacs
  • terminology: Single local buffer. There are no "groups" or separate chats — one host = one chat, addressed by a platform_id string (default default).
  • 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:<username>).
  • supports-threads: no
  • typical-use: Single developer talking to the assistant from within Emacs, alongside whatever other channel they use (Slack, Telegram, Discord).
  • 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.
Features
  • Interactive chat buffer (nanoclaw-chat) with markdown → org-mode rendering
  • Org integration (nanoclaw-org-send) — sends the current subtree or region; reply lands as a child heading
  • Optional bearer-token auth for the local endpoint
  • Single-user: the adapter exposes exactly one messaging group per host

Not applicable (design): multi-user channels, threads, cold DM initiation, typing indicators, attachments.

Troubleshooting

Port already in use
Error: listen EADDRINUSE: address already in use :::8766

Either a stale NanoClaw is running or another app has the port. Kill stale process or change port:

bash
lsof -ti :8766 | xargs kill -9
# or set EMACS_CHANNEL_PORT in .env and mirror in Emacs config (nanoclaw-port)
Adapter not starting

If grep "Emacs channel listening" logs/nanoclaw.log returns nothing, check that EMACS_ENABLED=true is in .env and that the adapter import is present:

bash
grep -q '^EMACS_ENABLED=true' .env && echo "enabled" || echo "not enabled"
grep -q "import './emacs.js'" src/channels/index.ts && echo "imported" || echo "not imported"
No response from agent
  1. NanoClaw running: launchctl list | grep "$(. setup/lib/install-slug.sh && launchd_label)" (macOS) / systemctl --user status "$(. setup/lib/install-slug.sh && systemd_unit)" (Linux)
  2. Messaging group wired: pnpm exec tsx scripts/q.ts data/v2.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'"
  3. Logs show inbound: grep 'channel_type=emacs\|Emacs' logs/nanoclaw.log | tail -20

If no messaging group row exists, run the register command above.

Auth token mismatch (401 Unauthorized)
elisp
M-x describe-variable RET nanoclaw-auth-token RET

Must match EMACS_AUTH_TOKEN in .env. If you didn't set one server-side, clear it in Emacs too:

elisp
(setq nanoclaw-auth-token nil)
nanoclaw.el not loading
bash
ls ~/src/nanoclaw/emacs/nanoclaw.el

If NanoClaw is cloned elsewhere, update the load/load-file path in your Emacs config.

Agent Formatting

The Emacs bridge converts markdown → org-mode automatically. Agents should output standard markdown, not org-mode syntax:

MarkdownOrg-mode
**bold***bold*
*italic*/italic/
~~text~~+text+
`code`~code~
```lang#+begin_src lang

If an agent outputs org-mode directly, markers get double-converted and render incorrectly.

Removal

See REMOVE.md to uninstall this channel.

© 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

SKILL.md and 1 other file in .claude/skills/add-emacs of nanocoai/nanoclaw.

  • SKILL.md
  • REMOVE.md

Open the folder on GitHubat commit af699e7

Compare with similar skills

Emacs Channel for NanoClaw 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.

Emacs Channel for NanoClaw compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Emacs Channel for NanoClaw this skillnanocoai/nanoclaw31k—~2.7kAutomated safety check: NotesMIT
Greenbubbles Personal Memorybojieli/greenbubbles365—~669Automated safety check: PassMIT
Web To Markdownrookie-ricardo/erduo-skills935—~894Automated safety check: PassMIT
Traul Message Searchdandaka/traul112—~3.9kAutomated safety check: NotesAGPL-3.0
Wechat Article Extractorzhuzhaoyun/Molio433—~486Automated safety check: PassCustom licence
Feishu Docopenclaw/openclaw392k—~516Automated safety check: PassMIT

Similar skills

  • Greenbubbles Personal Memory

    bojieli/greenbubbles

    Build or revise private, cited Markdown notes from the user's WeChat history in the current agent session.

    365 GitHub stars~669 tokensUpdated 7 days ago
    Knowledge ManagementAuto-check passed
  • Web To Markdown

    rookie-ricardo/erduo-skills

    Convert a web URL into cleaned Markdown with deterministic routing.

    935 GitHub stars~894 tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed
  • Drives the traul CLI to sync, search and monitor messages from Slack, Telegram, Discord, Linear, Gmail, WhatsApp, Claude Code sessions and Markdown files.

    112 GitHub stars~3.9k tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check: notes
  • Wechat Article Extractor

    zhuzhaoyun/Molio

    提取微信公众号文章(mp.weixin.qq.com)内容为 Markdown。遇到 mp.weixin.qq.com 链接时使用此 skill,禁止使用 WebFetch。

    433 GitHub stars~486 tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Feishu Doc

    openclaw/openclaw

    Feishu document read/write workflows. An agent skill from openclaw/openclaw.

    392k GitHub stars~516 tokensUpdated today
    Productivity & AutomationAuto-check passed
  • She Love Me

    863401402/she-love-me

    Acquire, import, and analyze WeChat or QQ chat histories, including installing supported exporters, guiding required login or contact selection, converting exports, assessing relationship dynamics…

    931 GitHub starsUsed in 1 repo~1.3k tokens
    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
  • 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
  • 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 2 repos~1.6k tokens
    Auto-check passed
  • Add Dial Tool

    nanocoai/nanoclaw

    Installs the `dial` CLI and a credential in NanoClaw agent containers so chosen agents can send SMS, place AI voice calls and receive verification codes.

    31k GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • 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 stars~1.5k tokensUpdated today
    Auto-check passed

Questions about Emacs Channel for NanoClaw

What does Emacs Channel for NanoClaw do?

Lets you chat with NanoClaw from Emacs through a local HTTP bridge, with a chat buffer and org-mode commands that put replies inline. This skill connects Emacs to NanoClaw over a local HTTP bridge, so no bot token or outside service is involved.1 or newer.

When should I use Emacs Channel for NanoClaw?

Emacs Channel for NanoClaw fits situations like: asking an agent about code or an error without leaving Emacs; sending an org-mode region for review, summary or revision; capturing research answers directly inside org notes.

How do I install Emacs Channel for NanoClaw in Claude Code?

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

How do I install Emacs Channel for NanoClaw in Codex?

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

Can I use Emacs Channel for NanoClaw 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 add-emacs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-emacs, .gemini/skills/add-emacs, .github/skills/add-emacs and .opencode/skills/add-emacs in your project.

What does Emacs Channel for NanoClaw need to run?

Going by SKILL.md and its folder, Emacs Channel for NanoClaw needs the command-line tools its instructions call (pnpm, curl and node) and credentials named EMACS_AUTH_TOKEN. Our summary lists: A NanoClaw installation with pnpm; Emacs 27.1 or newer.

Does Emacs Channel for NanoClaw access the network?

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

Is Emacs Channel for NanoClaw 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 Emacs Channel for NanoClaw use?

Emacs Channel for NanoClaw 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 Emacs Channel for NanoClaw use?

About 2.7k tokens (SKILL.md is roughly 11k 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 Emacs Channel for NanoClaw?

Skills that share tags, products or a category with Emacs Channel for NanoClaw: Greenbubbles Personal Memory (bojieli/greenbubbles, 365 stars), Web To Markdown (rookie-ricardo/erduo-skills, 935 stars), Traul Message Search (dandaka/traul, 112 stars) and Wechat Article Extractor (zhuzhaoyun/Molio, 433 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Emacs Channel for NanoClaw?

nanocoai (a GitHub organization) maintains it in nanocoai/nanoclaw, which has 30,906 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on October 9, 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.