Agent skill
claude-vigil
File checkpoint and recovery — auto-quicksaves before destructive commands, manual checkpoints for safe rollback
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/claude-vigil
SKILL.md
Vigil Plugin
File recovery. Saves checkpoints before dangerous operations, diffs changes, restores files safely.
Hooks
| Hook | When | Action |
|---|---|---|
| PreToolUse(Bash) | Destructive command detected | Auto-quicksaves affected files (rm, mv, git reset, etc.) |
Token cost: 0 on safe commands, ~30-50 on destructive. The regex matches: rm, rmdir, mv, sed -i, perl -i, git checkout/reset/clean/restore, output redirects.
Commands
| Command | Description |
|---|---|
/save-vigil <name> [files] |
Create a named file checkpoint |
/restore-vigil [name] |
Restore files from a checkpoint |
Workflows
Checkpoint (standalone)
vigil_save(name: "before-refactor", files: ["src/auth.ts", "src/middleware.ts"])- Make changes safely
- If something breaks:
vigil_restore(name: "before-refactor")
Checkpoint (with siblings)
vigil_save(name: "before-refactor", files: [...])- If praetorian active: also
praetorian_compact(type: "decisions", ...)to save the reasoning - Make changes — both files and context are now protected
- If something breaks:
vigil_restore(name: "before-refactor")— restore filespraetorian_restore("before-refactor")— restore context
Recovery (standalone)
vigil_list()— see available checkpointsvigil_diff(name: "checkpoint")— preview what would changevigil_restore(name: "checkpoint")— restore files- Optionally:
vigil_delete(name: "checkpoint")— clean up
Recovery (with siblings)
vigil_list()— see available checkpointsvigil_diff(name: "checkpoint")— preview changes- If historian active:
find_file_context("filename")to understand what changed and why vigil_restore(name: "checkpoint")— restore files- If praetorian active: restore matching compaction for context
Sibling Synergy
| Sibling | Value | How |
|---|---|---|
| Praetorian | Context saved alongside files | Pair vigil checkpoints with praetorian compactions for full state recovery |
| Historian | File change context from history | find_file_context() explains what happened between checkpoint and now |
MCP Tools Reference
| Tool | Purpose |
|---|---|
vigil_save |
Create named checkpoint (SHA-256 + gzip dedup) |
vigil_list |
List available checkpoints with metadata |
vigil_diff |
Preview changes since checkpoint |
vigil_restore |
Restore files from checkpoint |
vigil_delete |
Remove a checkpoint and free storage |
Storage
Content-addressable at .claude/vigil/. 3 named slots + 1 rotating ~quicksave.
Requires
claude mcp add vigil -- npx claude-vigil-mcp
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?