Agent Skills › lukevella/rallly › pr-screenshots

pr-screenshots

GitHub

辅助在PR描述中添加UI变更截图,避免提交图片触发CI重跑。通过脚本上传至自定义引用并生成链接,编辑PR正文展示对比图。

.claude/skills/pr-screenshots/SKILL.md lukevella/rallly

触发场景

需要为PR添加视觉变更截图 需要展示前后对比或深色/浅色模式效果

安装

npx skills add lukevella/rallly --skill pr-screenshots -g -y
更多选项

非标准路径

npx skills add https://github.com/lukevella/rallly/tree/main/.claude/skills/pr-screenshots -g -y

不安装直接使用

npx skills use lukevella/rallly@pr-screenshots

指定 Agent (Claude Code)

npx skills add lukevella/rallly --skill pr-screenshots -a claude-code -g -y

安装 repo 全部 skill

npx skills add lukevella/rallly --all -g -y

预览 repo 内 skill

npx skills add lukevella/rallly --list

SKILL.md

Frontmatter
{
    "name": "pr-screenshots",
    "description": "Add screenshots of a visual change to a pull request description without pushing commits to the PR branch. Use whenever a PR needs screenshots, before\/after images, or any image in its body."
}

PR screenshots

Never commit screenshots to the PR branch. Every push there reruns CI and redeploys Vercel previews just to add images.

Images go to refs/meta/pr-assets on origin instead, one folder per PR. It is a custom ref, not a branch: GitHub Actions only run for main and pull requests, and Vercel deploys every pushed branch (refs/heads/*), so neither sees it. An orphan pr-assets branch would not work, because Vercel would try and fail to build it. Keep the ref two levels deep: GitHub accepts a single-level refs/pr-assets once, then rejects every push to it with "cannot lock ref"; only gh api -X DELETE repos/<owner>/<repo>/git/refs/pr-assets removes it.

Steps

  1. Capture. Crop to the surface that changed, at a size where the text is legible. Show dark and light mode when the change has colour. Use a before/after pair when replacing something, a single shot for new UI. Crop with sips -s format png --cropOffset <y> <x> -c <height> <width> <in> --out <out>.png.

  2. Confirm. Send the images to the user in chat and wait for approval before uploading. Tweaks after upload mean another upload.

  3. Upload. From any checkout of the repo:

    .claude/skills/pr-screenshots/upload.sh <pr-number> <file>...
    

    It prints one raw.githubusercontent.com URL per file, pinned to the upload commit, and exits non-zero if a URL does not serve.

  4. Edit the body. Add a ## Screenshots section above the checklist with gh pr edit <pr-number> --body-file <file>. Editing the body does not rerun CI. Put dark and light side by side:

    | Dark | Light |
    | -- | -- |
    | ![Notify step, dark mode](<url>) | ![Notify step, light mode](<url>) |
    

Re-uploading a file with the same name is fine: the new URL carries the new commit, and old URLs keep serving the old image.

版本历史

  • 04f7ce8 当前 2026-10-20 04:06

同 Skill 集合

.agents/skills/better-auth-best-practices/SKILL.md
.agents/skills/create-auth-skill/SKILL.md
.agents/skills/devmoji/SKILL.md
.agents/skills/email-and-password-best-practices/SKILL.md
.agents/skills/logging/SKILL.md
.agents/skills/organization-best-practices/SKILL.md
.agents/skills/prisma-cli/SKILL.md
.agents/skills/prisma-client-api/SKILL.md
.agents/skills/prisma-database-setup/SKILL.md
.agents/skills/prisma-postgres/SKILL.md
.agents/skills/prisma-upgrade-v7/SKILL.md
.agents/skills/two-factor-authentication-best-practices/SKILL.md
.claude/skills/fix-crowdin-pr/SKILL.md

元信息

文件数
0
版本
04f7ce8
Hash
5b3cd667
收录时间
2026-10-20 04:06

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