Agent Skills › HermannBjorgvin/Clawdmeter › capturing-desktop-screenshots

capturing-desktop-screenshots

GitHub

用于捕获 Clawdmeter 桌面应用 UI 截图的工具,通过模拟数据和脚本在 X11 环境下生成参考图片,适用于视觉检查或 PR 提交。

.claude/skills/capturing-desktop-screenshots/SKILL.md HermannBjorgvin/Clawdmeter

触发场景

需要刷新应用的截图时 桌面 UI 变更的视觉检查 PR 需要附带截图

安装

npx skills add HermannBjorgvin/Clawdmeter --skill capturing-desktop-screenshots -g -y
更多选项

非标准路径

npx skills add https://github.com/HermannBjorgvin/Clawdmeter/tree/main/.claude/skills/capturing-desktop-screenshots -g -y

不安装直接使用

npx skills use HermannBjorgvin/Clawdmeter@capturing-desktop-screenshots

指定 Agent (Claude Code)

npx skills add HermannBjorgvin/Clawdmeter --skill capturing-desktop-screenshots -a claude-code -g -y

安装 repo 全部 skill

npx skills add HermannBjorgvin/Clawdmeter --all -g -y

预览 repo 内 skill

npx skills add HermannBjorgvin/Clawdmeter --list

SKILL.md

Frontmatter
{
    "name": "capturing-desktop-screenshots",
    "description": "Captures screenshots of the Clawdmeter desktop app (GPUI window) without hardware, using the demo example with fake board and status data under X11, and regenerates the reference set in desktop\/docs\/screenshots\/. Use when checking a desktop UI change visually, when a desktop PR needs screenshots, or when asked to refresh the app's screenshots."
}

Capturing desktop screenshots

The demo example (desktop/crates/clawdmeter-app/examples/demo.rs) opens the real window with a fake board, a fake live status and a local release. The bundled script runs it from a throwaway HOME, captures the window and closes it:

.claude/skills/capturing-desktop-screenshots/scripts/capture.sh /tmp/device.png --page device

Then Read the PNG. It builds the demo first if desktop/target/debug/examples/demo is missing (set DEMO_BIN to use another build). It needs an X server or XWayland on DISPLAY (default :0), xwininfo and ImageMagick's import. The window opens on the user's desktop for a few seconds.

Why the script does what it does: the demo writes a status file, config and release folder into HOME; the binary is copied into that HOME so hook commands in the Hooks preview show no personal paths; it waits 5 s (WAIT) because on X11 the dark appearance arrives from the portal after the first frames.

Demo flags

Flag Shows
--page overview|device|flash|accounts|hooks|settings A sidebar page
--setup welcome|board|flash|pair|hooks|done A setup-wizard step
--board none|fresh|current|old No board / board needing firmware / up to date / outdated
--flash-to identify|firmware|flash|done The flasher advanced to a step
--status off The daemon not running
--accounts retrying A second, rate-limited account
--refresh wait|checking Overview refresh button waiting out the gap / mid-check
--session idle Session not started
--hooks-preview, --shop, --advanced Hooks file preview, board shop links, advanced settings
--height PX A taller window (default 640) so a long page fits one capture

demo.rs's header comment is the source of truth if these drift.

Reference set

desktop/docs/screenshots/ is made with this script. File names map to the flags (setup-2-board-shop.png = --setup board --shop, overview-refresh-wait.png = --refresh wait, …). device.png is taken with --height 1160 so the whole settings list shows. overview-gnome-header.png is the client-drawn Adwaita header bar: run with CLAWDMETER_DECORATIONS=client in the environment.

Don't add observe_window_appearance while working on the UI: on X11, GPUI 0.2.2 redraws inside the portal callback and panics. The root polls the appearance instead.

版本历史

  • 4e5c079 当前 2026-10-19 03:10

同 Skill 集合

.claude/skills/capturing-device-screenshots/SKILL.md
.claude/skills/cutting-a-release/SKILL.md
.claude/skills/flashing-and-probing-boards/SKILL.md
.claude/skills/hunting-clawd-animations/SKILL.md
.claude/skills/porting-a-board/SKILL.md
.claude/skills/regenerating-firmware-assets/SKILL.md
.claude/skills/verifying-firmware-ui/SKILL.md

元信息

文件数
0
版本
4e5c079
Hash
3ff1452c
收录时间
2026-10-19 03:10

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-24 18:54
浙ICP备14020137号-1