LLM Skills
~/catalogue/synthèse et résumé//SKILL

Ajouter Emacs

/SKILL

Ajouter Emacs en tant que canal. Ouvre un tampon de discussion interactif et permet l'intégration avec Org-mode afin que vous puissiez communiquer avec NanoClaw depuis Emacs (Doom, Spacemacs ou la

nanocoainanocoai
30.4k
21 juin 2026
MIT License
// contenu du skill

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.

Pre-flight (idempotent)

Skip to Enable if all of these are already in place:

  • src/channels/emacs.ts exists
  • src/channels/emacs.test.ts exists
  • src/channels/emacs-registration.test.ts exists
  • emacs/nanoclaw.el exists
  • src/channels/index.ts contains import './emacs.js';

Otherwise continue. Every step below is safe to re-run.

1. Fetch the channels branch

bash
git fetch origin channels

2. Copy the adapter and Lisp client

bash
mkdir -p emacs
git show origin/channels:src/channels/emacs.ts                    > src/channels/emacs.ts
git show origin/channels:src/channels/emacs.test.ts              > src/channels/emacs.test.ts
git show origin/channels:src/channels/emacs-registration.test.ts > src/channels/emacs-registration.test.ts
git show origin/channels:emacs/nanoclaw.el                        > emacs/nanoclaw.el

3. Append the self-registration import

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

typescript
import './emacs.js';

4. Build and validate

bash
pnpm run build
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.

Configure Emacs

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

AskUserQuestion: Which Emacs distribution are you using?

  • Doom Emacsconfig.el with map! keybindings
  • Spacemacsdotspacemacs/user-config in ~/.spacemacs
  • Vanilla Emacs / otherinit.el with global-set-key

**Doom E

// source originale publique
nanocoai/nanoclaw
/.claude/skills/add-emacs/SKILL.md
Licence : MIT License
Projet indépendant, non affilié à Anthropic. Ce skill reste la propriété de son auteur original.
// installer ce skill
Collez cette commande dans votre terminal à la racine de votre projet :
mkdir -p .claude/commands && curl -o ".claude/commands/SKILL.md" "https://raw.githubusercontent.com/nanocoai/nanoclaw/main/.claude/skills/add-emacs/SKILL.md"
Ensuite dans Claude Code, tapez /SKILL pour l'activer.
open_in_newVoir la source originale
// sauvegarder
Sauvegarde disponible après connexion.
loginSe connecter pour sauvegarder
// informations
Créateurnanocoai
Étoiles 30.4k
LicenceMIT License
Mis à jour21 juin 2026
Format.md
AccèsGratuit
// similaires

Skills Synthèse et résumé

Voir toutarrow_forward