File Change Tracker for Openclaw

A mandatory safety skill that creates local recovery points and scoped protection layers before any file-changing action.

songxf1024
v1.0.0
Mar 23, 2026
0
769
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install file-change-tracker

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install file-change-tracker using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is File Change Tracker?

File Change Tracker is a mission-critical safety utility designed for AI agents and developers to prevent data loss during edit batches. It works by establishing a lightweight local protection layer using git to record recovery points, ensuring that every creation, deletion, or modification of files is backed by a reliable snapshot.

By leveraging Openclaw Skills integration, this tool enforces a strict PRE and POST workflow. It captures the state of explicit target paths before work begins and verifies the results once the batch is complete, providing clear rollback guidance and session-based management to handle overlapping tasks without conflict.

File Change Tracker Use Cases

  • Protecting source code during complex refactoring sessions.
  • Safeguarding configuration files before applying automated patches.
  • Creating recovery points before running shell commands that mutate file sets.
  • Managing file state when generating new documentation or scripts.
  • Ensuring clean rollbacks for multi-file edits in experimental branches.

How File Change Tracker Works

  1. Scope Definition: Identify the specific files or directories intended for modification.
  2. PRE-Snapshot: Execute the pre-command to record the current state of target paths in a new guarded session.
  3. Safe Modification: Perform the planned file changes only within the declared scope.
  4. Validation: Run necessary tests or linters to ensure the integrity of the changes.
  5. POST-Snapshot: Execute the post-command to finalize the session and record the end state.
  6. Reporting: Review the generated report which includes session IDs, SHA snapshots, and specific rollback instructions.

File Change Tracker Setup

Ensure git is installed on your system. The skill will automatically initialize a repository and set local identity if needed.

# Initialize a pre-change session
{baseDir}/scripts/helper.sh pre "your-task-description" -- path/to/file1 path/to/file2

# Finalize the change session
{baseDir}/scripts/helper.sh post "task-completed"

# View protection status and recent history
{baseDir}/scripts/helper.sh report 5

File Change Tracker Data Schema & Taxonomy

The skill organizes metadata and recovery states within the .git/.guarded-edit/ directory structure:

Component Description
Sessions Stored in .git/.guarded-edit/sessions/ to support concurrent edit batches.
Exclusion File Uses guarded-edit.ignore to define paths that the tracker must never touch.
Metadata Includes session IDs, timestamps, and commit subjects for every PRE/POST pair.
Path Tracking Explicitly maps target paths to specific session IDs to ensure scoped rollbacks.

File Change Tracker Advanced Features

  • Multi-Session Support: Manage overlapping edit batches with unique session IDs to prevent state overwriting.
  • Path-Explicit Scoping: Limits protection and rollback actions to specific files rather than the entire workspace.
  • Custom Exclusion Rules: Fine-grained control via gitignore-style patterns in a dedicated ignore file.
  • Automated Git Maintenance: Automatically handles repo initialization and local user configuration for zero-config environments.
  • Granular Rollback Guidance: Provides specific path-scoped restore commands instead of destructive global resets.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins git
Github Stars: 0
forks: 0

Featured*