vscode

Compare file versions side-by-side using the VS Code CLI.

9|14|Updated Mar 22, 2012
One-click install
npx skills add https://github.com/deybhayden/dotfiles --skill vscode-deybhayden
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vscode
Source: https://github.com/deybhayden/dotfiles/tree/main/.pi/agent/skills/vscode
Command: npx skills add https://github.com/deybhayden/dotfiles --skill vscode-deybhayden

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Visualizing file changes across versions can be tedious when relying on line-by-line mental parsing. This Skill enables users to view diffs between file versions directly in VS Code, providing clear, side-by-side comparisons.

Core Features & Use Cases

  • Side-by-side Diffs: Open two versions of a file in VS Code to visually compare changes.
  • Commit/View Worktree Workflows: Compare against a previous commit, a specific commit, or the staged vs. working tree.
  • Code Review & Debug Support: Accelerate reviews and debugging by quickly assessing what changed.

Quick Start

Install VS Code and ensure the code CLI is available in PATH. Then run code -d <old-file> <new-file> to view a side-by-side diff. Example: code -d path/to/old.js path/to/new.js

Frequently Asked Questions about vscode

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

FAQPage Schema
How do I view git diff side-by-side in VS Code?▼

To view a git diff side-by-side in VS Code, run the code CLI command `code -d <old-file> <new-file>` in your terminal. This launches a visual, side-by-side file comparison directly in the editor.

Can I compare a working tree file against a previous commit using the VS Code CLI?▼

Yes, you can compare working tree changes against a previous commit using the VS Code CLI. By combining git show with the code command, you can extract the committed version and open a side-by-side diff in VS Code.

What do I need installed to open file comparisons in VS Code from the terminal?▼

You need VS Code installed and the code CLI added to your system's PATH to open file comparisons from the terminal. Once configured, you can execute code -d commands to view diffs directly.

Is there a way to speed up code review by visually comparing file versions?▼

Speeding up code review by visually comparing file versions is possible by opening side-by-side diffs in VS Code. This allows you to quickly assess what changed between commits, branches, or staged files without mental line-by-line parsing.

Does VS Code support comparing staged files with working tree changes via CLI?▼

Yes, VS Code supports comparing staged files with working tree changes via the CLI. You can use the code -d command alongside git commands to visualize the differences between your staged and current working tree states.