Claude-skill-registry GitHub Attach Images
Attach images to GitHub PRs and issues via a scratch repo
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/github-attach-images" ~/.claude/skills/majiayu000-claude-skill-registry-github-attach-images && rm -rf "$T"
manifest:
skills/data/github-attach-images/SKILL.mdsource content
GitHub Attach Images
Attach images to GitHub PRs or issues by hosting them in a scratch repo.
When to use
- Adding screenshots to PR comments
- Attaching images to issue comments
- Any GitHub comment needing embedded images
Setup scratch repo
-
Clone or create scratch repo
git clone git@github.com:<USERNAME>/scratch.git /tmp/scratchIf it doesn't exist, create a public repo called
first.scratch -
Folder structure
scratch/ └── github-attachments/ └── <org>_<repo>_<pr-or-issue>/ ├── 01-screenshot.png └── 02-screenshot.png
Add images
-
Copy images to scratch repo
mkdir -p /tmp/scratch/github-attachments/<org>_<repo>_<number> cp /path/to/screenshots/*.png /tmp/scratch/github-attachments/<org>_<repo>_<number>/ -
Push to GitHub
cd /tmp/scratch git add . git commit -m "chore: images for <org>/<repo>#<number>" git push
Attach to PR or issue
Comment on PR:
gh pr comment <NUMBER> --repo <org>/<repo> --body "$(cat <<'EOF' ## Screenshots  This shows... EOF )"
Comment on issue:
gh issue comment <NUMBER> --repo <org>/<repo> --body "$(cat <<'EOF'  EOF )"
Image URL format
https://raw.githubusercontent.com/<USERNAME>/scratch/main/github-attachments/<org>_<repo>_<number>/<filename>