Agent skill · software engineering · sickn33

gh-image

Upload local images to GitHub and get canonical user-attachments embed URLs; use when asked to attach a screenshot to a PR, issue, or comment, or to embed before/after images in a README.

Why this skill is useful

Adds a CLI tool for uploading images to GitHub, providing a method to generate user-attachments URLs that the AI wouldn't reliably know how to create on its own.

What it needs

Requires gh installed locally. Requires github account access. About 3k tokens when loaded. Last updated 2026-08-07. 44,571 stars on the source repository.

What this skill does

Upload images to GitHub (gh-image) GitHub has no public API for image uploads — the web UI uses an internal endpoint that mints user-attachments URLs scoped to the repo's visibility. gh-image (MIT, © drogers0) replicates that flow as a gh CLI extension, so an agent can upload a local image from the terminal and get a ready-to-embed Markdown image line back. Overview This skill drives gh-image to turn a local image file into a hosted GitHub user-attachments URL, then embeds that URL into a pull request, issue, or comment. It is the missing "attach a screenshot" capability for terminal agents. When to Use This Skill Use this skill when asked to: "Attach a screenshot to the PR" or "add an image to the PR description" "Put this image in the issue" / "comment with these screenshots" "Show the test results / before-and-after in the PR" Embed any local image into GitHub Markdown without leaving the terminal How It Works Step 1: Verify prerequisites gh-image does not use the gh token for the upload (that endpoint rejects tokens). It needs a GitHub usersession cookie, resolved in this order: --token <value> flag → GHSESSIONTOKEN env var (use in CI/headless) → a logged-in browser's cookie store (default for local use). Step 2: Upload gh image prints Markdown to stdout, one line per image: Capture that output — it is the embeddable reference. Step 3: Embed into the PR / issue / comment Use gh pr comment, gh issue edit, or gh issue comment with --body-file - for other targets. Always pass --body-file - (not inline --body) so multi-line bodies and special characters can't break shell quoting. Step 4: Verify Examples Attach a CleanShot screenshot to PR #42: upload the file, append it under a Screenshots heading in the PR body. Embed before/after images in a README: upload both, paste the two Markdown lines into the README at the relevant section. Best Practices Resolve globs to absolute paths first; quote paths with spaces/Unicode. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills sickn33/gh-image

View the source on GitHub

Browse the @skills marketplace