file-safety
Skill3 starsChanged 9 months agoMITView on GitHub
Core file protection guardrails. Use when any file operation is about to happen — creating, editing, deleting, moving, renaming, or copying files. Enforces deletion approval, prevents direct overwrites, restricts operations to the working directory, requires bulk operation approval, defaults to read-only on uncertainty, protects hidden/system files, and logs all file operations to an activity log.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- MusserLab/lab-claude-skillstheir own version, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- MusserLab/lab-claude-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- backup-firstSkill
- dry-runSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
NEVER: delete any file without explicitly asking the user first.
- Distinctive: line 20
Before requesting permission, display:
- Distinctive: line 24
Wait for an explicit "yes", "go ahead", or "proceed" before deleting.
- Distinctive: line 25
If the user does not respond or says anything ambiguous, do not delete.
- Distinctive: line 30
Always create a backup copy first using a timestamp suffix.
- Distinctive: line 33
Only after the backup is confirmed should the original file be modified.
- Distinctive: line 38
If a task requires accessing files outside the working directory, ask for permission and explain why.
- Distinctive: line 42
Before any bulk operation touching more than 3 files, show the user a numbered list of ALL files that will be affected.
- Distinctive: line 51
Wait for explicit approval before proceeding.
- Distinctive: line 55
If there is any uncertainty about whether an operation should write, modify, or delete — default to READ-ONLY.
- Distinctive: line 56
Do not write anything until the intent is clear.
- Distinctive: line 62
If a task requires interacting with hidden/system files, flag it to the user first.
- Distinctive: line 71
Create the log file if it does not already exist.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
File Safety Guardrails
These rules are non-negotiable and apply to every file operation in every session.
Rules
1. No Deletions Without Permission
- NEVER delete any file without explicitly asking the user first.
- Before requesting permission, display:
- The full file name
- The complete file path
- A brief reason why deletion is being considered
- Wait for an explicit "yes", "go ahead", or "proceed" before deleting.
- If the user does not respond or says anything ambiguous, do not delete.
2. No Direct Overwrites
- NEVER overwrite an existing file directly.
- Always create a backup copy first using a timestamp suffix.
- Backup naming format:
originalname_YYYY-MM-DD_HHMM.ext- Example:
report_2026-02-09_1430.docx
- Example:
- Only after the backup is confirmed should the original file be modified.
3. Stay Within Bounds
- NEVER move files outside the folder the user granted access to.
- If a task requires accessing files outside the working directory, ask for permission and explain why.
4. Bulk Operation Approval
- Before any bulk operation touching more than 3 files, show the user a numbered list of ALL files that will be affected.
- Format:
This operation will affect the following files: 1. /path/to/file1.txt (action: modify) 2. /path/to/file2.txt (action: create) 3. /path/to/file3.txt (action: rename) 4. /path/to/file4.txt (action: modify) - Wait for explicit approval before proceeding.
5. Default to Read-Only
- If there is any uncertainty about whether an operation should write, modify, or delete — default to READ-ONLY.
- Do not write anything until the intent is clear.
6. Hands Off Hidden and System Files
- NEVER touch hidden files (anything starting with
.) unless the user explicitly asks. - NEVER touch system directories or system files.
- If a task requires interacting with hidden/system files, flag it to the user first.
7. Activity Logging
- Log every file operation in
_cowork_activity_log.mdat the root of the working folder. - Each log entry must include:
- Timestamp (YYYY-MM-DD HH:MM)
- Action (created, modified, deleted, moved, renamed, backed up)
- File path (full path of the affected file)
- Create the log file if it does not already exist.
Activation
This skill is always active. It applies to every file operation including creating, editing, deleting, moving, renaming, copying, and any bulk operations.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

