ワンクリックで
self-compact
Workaround for Claude Code auto-compact bug. Self-compact via Emacs MCP server.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Workaround for Claude Code auto-compact bug. Self-compact via Emacs MCP server.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Master index of all available skills for development workflows. Use when needing guidance on which skill to apply or when starting work on any project.
Master index of all available skills for development workflows. Use when needing guidance on which skill to apply or when starting work on any project.
Autonomous work mode — never ask user to run commands, never stand by, always take next action. Use when working independently on tasks.
Claude Code setup and configuration reference. Skills, commands, hooks, MCP servers, CLI, and permissions.
Code audit, cleanup, refactoring, API minimization, test review, examples, and project evaluation. Use when reviewing code quality or preparing for release.
Core development philosophy including development cycles, naming conventions, architectural decisions, and multi-agent workflows. Use when establishing project foundations or making architectural decisions.
| name | self-compact |
| description | Workaround for Claude Code auto-compact bug. Self-compact via Emacs MCP server. |
When auto-compact fails (recent Claude Code bug), compact context yourself:
Find your vterm buffer name:
mcp__emacs-server__eval_elisp: (mapcar #'buffer-name (buffer-list))
Look for a buffer matching <project>-<digits>-<digits>-<digits>-<digits>
Send /compact + follow-up in ONE call with delays:
mcp__emacs-server__eval_elisp:
code: |
(let ((buf (get-buffer "<your-vterm-buffer-name>")))
(when (and buf (buffer-live-p buf))
(with-current-buffer buf
(vterm-send-string "/compact")
(vterm-send-return)
(sit-for 2)
(vterm-send-string "continue")
(vterm-send-return)
(list :success t :commands-sent 2))))
Use eval_elisp with sit-for to send sequential commands:
(let ((buf (get-buffer "BUFFER-NAME")))
(with-current-buffer buf
(vterm-send-string "COMMAND-1")
(vterm-send-return)
(sit-for DELAY-SECONDS)
(vterm-send-string "COMMAND-2")
(vterm-send-return)
(sit-for DELAY-SECONDS)
(vterm-send-string "COMMAND-3")
(vterm-send-return)))
(sit-for 1) = 1 second delay(sit-for 2) = 2 second delay(let ((buf (get-buffer "BUFFER-NAME")))
(with-current-buffer buf
(vterm-send-string "/mcp reconnect scitex")
(vterm-send-return)))
list_vterm_buffers may fail with vterm--process-alive-p error — use eval_elisp insteadlist_buffers may return empty — use eval_elisp with (buffer-list) directly