Claude Code Vigil — Claude Code plugin: file snapshots and recovery
claude-vigil creates file snapshots before destructive operations, shows what changed, and restores safely. Protection against accidental deletion or overwriting.
MIT ★ 78 updated 2026-03-05
/plugin marketplace add Vvkmnn/claude-emporium
/plugin install claude-vigil@claude-emporiumWhat claude-vigil does
Claude Vigil intercepts dangerous bash commands—deletion, file moves, git resets—and auto-creates snapshots beforehand. If something breaks, roll files back to the state before the operation.
The plugin works through the claude-vigil-mcp MCP server, storing snapshots locally in .claude/vigil/ within your project. You get 3 named checkpoints plus one rotating quicksave slot. Before restore, you can preview a diff to see exactly what changed since the snapshot was taken.
Requires claude-vigil-mcp: run claude mcp add vigil -- npx claude-vigil-mcp. Auto-save is on by default but can be disabled in ~/.claude/settings.json if it slows your workflow.
What it helps with
- undo file deletion or overwriting accidents
- see what changed in your code over time
- create a safe point before a risky operation
- compare current code against a saved snapshot without losing originals
Example prompts for the agent
- Save a checkpoint before removing an old module:
/save-vigil backup-module - Preview what changed since the snapshot:
/vigil_diff backup-module - Restore files to a saved state:
/restore-vigil backup-module
How to install claude-vigil
Plugin marketplace
/plugin marketplace add Vvkmnn/claude-emporium/plugin install claude-vigil@claude-emporiumStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about claude-vigil
How do I install claude-vigil in Claude Code?
Run /plugin marketplace add Vvkmnn/claude-emporium, then /plugin install claude-vigil@claude-emporium. After that, add the MCP server: claude mcp add vigil -- npx claude-vigil-mcp.
What does claude-vigil do?
It creates file snapshots before risky operations like deletion, moves, or git resets, then lets you restore them. You can preview diffs and keep up to 3 named checkpoints.
Can I turn off auto-save?
Yes. Set auto_quicksave: false in ~/.claude/settings.json under claude-emporium > claude-vigil.
Source text
claude-vigil · MIT
# Claude Vigil
File checkpoint and recovery for Claude Code. Saves snapshots before destructive operations, diffs changes, and restores files safely.
## Installation
```bash
/plugin marketplace add Vvkmnn/claude-emporium
/plugin install claude-vigil@claude-emporium
```
## Requirements
MCP server: [`claude-vigil-mcp`](https://www.npmjs.com/package/claude-vigil-mcp)
```bash
claude mcp add vigil -- npx claude-vigil-mcp
```
## Hooks
| Event | Trigger | What It Does |
|-------|---------|-------------|
| `PreToolUse` | `Bash` | Auto-quicksaves before destructive commands (rm, mv, git reset, etc.) |
## Commands
| Command | Description |
|---------|-------------|
| `/save-vigil <name> [files]` | Create a named file checkpoint |
| `/restore-vigil [name]` | Restore files from a checkpoint |
## MCP Tools
| Tool | Purpose |
|------|---------|
| `vigil_save` | Create a named checkpoint |
| `vigil_list` | List available checkpoints |
| `vigil_diff` | Preview changes since checkpoint |
| `vigil_restore` | Restore files from checkpoint |
| `vigil_delete` | Remove a checkpoint |
## Settings
Configure in `~/.claude/settings.json` under `claude-emporium`:
```json
{
"claude-emporium": {
"suggest_siblings": false,
"claude-vigil": {
"auto_quicksave": false
}
}
}
```
| Key | Default | What It Controls |
|-----|---------|-----------------|
| `auto_quicksave` | `true` | Auto-quicksave before destructive bash commands |
| `suggest_siblings` | `true` | Show install suggestions for sibling plugins (global) |
## How It Works
Hooks inject prompts that trigger `claude-vigil-mcp` tools when destructive commands are detected. The MCP uses content-addressable storage (SHA-256 + gzip dedup) for efficient snapshots.
Storage is project-local at `.claude/vigil/`. 3 named slots + 1 rotating quicksave.
## License
MIT
© vvkmnn · MIT · Vvkmnn/claude-emporium