← 返回 Skills 市场
pitze

Agent Emacs

作者 Pi · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
496
总下载
1
收藏
2
当前安装
3
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (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.

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-emacs
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-emacs 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug agent-emacs
版本 1.0.0
许可证
累计安装 2
当前安装数 2
历史版本数 3
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 496 次。

如何安装 Agent Emacs?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-emacs」即可一键安装,无需额外配置。

Agent Emacs 是免费的吗?

是的,Agent Emacs 完全免费(开源免费),可自由下载、安装和使用。

Agent Emacs 支持哪些平台?

Agent Emacs 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Emacs?

由 Pi(@pitze)开发并维护,当前版本 v1.0.0。

💬 留言讨论