agentleFS
jitanguptajitangupta/file-safety-guard/skills/file-safety/SKILL.md

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

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    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.

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
  1. Distinctive:

    NEVER: delete any file without explicitly asking the user first.

    line 19
  2. Distinctive:

    Before requesting permission, display:

    line 20
  3. Distinctive:

    Wait for an explicit "yes", "go ahead", or "proceed" before deleting.

    line 24
  4. Distinctive:

    If the user does not respond or says anything ambiguous, do not delete.

    line 25
  5. Distinctive:

    Always create a backup copy first using a timestamp suffix.

    line 30
  6. Distinctive:

    Only after the backup is confirmed should the original file be modified.

    line 33
  7. Distinctive:

    If a task requires accessing files outside the working directory, ask for permission and explain why.

    line 38
  8. Distinctive:

    Before any bulk operation touching more than 3 files, show the user a numbered list of ALL files that will be affected.

    line 42
  9. Distinctive:

    Wait for explicit approval before proceeding.

    line 51
  10. Distinctive:

    If there is any uncertainty about whether an operation should write, modify, or delete — default to READ-ONLY.

    line 55
  11. Distinctive:

    Do not write anything until the intent is clear.

    line 56
  12. Distinctive:

    If a task requires interacting with hidden/system files, flag it to the user first.

    line 62
  13. Distinctive:

    Create the log file if it does not already exist.

    line 71

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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
  • 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.md at 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.