About attach-media
attach-media is a skill for adding local media to GitHub issues and pull requests with `gh`. It documents inline and appended placement, alt text, supported formats, and size limits.
Key features
- 01Attach media with `gh`
- 02Inline or appended placement
- 03Specify descriptive alt text
- 04Supported image and video formats
- 05Documented file-size limits
Use cases
- 01Add a screenshot to an issue comment
- 02Attach a video to a pull request
- 03Place an image inline in an issue body
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ angusfretwell/ skills --skill attach-mediaAfter installing, type/attach-mediain Claude Code to confirm it loaded.
Details
From the project READMEgh uploads media itself: pass --attach <path> to gh issue create|edit|comment or gh pr create|edit|comment, once per file. Needs gh v2.99.0 or later and write access to the repository; GitHub Enterprise Server is unsupported.
Placement
- Inline: reference the local path in the body,
, and pass--attach ./login.png. The reference is rewritten in place to the uploaded asset and keeps its alt text. - Appended: attach without referencing it and the file lands at the end of the body. Alt text follows
#in the path:--attach './login.png#The login error state'.
Alt text says what the reader should see in the capture, in the project's own vocabulary.
gh pr comment 123 --body 'Reproduced on main.' --attach './login.png#Login form after submitting an expired token'
Limits
PNG, JPEG, GIF, WebP, SVG, MP4, MOV, WebM. Images and GIFs up to 10 MB; video up to 10 MB on Free plans, 100 MB on paid. Scale an oversized image before attaching.