file-safety

Enforce safe file editing rules to prevent overwriting or deletion.

2|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/MusserLab/lab-claude-skills --skill file-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-safety
Source: https://github.com/MusserLab/lab-claude-skills/tree/main/skills/file-safety
Command: npx skills add https://github.com/MusserLab/lab-claude-skills --skill file-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

File modification rules prevent overwriting important files and data, ensuring safe edits in scripts and projects.

Core Features & Use Cases

  • Never overwrite files from collaborators or original data.
  • Create a new file with an updated name instead of overwriting an existing one.
  • Ask the user before modifying if uncertain, especially for protected directories like data/ and outs/.
  • Provides guidance for moving or renaming files that other scripts depend on.

Quick Start

Ask the user before modifying any file if unsure and create a new file with an updated name instead of overwriting.

Frequently Asked Questions about file-safety

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

FAQPage Schema
How do I prevent scripts from accidentally overwriting original data files?

Safe editing rules prevent accidental file modification by prohibiting unsafe overwrites in protected directories like data/ and outs/, requiring explicit user confirmation when uncertain, and allowing new files with updated names instead of overwriting existing ones.

What is the best way to protect important files during automated edits?

Protecting important files during automated edits involves enforcing overwrite protection rules that block modifications to original data, prompt for user confirmation when uncertain, and require creating new files with updated names instead of overwriting existing ones.

How do I safely rename or move files that other scripts depend on?

Safely renaming or moving files that other scripts depend on requires applying file safety rules that provide guidance for dependent file operations and enforce explicit user confirmation to prevent breaking script dependencies within data/ or outs/ directories.

Can I edit files in protected directories without explicit user confirmation?

Editing files in protected directories without explicit user confirmation is not allowed when uncertain, as safe editing rules enforce user confirmation for modifications within data/ and outs/ to ensure data integrity and prevent accidental deletion or overwrites.

When do I need explicit user confirmation for file modifications?

Explicit user confirmation for file modifications is needed when overwriting existing files, deleting data, or moving and renaming files within protected directories like data/ and outs/ that other scripts depend on, ensuring safe editing and data integrity.

Does overwrite protection block new file creation in data directories?

Overwrite protection does not block new file creation in data directories, as safe editing rules prohibit unsafe overwrites of existing files while explicitly allowing the creation of new files with updated names to preserve original data.