file-guardian

Creates automatic pre-change snapshots before destructive file or git operations.

37|4|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/MerkyorLynn/Lynn --skill file-guardian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-guardian
Source: https://github.com/MerkyorLynn/Lynn/tree/main/skills2set/file-guardian
Command: npx skills add https://github.com/MerkyorLynn/Lynn --skill file-guardian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents irreversible data loss by automatically snapshotting your workspace before the AI runs destructive file or version-control commands.

Core Features & Use Cases

  • Auto-snapshot on danger: Detects risky operations like rm -rf, git clean -fdx, git reset --hard, and destructive moves, then captures a restore point first.
  • Near zero disk overhead: Uses hardlink-based deduplication on macOS/Linux and mirroring on Windows to minimize snapshot storage costs.
  • One-command restore: Lets you list available snapshots and restore a chosen snapshot to recover files quickly after accidental deletions.

Use case example: If you ask the AI to “clean my project and remove build artifacts,” File Guardian will snapshot the workspace first so you can restore everything if the deletion scope is wrong.

Quick Start

Ask your AI agent to run the operation, such as “Before I delete dist/, protect my workspace by snapshotting and then proceed.”

Frequently Asked Questions about file-guardian

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

FAQPage Schema
How do I protect my workspace from accidental data loss when running destructive git commands?

Protect your workspace from accidental data loss by automatically snapshotting files before destructive git commands like git clean -fdx or git reset --hard execute. The snapshot creates a restore point first, preventing irreversible deletion.

Can I automatically snapshot files before running rm -rf to delete build artifacts?

Yes, you can automatically snapshot files before running rm -rf to delete build artifacts. The system detects risky deletion patterns and captures a workspace restore point first, allowing you to recover files if the deletion scope is incorrect.

Does workspace snapshotting work with hardlink deduplication on both macOS and Linux?

Workspace snapshotting works with hardlink deduplication on macOS and Linux to minimize disk overhead. Windows uses a mirroring approach instead, ensuring near zero storage costs across platforms while maintaining restore support.

How do I restore deleted project files from a workspace snapshot?

Restore deleted project files from a workspace snapshot by listing available restore points stored in ~/.lynn/snapshots. You select a chosen snapshot and execute a one-command restore to quickly recover files after accidental deletions.

What is the best way to prevent irreversible data loss during bulk file cleanup operations?

The best way to prevent irreversible data loss during bulk file cleanup is to detect danger-patterns in cleanup commands and capture an automatic pre-change snapshot. This creates a safety net before risky file operations modify your local project workspace.

Are there limitations when using workspace snapshots for local project disaster recovery?

Workspace snapshots for local project disaster recovery are limited to local storage in ~/.lynn/snapshots. The system requires danger-pattern detection to trigger automatically and relies on platform-specific hardlink or mirroring support for file restoration.