ashlr

ashlr__diff

Token-efficient git diff. Adaptive compression — stat for large patches, summary for medium, full for small.

Server: ashlr-diffservers/diff-server.ts

Returns compact summaries instead of full patches when the diff is large. Three modes, one adaptive:

ModeWhen it firesOutput
statRaw patch > 500 added+deleted linesFiles + line counts only
summary100–500 linesStat + hottest hunks
full< 100 linesRaw patch, snipCompact-truncated if > 4 KB

The default mode is auto — it picks the right level based on patch size.

Input schema

FieldTypeRequiredDescription
pathstringnoDirectory to run git diff in (default: cwd)
refstringnoGit ref to diff against (default: HEAD)
stagedbooleannoDiff staged changes only
modestringnoauto, stat, summary, or full
filesstring[]noLimit diff to these files

Output format

Stat mode:

3 files changed · +127 −48 lines
  servers/efficiency-server.ts  +89 −12
  servers/bash-server.ts        +31 −28
  package.json                  +7  −8

Example

Use ashlr__diff to show what changed since main

Savings baseline

A 30K-line refactor across 40 files returns in ~200 tokens (stat mode) vs ~90K tokens raw.

On this page