← Back to Skills Marketplace
pitze

Agent Emacs

by Pi · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
496
Downloads
1
Stars
2
Active Installs
3
Versions
Install in OpenClaw
/install agent-emacs
Description
Unified persistent text-based environment for AI agents. Use when an agent needs to maintain state across sessions, perform structural code editing, or manag...
README (SKILL.md)

Agent Emacs: The Living Workspace

This skill provides a persistent, high-performance Emacs environment designed specifically for AI agents. It replaces fragmented CLI tools with a unified "Living Image" workflow.

Core Concepts

  1. The Daemon: All work happens inside a persistent Emacs daemon (emacs-agent.service).
  2. The Socket: Communication is handled via emacsclient -s /tmp/emacs0/server.
  3. Buffers as State: Files, terminal outputs, and remote connections are treated as persistent buffers. State is maintained between agent turns.

Operational Workflow

1. Structural Editing

Do not use regex for complex code changes. Use ELisp forms to manipulate the AST.

emacsclient -s /tmp/emacs0/server --eval "(with-current-buffer \"main.lisp\" (goto-char (point-max)) (insert \"\
(new-function)\"))"

2. Remote Infrastructure (TRAMP)

Manage remote nodes transparently. Opening a remote file automatically establishes a persistent SSH tunnel.

(find-file "/ssh:user@remote-node:/etc/config.json")

3. Project Management (Magit)

Use Magit for all Git operations to ensure high-integrity commits and staging.

Advanced Workflows

For detailed patterns on recursive data processing (RLM), memory management, and REPL-based accuracy, see:

Guaranteed Accuracy

Always use the Emacs Lisp REPL for math, data manipulation, or status calculations. Accuracy is paramount; do not attempt manual calculations.

Initialization

Run scripts/bootstrap.sh to ensure the daemon is active and the agent-init.el configuration is loaded.

Usage Guidance
Before installing or running this skill: - Inspect the missing asset: scripts/bootstrap.sh copies assets/agent-init.el, but that file isn't included. Do not run bootstrap until you have reviewed the agent-init.el that will become your ~/.emacs.d/init.el. - Review agent-init.el for any code that disables safety features (lockfile behavior, remote eval, package downloads, credential storage). - Understand and control SSH access: TRAMP will use whatever SSH keys/agent/socket are available to the user. If you do not want the agent to reach certain hosts, restrict or remove corresponding keys or limit TRAMP usage. - Treat the Emacs daemon as a persistent runtime that can hold secrets and open long-lived connections; consider running it in a confined environment or container if you need isolation. - If you need only local editing, disable or avoid the TRAMP workflows in the skill to reduce risk. - Because the package is missing assets, ask the publisher for the full package or source the agent-init.el yourself and audit it before proceeding.
Capability Analysis
Type: OpenClaw Skill Name: agent-emacs Version: 1.0.0 This skill is classified as suspicious due to its high-risk capabilities, which, while presented as intended functionality, could be exploited. The `scripts/bootstrap.sh` creates a persistent Emacs daemon and modifies the user's Emacs configuration. More critically, the `SKILL.md` and `references/usage.md` explicitly instruct the AI agent on how to establish arbitrary remote SSH connections via TRAMP and, crucially, how to execute arbitrary shell commands on those remote nodes using `(shell-command "...")`. This grants the agent remote code execution capabilities, which, combined with local file system write access (e.g., to `MEMORY.md` as instructed in `references/agent-workflows.md`), presents a significant attack surface if the agent's instructions are compromised.
Capability Assessment
Purpose & Capability
The name/description and the SKILL.md align: this is explicitly an Emacs-based persistent environment that will manage buffers, perform structural edits, and use TRAMP for remote files. However, the skill expects the operator to have SSH access to remote nodes (TRAMP workflows) even though no credentials or environment variables are declared and no guidance is provided about where keys come from. Also the bootstrap script copies assets/agent-init.el from an assets/ directory that is not present in the package — a functional mismatch.
Instruction Scope
The runtime instructions tell the agent to open TRAMP remote files and to run arbitrary shell commands (via (shell-command "...") in a remote buffer). That directly enables remote code execution and file access on hosts reachable via SSH. The SKILL.md also advises disabling Emacs lockfiles and spawning 'sub-agents' for chunk processing, which broadens the skill's operational scope beyond simple editing and increases risk of unexpected actions or resource contention.
Install Mechanism
There is no network install spec (this is instruction-only), and the only shipped executable is a small bootstrap script. That is low-risk from an installation-download standpoint. However, scripts/bootstrap.sh references assets/agent-init.el (it copies assets/agent-init.el to ~/.emacs.d/init.el) but the 'assets' directory and agent-init.el are not present in the provided file manifest — the bootstrap step will fail or behave unexpectedly unless the missing file is supplied.
Credentials
The skill declares no required environment variables or primary credential, yet its core functionality (TRAMP/SSH remote files and persistent daemon) implicitly requires SSH credentials or agent-forwarding to access remote hosts. The lack of declared credential requirements is an omission: users might inadvertently allow the agent to use existing SSH keys or agent sockets. The SKILL.md explicitly recommends running shell commands in remote buffers, which could access sensitive remote data without any additional safeguards.
Persistence & Privilege
The skill creates/uses a persistent Emacs daemon and treats buffers as long-lived state; this is consistent with the stated purpose but increases blast radius: an agent that lives in a daemon can retain secrets, open connections, and hold state across sessions. The skill does not set always:true and does not modify other skills' configs, which is appropriate, but you should be aware the daemon can maintain long-lived network sessions and in-memory data.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-emacs
  3. After installation, invoke the skill by name or use /agent-emacs
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
- No changes detected; this version is identical to the previous release. - No new features, fixes, or documentation updates were introduced.
v1.0.1
- No changes detected in this version. - Functionality and documentation remain the same as the previous release.
v1.0.0
- Initial release of agent-emacs, providing a unified, persistent Emacs environment for AI agents. - Maintains agent state across sessions via a persistent Emacs daemon. - Supports structural code editing, remote node management with TRAMP, and project management using Magit. - Buffers serve as persistent state containers for files, terminals, and remote connections. - Includes clear guidelines and example workflows for advanced coding and environment management.
Metadata
Slug agent-emacs
Version 1.0.0
License
All-time Installs 2
Active Installs 2
Total Versions 3
Frequently Asked Questions

What is Agent Emacs?

Unified persistent text-based environment for AI agents. Use when an agent needs to maintain state across sessions, perform structural code editing, or manag... It is an AI Agent Skill for Claude Code / OpenClaw, with 496 downloads so far.

How do I install Agent Emacs?

Run "/install agent-emacs" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Agent Emacs free?

Yes, Agent Emacs is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Agent Emacs support?

Agent Emacs is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Agent Emacs?

It is built and maintained by Pi (@pitze); the current version is v1.0.0.

💬 Comments