OWNED SKILL · UPLOAD-IMAGE-TO-GITHUB

Your image link
quietly doesn't load.

GitHub has no attachment API, and a raw URL from a private repo never renders — camo can't authenticate. This drives GitHub's own uploader and hands back a URL that works anywhere.

say "put this image at the top of the PR"
THE OBVIOUS PATHTRAP
raw.githubusercontent.com/org/private-repo/…
✕  Broken image in the PR
camo proxy can't auth → dead end
THIS SKILLWORKS
github.com/user-attachments/assets/<uuid>
✓  Renders, private repos included
access-scoped to the repo's viewers
↓  WHY IT EXISTS

The problem

You want a screenshot at the top of a PR. Every path that looks like it should work fails — and most of them fail silently, so you only find out when a reviewer sees a broken image icon.

Why the obvious paths fail

The turn

Stop trying to host the image. Make GitHub's real uploader run. Put the image on the clipboard as base64 text, then dispatch a genuine drop event carrying a reconstructed File onto a classic editor's <file-attachment> element. GitHub uploads it for real and inserts the markup — which we harvest. The bytes ride the OS clipboard; they never pass through the agent's context.

The classic editor only exists in a few places — not the React /issues/new page. The reliable one is any repo's wiki new-page, used purely as an uploader and never saved. The asset persists on its own.

The receipt

Clipboard → drop → URL → body. Four moves:

# 1. image onto the clipboard as base64 text (macOS; note the -i)
base64 -i /path/to/image.png | tr -d '\n' | pbcopy

# 2. open a CLASSIC editor and prove it is one — both must be true
#    https://github.com/<owner>/<repo>/wiki/_new
({ hasFileAttachment: !!document.querySelector('file-attachment'),
   hasBody: !!document.querySelector('#gollum-editor-body') })

# 3. click the body for OS focus, then run scripts/drop-and-harvest.js
#    → { url, imgTag }

# 4. spend the URL
gh pr edit <N> --body-file body.md   # <img width="1200" src="$URL" />
Scope is the gotcha: a user-attachments asset is only visible to people who can see the repo it was uploaded through. Upload via the same repo as the PR — or one your audience can also see. Then navigate to the PR and actually look at it. A broken image means wrong repo scope or a bad URL; that eyeball check is the whole point.

When not to

Part of Rascal's AI setup · one atom, justifying its own existence.