text-diff

Compare two files or text inputs using Python's difflib module.

84|15|Updated Dec 31, 2025
One-click install
npx skills add https://github.com/AIDotNet/MoYuCode --skill text-diff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: text-diff
Source: https://github.com/AIDotNet/MoYuCode/tree/main/skills/tools/text-diff
Command: npx skills add https://github.com/AIDotNet/MoYuCode --skill text-diff

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps users identify differences between two files or text inputs, facilitating code reviews, version tracking, and patch generation.

Core Features & Use Cases

  • File Comparison: Compares two specified files and highlights their differences.
  • Diff Formats: Supports unified diff, context diff, and side-by-side views for clear visualization of changes.
  • Patch Generation: Can create patch files that represent the differences, useful for applying changes to codebases.
  • Use Case: You've made changes to a Python script and want to see exactly what was modified compared to the original version.

Quick Start

Use the text-diff skill to compare the contents of 'old_version.py' and 'new_version.py' in a unified diff format.

Frequently Asked Questions about text-diff

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

FAQPage Schema
How do I compare two files to see what text was changed?

Comparing two files identifies differences by analyzing their contents and highlighting changes. You can visualize modifications using unified diff, context diff, or side-by-side views for clear code review and version tracking.

Can I generate a patch file from text differences?

Generating a patch file from text differences creates a file representing the modifications between two inputs. This output is useful for applying specific codebase changes and tracking version updates.

What is the best way to view code differences side-by-side?

Viewing code differences side-by-side displays original and modified text simultaneously to highlight exact changes. This Skill supports side-by-side views alongside unified and context diff formats for accurate text analysis.

Does this text comparison tool work without external dependencies?

Text comparison operates without external dependencies, utilizing Python's difflib module internally. This ensures accurate comparison of file contents and reliable patch generation in a self-contained environment.

What diff formats are supported for code review?

Supported diff formats for code review include unified diff, context diff, and side-by-side views. These options provide clear visualization of changes between two files or text inputs for effective analysis.

When do I need to use a unified diff format?

A unified diff format is needed when you want a compact, standardized representation of changes between two files. It displays removed and added lines together, making it ideal for code reviews and patch generation.