diff-generator

Generate unified diffs between file snapshots and current states.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/TECHKNOWMAD-LABS/cortex-research-suite --skill diff-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diff-generator
Source: https://github.com/TECHKNOWMAD-LABS/cortex-research-suite/tree/main/skills/diff-generator
Command: npx skills add https://github.com/TECHKNOWMAD-LABS/cortex-research-suite --skill diff-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you meticulously track changes made to files and directories by creating snapshots and generating detailed, unified diffs, ensuring you can review modifications before committing or easily revert if needed.

Core Features & Use Cases

  • File Snapshots: Create point-in-time copies of your files and directories.
  • Unified Diffs: Generate Git-compatible diffs to visualize changes.
  • Rollback Capability: Restore files to a previous snapshot state.
  • Use Case: Before refactoring a critical module, take a snapshot. After making changes, generate a diff to review every modification. If something is wrong, roll back to the snapshot.

Quick Start

Use the diff-generator skill to create a snapshot of the './src' directory and store it in './snapshots'.

Frequently Asked Questions about diff-generator

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

FAQPage Schema
How do I generate a unified diff for code review before committing changes?

You generate a unified diff by creating a point-in-time file snapshot before making modifications, then comparing the current state against that snapshot to visualize changes for review.

What's the best way to track file changes during a multi-file refactor?

The best way to track changes during a multi-file refactor is to take a recursive directory snapshot beforehand, enabling safe multi-file edits and allowing you to generate detailed diffs or roll back if needed.

Can I get file comparison results in JSON format instead of unified diff?

Yes, file comparison results can be output in both unified diff and JSON formats, allowing you to programmatically parse detected changes between file snapshots and current states for version control integration.

Does the diff generator support binary file detection during directory comparison?

Yes, the diff generator supports binary file detection during recursive directory operations, automatically identifying binary files to ensure accurate file comparison and snapshot generation without corruption.

How do I roll back code changes to a previous file snapshot?

To roll back code changes, you restore your files to a previously saved snapshot state, allowing you to safely revert modifications if something goes wrong during refactoring.