UI Preview Skill

Take screenshots of web UIs to visually verify your work.

When to Use

Prerequisites

Workflow

1. Start the Server

Use tmux to run the server in the background:

tmux new-window -n myserver -d "command-to-start-server --port=PORT"
sleep 2  # Wait for startup

2. Take a Screenshot

chromium --headless --screenshot=_/tmp/ui.png --window-size=1280,800 http://localhost:PORT

Options:

3. View the Screenshot

read _/tmp/ui.png

The read tool supports images and will display them inline.

4. Iterate

Make changes, rebuild if needed, take another screenshot:

# Rebuild (if compiled)
bild Omni/Path/To/Server.hs

# Server auto-restarts or restart manually
tmux kill-window -t myserver
tmux new-window -n myserver -d "new-binary --port=PORT"
sleep 2

# New screenshot
chromium --headless --screenshot=_/tmp/ui.png --window-size=1280,800 http://localhost:PORT
read _/tmp/ui.png

5. Clean Up

tmux kill-window -t myserver

Example Session

# Start agentd-studio
tmux new-window -n studio -d "_/nix/Omni/Agentd/Studio.hs/agentd-studio/bin/agentd-studio --port=8091"
sleep 2

# Verify it's running
curl http://localhost:8091/health

# Take screenshot
chromium --headless --screenshot=_/tmp/studio.png --window-size=1280,800 http://localhost:8091

# View it
read _/tmp/studio.png

# Clean up
tmux kill-window -t studio

Tips

Limitations