diff-preview

Show git diffs and require confirmation before applying edits.

Updated Nov 22, 2025
One-click install
npx skills add https://github.com/Khamel83/oneshot --skill diff-preview-khamel83
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diff-preview
Source: https://github.com/Khamel83/oneshot/tree/main/archive/v9/skills/diff-preview
Command: npx skills add https://github.com/Khamel83/oneshot --skill diff-preview-khamel83

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Preview changes before applying edits to reduce risk and prevent unintended modifications by showing diffs and requiring explicit confirmation.

Core Features & Use Cases

  • Diff preview: Display concise diffs for pending edits across files.
  • Confirmation prompts: Require user approval before applying changes.
  • Safe multi-file edits: Coordinate edits across multiple files with a single plan.
  • Integration readiness: Works alongside batch operations and edit tools to safeguard your workflow.

Quick Start

Ask the system to preview pending changes and confirm before applying edits.

Frequently Asked Questions about diff-preview

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

FAQPage Schema
How do I safely preview code edits before applying them?

You can safely preview code edits by generating a git diff of pending changes and requiring explicit user confirmation before any files are written. This mechanism prevents unintended modifications across your codebase.

Can I review multi-file edits in a single diff preview?

Yes, you can coordinate and review multi-file edits within a single diff preview. The system displays concise diffs for all pending changes across affected files and prompts for approval before applying the batch operation.

Do I need git installed to preview diffs for pending code changes?

Yes, you need git installed to use this diff preview functionality. The system relies on git to read and display the pending changes accurately before prompting for confirmation to write the approved edits.

What is the best way to prevent unintended modifications during codebase edits?

The best way to prevent unintended modifications is to integrate a confirmation prompt that displays a git diff before writing changes. This ensures only explicitly approved edits are applied to the codebase.

Does diff preview work with batch edit tools across a codebase?

Yes, diff preview works alongside batch operations and edit tools across a codebase. It integrates with these tools to safeguard your workflow by intercepting pending changes and requiring confirmation before execution.

When should I not use a confirmation prompt for code edits?

You should not use a confirmation prompt for code edits when executing fully automated, non-interactive scripts where pausing for user approval would disrupt the workflow or cause the process to hang indefinitely.