← Back to Skills Marketplace
153
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install safe-file-editor
Description
安全文件编辑器,支持4眼原则预览确认,原子备份与回滚,避免误操作覆盖及注入风险,保障文件编辑安全可靠。
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install safe-file-editor - After installation, invoke the skill by name or use
/safe-file-editor - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
基于Claude Code SedEdit安全设计的4眼原则文件编辑器
Metadata
Frequently Asked Questions
What is 安全文件编辑器?
安全文件编辑器,支持4眼原则预览确认,原子备份与回滚,避免误操作覆盖及注入风险,保障文件编辑安全可靠。 It is an AI Agent Skill for Claude Code / OpenClaw, with 153 downloads so far.
How do I install 安全文件编辑器?
Run "/install safe-file-editor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 安全文件编辑器 free?
Yes, 安全文件编辑器 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 安全文件编辑器 support?
安全文件编辑器 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 安全文件编辑器?
It is built and maintained by suda6632 (@suda6632); the current version is v1.0.0.
More Skills