scratch-file-isolation
Installation
SKILL.md
Scratch Directory Isolation & Ephemeral Artifact Quarantine
Overview
When agents create temporary helper scripts (e.g., a one-off database migration verification, a JSON test payload generator, or an AST refactoring script), creating these files directly inside src/ or the project root causes severe operational hazards.
Root and source directory pollution causes:
- Test Runner Collisions: Test runners (
jest,pytest,cargo test) automatically discover and attempt to execute.scratch.jsortest_temp.pyfiles, causing false-positive CI failures. - Git Status Token Flooding:
git statusoutputs 15 untracked scratch files, burning context tokens on every subsequent git check. - Accidental Production Commits: Orphaned scratch scripts get inadvertently staged and committed to production repositories.
The Scratch Directory Isolation Protocol establishes a dedicated, strictly ignored scratch/ sandbox for all temporary scripts and diagnostic artifacts.