Glimpse Changes
Use this skill when the user wants a visual explanation of the changes made in the current session.
Workflow
- Inspect the current session changes with
git status --short,git diff --stat,git diff --cached --stat, and focusedgit diff --unified=5 -- <files>calls. - Write a Markdown explanation of the diff, usually in
/tmp/session-diff-report.md. - Render that Markdown with
npx glimpse-changes. - Launch the renderer in a long-lived background terminal session and leave that process running while the Glimpse window is open.
Page Content
Include:
- A short title and summary of the session.
- File-level sections that explain what changed and why it matters.
- Command diffs using
!\git diff -- path/to/file`` to show changes inline. - Short representative snippets instead of full patches. Diff hunks don't need to be full files.
- Order sections and hunks in the sequence that best explains the changes, not necessarily file order.
- Risks, follow-up work, or open questions when they are relevant.
CLI
The CLI accepts either a single inline Markdown argument or stdin:
npx glimpse-changes "# Session diff\n\n- Summary"
cat /tmp/session-diff-report.md | npx glimpse-changes
When using the renderer from an agent session:
- do not wrap it in a short timeout
- run it in a background terminal/PTY session
- leave that session alive until the user is done viewing the Glimpse window
Rendering
- The renderer opens the page in Glimpse automatically with the
glimpseuipackage. - The renderer always uses Diffs.com's
@pierre/diffsbrowser module for fenceddiffblocks. - The renderer defaults to split layout for fenced
diffblocks. - Fenced
diffblocks are rendered with@pierre/diffsfrom Diffs.com. - Diff blocks are capped to about
60%of the viewport and scroll inside the page when they exceed that size. - Prefer command diffs (
!\git diff ...``) over pasting raw diff content into fenced blocks. - Command diffs execute at render time and always reflect the current state of the working tree.
- Command diffs must start with
git diff; any other command will be rejected. - Command diff output must contain valid unified diff hunks (with
diff --githeaders or@@ ... @@hunk headers); otherwise the renderer will throw an error. - Fenced
diffblocks with literal patch content are still supported as a fallback.
Rules
- Do not use
pnpm cliorlibretto openfor this workflow. - Prefer
npx glimpse-changesfor display and Git for diff inspection. - If the diff is large, summarize repeated edits and show only the most informative snippets.
- Keep the renderer process alive in a background terminal while the Glimpse window is open, or the window may close with the parent process.