in-place-file-mutation

Installation
SKILL.md

In-Place Code Mutation (Zero-Tempfile Architecture)

Overview

A common anti-pattern in naive AI coding workflows is creating temporary sidecar duplicate files (auth_new.ts, server_temp.py, index.backup.js) with the intention of later swapping them with the original file.

Creating temporary sidecar files causes severe workflow hazards:

  1. Multi-Turn Cleanup Churn: Requires 3 to 4 turns (Write new file $\rightarrow$ Delete old file $\rightarrow$ Rename new file $\rightarrow$ Remove backup), wasting roundtrip tokens.
  2. Broken Module Resolution: Compilers and bundlers (tsc, vite, pytest) pick up the duplicate files, triggering duplicate identifier and conflicting route errors.
  3. Orphaned Garbage on Disk: If a task fails or aborts mid-stream, orphaned _temp files remain permanently committed to the repository.

The In-Place Code Mutation Protocol enforces direct, atomic file mutations in-place using replace_file_content or memory-buffered atomic filesystem writes.


Sidecar Tempfile Anti-Pattern vs. Direct In-Place Mutation

Installs
1
GitHub Stars
2
First Seen
Oct 23, 2026