minimal-diff-formatter
Installation
SKILL.md
Minimal Unified Diff Output Protocol (Delta-First Communication)
Overview
When presenting code modifications to a user or reviewer ("Here is the fix for the database connection leak"), default AI responses re-print the entire 300-line file inside a markdown code fence (```typescript ... ```).
Re-printing full files creates two severe problems:
- Severe Token Waste: Emitting 300 lines of unchanged code burns 2,500+ expensive output tokens for a 3-line bug fix.
- Poor Developer Experience: The human reviewer must scroll through hundreds of lines trying to spot what actually changed.
The Minimal Unified Diff Protocol formats all code modifications using standard Unified Diffs (```diff) - displaying strictly the modified lines with 2 to 3 lines of surrounding context (- deletions, + additions).