Agent Skills
› rokartur/BetterCmdTab
› marketing-screenshots
marketing-screenshots
GitHub自动化捕获 BetterCmdTab 插件的布局截图,用于网站轮播、README 或广告。通过修改配置、隐藏桌面图标并使用脚本截取屏幕,处理后保存为 JPEG/WebP 格式并自动恢复系统状态。
Trigger Scenarios
需要获取 BetterCmdTab 的截图
生成营销用的应用界面图片
Install
npx skills add rokartur/BetterCmdTab --skill marketing-screenshots -g -y
SKILL.md
Frontmatter
{
"name": "marketing-screenshots",
"description": "Capture the switcher layouts for the site carousel, README or ads. Use when asked for BetterCmdTab screenshots or marketing images."
}
The user's desktop is live state: their wallpaper, icons and windows stay as they are, and every setting you change is restored at the end.
- Ask which Desktop (Space) to shoot on. Shoot there, on the wallpaper it already has; the user picks the wallpaper, never you.
- Back up
~/.config/bettercmdtab/config.json, then sethideFromScreenSharingtofalse(withtruethe panel never lands in a capture). Switch layouts withlayoutMode(list,iconDock,windowPreview) throughjqon that file; the app reloads it live. - Hide desktop icons:
defaults write com.apple.finder CreateDesktop false && killall Finder. - Put the capture run in one script and start it with
nohup … &. Switching Spaces kills processes attached to your shell, so a foreground run dies with it. The script opens the panel with a held ⌘Tab chord (CGEvent), runsscreencapture -x, and writes a done-file; poll for that file. - Restore: the config backup,
CreateDesktop truepluskillall Finder, the original Space. - Crop centred on the panel with equal top and bottom margins; grid and list crop tighter than preview. Use
magickfor the crop. - Write
web/public/screenshots/{list,grid,preview}.jpg(2000 px wide, JPEG q82) and the matching.webp(cwebp -q 80); the carousel loads the WebP,site.webmanifestandweb/src/routes/__root.tsxthe JPEG. When the size changes, update theaspect-[…]class inweb/src/routes/index.tsxandsizesinweb/public/site.webmanifest.
Done when all three images are written, read back and checked for clipping and desktop icons, and the user's config, desktop icons and Space are back as they were.
Version History
- 3df8c68 Current 2026-10-18 19:36


