# Terminal Screenshot

MUST be used right after changing any CLI color config (delta/bat/themes/lazygit pager)...

- Repository: https://github.com/daymade/claude-code-skills (1509 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add daymade/claude-code-skills --skill terminal-screenshot -g -a claude-code -y`
Codex: `npx skills add daymade/claude-code-skills --skill terminal-screenshot -g -a codex -y`
Cursor: `npx skills add daymade/claude-code-skills --skill terminal-screenshot -g -a cursor -y`
Gemini CLI: `npx skills add daymade/claude-code-skills --skill terminal-screenshot -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add daymade/claude-code-skills`

## Description

MUST be used right after changing any CLI color config (delta/bat/themes/lazygit pager), renders the terminal's colored output to a PNG so Claude can actually SEE contrast, alignment, and highlighting instead of raw ANSI codes. Use for delta git diff colors, bat syntax highlighting, starship prompt, eza/ls colors, or ripgrep matches. Trigger phrases: 看终端效果, 终端截图, 验证配色, terminal screenshot.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Terminal Screenshot

Render the colored output of a terminal command into a PNG image, then read that
image to judge the result visually.

## Why this exists

When a command's output arrives as a tool result, Claude sees plain text plus raw
escape codes like `\x1b[48;2;92;30;34m`, not the rendered colors. That makes it
impossible to honestly answer "is the diff's add/remove contrast strong enough?"
or "did this theme come out too dark?". Reading hex values is guessing. This skill
turns the output into an image so the judgement is based on what a human would
actually see on screen.

## The method: capture, then render

Two separate steps. Keep them separate, that separation is the whole trick.

### Step 1, Capture full-fidelity ANSI to a file

Most CLIs **drop or downgrade colors when they detect they're not writing to a
real terminal** (a pipe or a child process). Force full coloring and save to a
`.ansi` file. The exact flag depends on the tool, recipes below.

The single most important rule: **never let the renderer run the command for you.**
`freeze --execute "git diff | delta"` looks convenient but produces a *degraded*
result, delta (and lazygit, and anything that probes terminal capabilities) runs
inside freeze's child pty, detects a reduced environment, and silently drops its
background blocks, line-number column, and header box. Capture in a normal shell
first, render second.

### Step 2, Render the ANSI file to PNG, then read it

Use the bundled wrapper, which prefers `freeze` and falls back to a stdlib
renderer + headless Chrome:

```bash
scripts/render_ansi.sh <input.ansi> <output.png> [background_hex]
```

Then read the PNG with the Read tool and judge the colors.

**Background color must match the real terminal**, or a dark theme verified on a
white page looks wrong. On macOS with Ghostty:

```bash
ghostty +show-config --default | grep '^background'   # e.g. 282c34 (the default)
```

The rest: https://github.com/daymade/claude-code-skills/blob/HEAD/daymade-claude-code/terminal-screenshot/SKILL.md
