gh Can Attach Images Now

23 Oct 2026 · Tools · Pull requests

NAME

gh --attach: put images and video into issues, pull requests and comments, straight from the command line.

SYNOPSIS

$ gh pr create --fill --attach after.png
$ gh pr comment 42 --attach before.png --attach after.png

DESCRIPTION

I spent a bit of today building a skill to upload images to pull requests, because the gh CLI couldn't. Then I found out it can. gh 2.99.0 (1 September 2026) added --attach to gh pr create, gh pr edit and gh pr comment, and the same three for issues. Point it at an image or a video, it uploads it and puts it in the body, the same as dragging a file into the browser.

The same PR, without and with a screenshot.

OPTIONS

A video only plays inline if it sits in a paragraph on its own. Images and video only, and you need push access to the repo. All of this is in GitHub's docs.

WHY BOTHER

Agents write a lot. Ask one to fix a header and you'll get a tidy description of every file it touched, what it changed and why. All accurate, and none of it tells you whether the header looks right. A screenshot does that in a second, and that's the bit you actually care about when you're reviewing.

It matters more when an agent opened the PR, because you weren't there when it made the change. Otto's CLAUDE.md already asks agents to put screenshots in their PRs. Until September that meant a workaround. Now it's one flag.

BUGS

Not gh's. Mine, sort of.

The flag's a few weeks old, and agents learned gh from training data older than that. Ask one and it'll probably tell you gh can't upload images. It trusts what it remembers over what's actually installed. And what's installed isn't always new either: one of my cloud environments still has gh 2.89, which doesn't have the flag.

That's the bit with skills that gets me. A skill that fills a gap in a tool is a patch, and a patch doesn't know when the gap closes. Mine would have kept working, quietly doing by hand what gh now does itself, and every agent that loaded it would have gone the long way round.

So before building one, update the tool and read its --help. If you want agents doing the same, a line in CLAUDE.md telling them to check --help on the installed version before writing a workaround does more than any upload skill, and it doesn't go stale. Same idea as giving the agent a script, not a number.

SEE ALSO

no-personal-skills(1), dynamic-context(1), gh release notes

all notes back to M2DE