Skip to content

GitHub File Attachments

Upload, embed, and download files on GitHub PRs and issues via the gh-attach CLI extension

Stars
40,703
Licence
MIT
Files
1 file

What it does

When installed, the agent can upload a local screenshot, image, PDF, zip, or video to GitHub's user-attachments system and get back a URL that GitHub displays inline in a pull request, issue, or comment. It can then post that URL into a comment with the right formatting, and download existing GitHub attachments to a local file. Normally GitHub offers no public API for this, so the skill relies on the unofficial gh-attach command-line extension.

Great for

  • Developers who want screenshots of UI changes added to pull requests automatically
  • Teams that keep before/after images or logs in private repositories and need them to stay private
  • Maintainers who regularly download files attached to issues for local review

Skip it if

  • Users who cannot install GitHub CLI extensions or who lack a logged-in browser session, since uploads will fail without it
  • Shared or production environments where a session cookie would be exposed, because that cookie grants full account access
  • Work that needs an officially supported API, since this depends on an undocumented internal endpoint that could change without notice

Try asking

  • “Attach this screenshot to the PR and embed it in a comment”
  • “Add the before and after images to issue 42”
  • “Download this GitHub attachment URL to ./logs/crash.zip”
  • “Upload recording.mp4 to the repo and link it in the pull request description”
Step-by-step guide: how to use GitHub File AttachmentsInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    gh-attach.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip gh-attach.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip gh-attach.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Use absolute, quoted file paths and specify -R owner/repo explicitly so uploads go to the intended repository.
  • Keep the GH_ATTACH_SESSION_TOKEN cookie out of shared logs and version control, and treat it like a password.
  • For private repos, check that the rendered image is visible to the intended viewers, since anonymous access returns 404 or 403 by design.

What's inside

  • SKILL.md

Redistributed unmodified from github/awesome-copilot under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.