Skip to content
Back to skills

Github Attach Images

ASecurity

Attach images to GitHub PRs and issues via a scratch repo

  • 755 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 8, 2026
toolsbashgit

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill github-attach-images --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Github Attach Images?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Github Attach Images
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-github-attach-images/badge)](https://www.skillsdirectory.com/skills/majiayu000-github-attach-images)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: GitHub Attach Images
description: Attach images to GitHub PRs and issues via a scratch repo
---

# 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

1. **Clone or create scratch repo**
   ```bash
   git clone git@github.com:<USERNAME>/scratch.git /tmp/scratch
   ```
   If it doesn't exist, create a public repo called `scratch` first.

2. **Folder structure**
   ```
   scratch/
   └── github-attachments/
       └── <org>_<repo>_<pr-or-issue>/
           ├── 01-screenshot.png
           └── 02-screenshot.png
   ```

## Add images

1. **Copy images to scratch repo**
   ```bash
   mkdir -p /tmp/scratch/github-attachments/<org>_<repo>_<number>
   cp /path/to/screenshots/*.png /tmp/scratch/github-attachments/<org>_<repo>_<number>/
   ```

2. **Push to GitHub**
   ```bash
   cd /tmp/scratch
   git add .
   git commit -m "chore: images for <org>/<repo>#<number>"
   git push
   ```

## Attach to PR or issue

**Comment on PR:**
```bash
gh pr comment <NUMBER> --repo <org>/<repo> --body "$(cat <<'EOF'
## Screenshots

![Description of screenshot](https://raw.githubusercontent.com/<USERNAME>/scratch/main/github-attachments/<org>_<repo>_<number>/01-screenshot.png)

This shows...
EOF
)"
```

**Comment on issue:**
```bash
gh issue comment <NUMBER> --repo <org>/<repo> --body "$(cat <<'EOF'
![Description](https://raw.githubusercontent.com/<USERNAME>/scratch/main/github-attachments/<org>_<repo>_<number>/image.png)
EOF
)"
```

## Image URL format

```
https://raw.githubusercontent.com/<USERNAME>/scratch/main/github-attachments/<org>_<repo>_<number>/<filename>
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.