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
scripts/render-md.ts(runs via Bun). - 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 bundled CLI accepts either a single inline Markdown argument or stdin:
bun scripts/render-md.ts "# Session diff\n\n- Summary"
cat /tmp/session-diff-report.md | bun scripts/render-md.ts
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
scripts/render-md.tsopens the page in Glimpse automatically with theglimpseuipackage.- The renderer always uses Diffs.com's
@pierre/diffsbrowser module for fenceddiffblocks. - The renderer defaults to split layout for fenced
diffblocks. scripts/render-md.tsuses the bundled Critique-like theme assets directly.assets/critique-base.cssis copied from Critique's web renderer defaults incli/src/ansi-html.ts.assets/critique-markdown.cssprovides the Markdown layout and host-level styling for the embedded diff renderer.- 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.
- Fenced
diffblocks with literal patch content are still supported as a fallback.
Rules
- Do not use
pnpm cliorlibretto openfor this workflow. - Prefer the bundled
scripts/render-md.tsCLI for 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.