1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
[[!meta title="emacs-claude-code: Intelligent Claude Integration for Emacs"]]
[[!meta copyright="Copyright © 2025 Yusuke Watanabe"]]
[[!inline pages="internal(2025/info/claude-code-nav)" raw="yes"]]
<!-- Initially generated with emacsconf-publish-talk-page and then left alone for manual editing -->
<!-- You can manually edit this file to update the abstract, add links, etc. --->
# emacs-claude-code: Intelligent Claude Integration for Emacs
Yusuke Watanabe (he/him) - Pronunciation: you-SKAY wah-tah-NAH-bay, GitHub: <https://github.com/ywatanabe1989/emacs-claude-code>, <mailto:ywatanabe@alumni.u-tokyo.ac.jp>
[[!inline pages="internal(2025/info/claude-code-before)" raw="yes"]]
As AI coding assistants become essential development tools, integrating
them seamlessly into our Emacs workflows becomes crucial. This talk
introduces emacs-claude-code, a package that transforms how Emacs users
interact with Claude Code through intelligent automation and enhanced vterm
integration.
The main challenge with terminal-based AI assistants is the repetitive
manual interaction required. Claude Code presents various prompts (Y/N
choices, waiting states, continuation prompts) that interrupt the
development flow. emacs-claude-code solves this by introducing smart
auto-response patterns that recognize Claude's state and respond
appropriately, allowing developers to maintain focus on their code rather
than managing the AI interface.
Key features I'll demonstrate include:
1. **Intelligent Auto-Response System**: Automatically handles Claude's various prompt states (INITIAL WAITING, Y/N, Y/Y/N, WAITING) with customizable responses. This allows uninterrupted AI-assisted coding sessions.
1. **Centralized Buffer Management**: A dashboard view of all Claude sessions showing their current state, auto-response status, and last interaction time. Users can quickly navigate between multiple AI conversations and toggle automation settings.
1. **Yank-as-File Functionality**: Elegantly handles large code snippets by saving them as files instead of cluttering the terminal, with full TRAMP support for remote development.
1. **Periodic Command Automation**: Executes custom commands at specified interaction intervals, perfect for maintaining context or triggering regular actions like compacting conversation history.
The package leverages Emacs' powerful vterm-mode to create a robust
integration layer. I'll share implementation details about state detection
using regular expressions, buffer management techniques, and the advice
system used for seamless clipboard integration.
Beyond the technical implementation, I'll discuss practical workflows that
emerge from this integration, including custom Claude commands (stored as
Markdown files) that can be triggered automatically based on context. The
talk will include a live demonstration showing how these features work
together to create a fluid AI-assisted development experience.
This project embodies the Emacs philosophy of extensibility and automation,
making cutting-edge AI tools work the way Emacs users expect - efficiently,
automatically, and under their complete control.
About the speaker:
I'm Yusuke Watanabe, a researcher who uses Emacs for both academic work and
software development. After experiencing friction with manual Claude Code
interactions, I developed emacs-claude-code to automate repetitive tasks
and integrate AI assistance smoothly into Emacs workflows. This project
represents my approach to making modern AI tools work within the Emacs
ecosystem while maintaining the editor's core principles of efficiency and
user control.
[[!inline pages="internal(2025/info/claude-code-after)" raw="yes"]]
[[!inline pages="internal(2025/info/claude-code-nav)" raw="yes"]]
|