atomic-fs

Perform atomic file writes, safe moves, and soft deletions to prevent data loss.

Updated Feb 15, 2026
One-click install
npx skills add https://github.com/reynalivan/EMMM2 --skill atomic-fs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: atomic-fs
Source: https://github.com/reynalivan/EMMM2/tree/main/.agent/skills/atomic-fs
Command: npx skills add https://github.com/reynalivan/EMMM2 --skill atomic-fs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces zero data loss across common file operations by providing safe-rename, soft-delete, and atomic-write capabilities.

Core Features & Use Cases

  • Safe Rename / Move: Move a file to a new location without risking loss if the destination operation fails.
  • Soft Delete: Move deleted items to system trash instead of permanent removal to preserve recoverability.
  • Atomic Write: Write configuration or data atomically by writing to a temporary file and then renaming.

Quick Start

Use atomic-fs to perform an atomic write by writing to a .tmp file and then renaming it to the target file.

Frequently Asked Questions about atomic-fs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform an atomic write for configuration files in Rust?

This approach guarantees that the original file remains intact if the write operation fails, preserving data safety.

What is a soft delete strategy for file operations?

A soft delete strategy moves deleted items to the system trash instead of permanently removing them, preserving recoverability and enforcing zero data loss.

How does safe rename prevent data loss when moving files?

Safe rename prevents data loss by implementing checks-before-write and transactional moves, ensuring a file is not lost if the destination operation fails.

What's the best way to ensure zero data loss during file moves in Rust?

The best way to ensure zero data loss is enforcing transactional moves with clear user-friendly error messages, verifying destination operations before completing the move.

Can I use atomic write capabilities across different mod workflows?

Yes, atomic write, safe rename, and soft delete capabilities can be applied across mod workflows to ensure consistency and recoverability for file operations.

Why do I need checks-before-write for file I/O operations?

Checks-before-write are needed to meet reliability requirements, enforcing transactional moves and atomic writes that prevent partial writes and data corruption.