safe-edit
安全配置修改辅助技能 - 在修改重要配置文件前自动设置回滚,支持多平台(Linux/macOS/FreeBSD/Windows)
Why use this skill?
Automate file backups and scheduled rollbacks for OpenClaw. Prevent system crashes during config changes with safe-edit's cross-platform recovery mechanism.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ijevin/safe-editWhat This Skill Does
The safe-edit skill provides a robust safety net for OpenClaw when performing sensitive file operations. It acts as an automated backup and recovery manager specifically designed for critical configuration changes. Before any file modification occurs, safe-edit creates a temporary snapshot of the target file and schedules a timed rollback. If the AI fails to confirm the success of the operation within a 15-minute window, the system automatically restores the original configuration, preventing catastrophic service outages or broken system states. It is a cross-platform solution ensuring stability across Linux, macOS, FreeBSD, and Windows environments.
Installation
To install this skill, use the OpenClaw package manager:
clawhub install openclaw/skills/skills/ijevin/safe-edit
Once installed, ensure the script located at /root/.openclaw/scripts/safe-edit.sh has the necessary execute permissions.
Use Cases
This skill is indispensable for system administration and OpenClaw autonomous maintenance. Use it when:
- Editing core service configurations (e.g., nginx.conf, docker-compose.yml).
- Updating user-defined environment variables or credential files.
- Modifying crontab entries or system-level automation scripts.
- Adjusting OpenClaw's own internal json configuration files.
- Performing any high-risk file write operations where a syntax error could cause a service crash.
Example Prompts
- "I need to update the database port in my config file, please help me edit it safely."
- "Could you modify the crontab to change the execution frequency of my daily backup task?"
- "I need to update the nginx configuration; please use safe-edit to ensure I don't break the server."
Tips & Limitations
- Mandatory Confirmation: Always invoke
safe-edit confirmimmediately after verifying that your configuration changes work as expected to prevent unnecessary rollbacks. - Timing Window: The default rollback window is 15 minutes. For complex edits that might take longer, ensure you are aware of the timer.
- Dependency Requirement: This skill relies on the presence of the
atcommand on Linux/FreeBSD platforms. Ensure theatdaemon is enabled on your host system for full automation functionality. On Windows, ensure you have sufficient permissions to modify scheduled tasks viaschtasks.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ijevin-safe-edit": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution