- Home
- Skills
- Agents & Orchestration
- Repair Atomic File Replace Bugs
Works with the AI tools you already use
Repair Atomic File Replace Bugs
Repair atomic file replacement bugs that expose partial content, cross filesystems, lose metadata, or overstate durability.
$8.99
Repair Atomic File Replace Bugs
Example session with this skill installed
Our Python service rewrites config.json by opening the live file with "w" and json.dump(). Concurrent readers sometimes see empty or partial JSON, and a crash can leave the service unable to start. Repair the repository using a disposable directory and injected write/flush/replace failures. Preserve the existing file mode and current durability requirement, do not touch real configuration files, and do not claim universal power-loss safety.
- Read your context and instructions
- Compiled the repair atomic file
Unsafe publication path found. The writer truncates the live configuration before serialization completes, so concurrent readers can observe empty or partial JSON. The repair writes a same-directory staged file, validates and closes it, applies the repository sync contract, replaces through a platform adapter, preserves required mode metadata, and tests every failure boundary without claiming universal power-loss durability.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
The problem
File writers often truncate live targets before new content is ready, leading to corrupted manifests, empty configs, or partial caches during crashes. Developers frequently struggle with cross-platform rename semantics and stale temporary files that leak after process failures.
What it does
- Identifies unsafe truncation and cross-filesystem staging that breaks atomic visibility.
- Implements same-directory staging to ensure
renameoperations are atomic. - Standardizes platform-specific replacement behavior between POSIX and Windows.
- Adds explicit flush, sync, and parent-directory synchronization points for durability.
- Automates stale temporary file cleanup and adds deterministic fault-injection tests.
Frameworks & tools
Works with any language using standard filesystem APIs (Node.js fs, Python os/pathlib, Rust std::fs, Go os). Uses Read, Edit, and Bash tools.
Why this beats prompting it yourself
Generic LLMs often suggest simple rename calls without accounting for cross-device links, Windows file locking, or metadata preservation. This skill enforces a strict publication contract that separates staged content from published paths, preventing data corruption patterns that manual code reviews miss.
Use cases
- Preventing partial writes in JSON configuration or state files.
- Managing atomic updates for high-frequency cache and artifact generation.
- Fixing platform-inconsistent file replacement bugs in CLI tools.
- Implementing robust crash recovery for local file-based databases or manifests.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 1 month ago
- Passed all security checks, Safe to install