Visual diff engine for AI agent edits. See what moved, what broke, what changed.
npm i usephantom -Dimport { Phantom } from 'usephantom'
function App() {
return (
<>
<YourApp />
{process.env.NODE_ENV === "development" && <Phantom />}
</>
)
}- Before/after snapshots — captures every element's position, size, styles, text
- 7 diff types — moved, resized, recolored, added, removed, text-changed, style-changed
- 4 overlay modes — ghost (translucent before state), heatmap (severity colors), outline (wireframes), xray (side-by-side)
- 4 output levels — compact, standard, detailed, forensic
- Severity scoring — low/medium/high based on visual impact
- Auto-interval — set
autoIntervalto snapshot on a timer - Keyboard shortcuts — Ctrl+Shift+P snapshot, Esc close
import { takeSnapshot, computeDiff, formatDiffMarkdown } from 'usephantom'
const before = takeSnapshot()
// ... agent makes changes ...
const after = takeSnapshot()
const diff = computeDiff(before, after)
const markdown = formatDiffMarkdown(diff, 'detailed')This is experimental software. See DISCLAIMER.md for full details. Use at your own risk. DYOR.
See SECURITY.md for reporting vulnerabilities.
See CONTRIBUTING.md for guidelines.
MIT — see LICENSE
Made by @dragoon0x