← 返回 Skills 市场
153
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install safe-file-editor
功能描述
安全文件编辑器,支持4眼原则预览确认,原子备份与回滚,避免误操作覆盖及注入风险,保障文件编辑安全可靠。
安全使用建议
This skill appears to implement what it claims: preview-only edits, atomic backup, commit, and rollback, with no network calls or credentials required. Before installing or using it: 1) Review or change the backup/log directory to a location you control (the code uses ~/.openclaw/... by default; SKILL.md documents a different default), and ensure those files have restricted permissions because logs and backups can contain sensitive content. 2) Test on non-production files to confirm behavior (the diff is a simple replacement summary, not a full diff). 3) Be aware the tool can modify any file the running agent/user has permission to write — grant access only where appropriate. 4) Consider fixing small robustness issues (e.g., potential undefined backup_path on certain exceptions) before trusting it in critical environments.
功能分析
Type: OpenClaw Skill
Name: safe-file-editor
Version: 1.0.0
The 'safe-file-editor' skill is designed to enhance security during file modifications by implementing a '4-eye principle' (preview before execution), atomic writes, and automatic backups. The implementation in safe_file_editor.py follows these safety protocols using standard Python libraries, and the SKILL.md instructions explicitly guide the AI agent to require user confirmation and perform dry runs, with no evidence of data exfiltration or malicious execution.
能力评估
Purpose & Capability
The name/description (safe file editing, dry-run, backups, rollback, two-person confirmation) align with the included code and SKILL.md. The skill only requires file read/write operations and logging which are appropriate for this purpose. Minor inconsistency: SKILL.md documents a BACKUP_DIR default of `tmp/file-backups/` but the code uses a fixed default under Path.home()/.openclaw/.../tmp/file-backups.
Instruction Scope
SKILL.md instructs the agent to only preview (dry_run) and require user confirmation before commit, which the code enforces via the dry_run flag. The code only reads/writes local files and logs; it does not access network or other unrelated system secrets. Notes: the produced 'diff' is a simple replace-summary (not a true line-by-line diff) which may underrepresent changes; logs record change snippets and filenames which could expose sensitive content if logs are not protected.
Install Mechanism
There is no install spec or external download; this is instruction-only with an included Python file. No external packages or network downloads are performed by the code.
Credentials
No environment variables or external credentials are requested. The skill writes backups and audit logs under the user's home directory (~/.openclaw/...), which is proportionate to its function but means backups and logs may contain sensitive data — users should ensure those files are stored and permissioned appropriately.
Persistence & Privilege
The skill is not always-enabled and does not request persistent platform-wide privileges. It creates and writes files in the user's home directory (backups and logs) which is expected behavior for this tool.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install safe-file-editor - 安装完成后,直接呼叫该 Skill 的名称或使用
/safe-file-editor触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
基于Claude Code SedEdit安全设计的4眼原则文件编辑器
元数据
常见问题
安全文件编辑器 是什么?
安全文件编辑器,支持4眼原则预览确认,原子备份与回滚,避免误操作覆盖及注入风险,保障文件编辑安全可靠。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 153 次。
如何安装 安全文件编辑器?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install safe-file-editor」即可一键安装,无需额外配置。
安全文件编辑器 是免费的吗?
是的,安全文件编辑器 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
安全文件编辑器 支持哪些平台?
安全文件编辑器 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 安全文件编辑器?
由 suda6632(@suda6632)开发并维护,当前版本 v1.0.0。
推荐 Skills