Agent Skills › rokartur/BetterCmdTab › marketing-screenshots

marketing-screenshots

GitHub

自动化捕获BetterCmdTab面板截图,用于网站轮播、README或广告。通过修改配置隐藏桌面图标,使用脚本和CGEvent触发截图,自动裁剪并转换为WebP/JPEG格式,同时确保系统状态完整恢复。

.agents/skills/marketing-screenshots/SKILL.md rokartur/BetterCmdTab

触发场景

需要生成BetterCmdTab面板的营销图片 请求网站轮播图或README中的软件界面截图

安装

npx skills add rokartur/BetterCmdTab --skill marketing-screenshots -g -y
更多选项

非标准路径

npx skills add https://github.com/rokartur/BetterCmdTab/tree/main/.agents/skills/marketing-screenshots -g -y

不安装直接使用

npx skills use rokartur/BetterCmdTab@marketing-screenshots

指定 Agent (Claude Code)

npx skills add rokartur/BetterCmdTab --skill marketing-screenshots -a claude-code -g -y

安装 repo 全部 skill

npx skills add rokartur/BetterCmdTab --all -g -y

预览 repo 内 skill

npx skills add rokartur/BetterCmdTab --list

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.

  1. Ask which Desktop (Space) to shoot on. Shoot there, on the wallpaper it already has; the user picks the wallpaper, never you.
  2. Back up ~/.config/bettercmdtab/config.json, then set hideFromScreenSharing to false (with true the panel never lands in a capture). Switch layouts with layoutMode (list, iconDock, windowPreview) through jq on that file; the app reloads it live.
  3. Hide desktop icons: defaults write com.apple.finder CreateDesktop false && killall Finder.
  4. 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), runs screencapture -x, and writes a done-file; poll for that file.
  5. Restore: the config backup, CreateDesktop true plus killall Finder, the original Space.
  6. Crop centred on the panel with equal top and bottom margins; grid and list crop tighter than preview. Use magick for the crop.
  7. 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.webmanifest and web/src/routes/__root.tsx the JPEG. When the size changes, update the aspect-[…] class in web/src/routes/index.tsx and sizes in web/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.

版本历史

  • 3df8c68 当前 2026-10-18 19:36

同 Skill 集合

.agents/skills/add-preference/SKILL.md
.agents/skills/babysit-pr/SKILL.md
.agents/skills/dock-tile-icon/SKILL.md
.agents/skills/localize-strings/SKILL.md
.agents/skills/release-changelog/SKILL.md
.agents/skills/release/SKILL.md
.agents/skills/verify/SKILL.md

元信息

文件数
0
版本
786e953
Hash
03ce4ac7
收录时间
2026-10-18 19:36

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-05 09:51
浙ICP备14020137号-1