gh-image
Helps your agent upload images to GitHub and get links for them. Use to add screenshots to comments or descriptions.
What it does
This tool uploads images from your computer to GitHub and creates a link so they can be viewed anywhere. It's useful for adding screenshots or images to projects on GitHub.
When to use it
- ✓When you want to add an image to a pull request (PR) on GitHub.
- ✓To include an image in an issue or comment on GitHub.
- ✓To show how something looked before and after in a README file.
Example of what to ask your AI
“Attach this screenshot to my PR.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool uploads the image to GitHub and returns a special link. This link is then inserted where you want it, like a PR description or a comment.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill gh-imageOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/skills/gh-image/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
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 auth status # gh installed & authenticated
gh extension list | grep -q 'drogers0/gh-image' \
|| gh extension install drogers0/gh-image # review/pin the extension source first
gh-image does not use the gh token for the upload (that endpoint rejects
tokens). It needs a GitHub user_session cookie, resolved in this order:
--token <value> flag → GH_SESSION_TOKEN env var (use in CI/headless) → a
logged-in browser's cookie store (default for local use).
Step 2: Upload
# Use an absolute path; --repo is optional inside a repo working dir.
gh image "/abs/path/screenshot.png" --repo <owner>/<repo>
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
MD="$(gh image "/abs/path/shot.png" --repo owner/repo)"
BODY="$(gh pr view <pr> --repo owner/repo --json body -q .body)"
printf '%s\n\n## Screenshots\n\n%s\n' "$BODY" "$MD" \
| gh pr edit <pr> --repo owner/repo --body-file -
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
gh pr view <pr> --repo owner/repo --json body -q .body # confirm URL present
Examples
- Attach a CleanShot screenshot to PR #42: upload the file, append it under a
## Screenshotsheading 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.
- For display sizing, embed an HTML tag instead of bare Markdown:
<img width="800" src="https://github.com/user-attachments/assets/<uuid>" />. - In CI, set
GH_SESSION_TOKENfrom a dedicated bot account.
Limitations
- Session cookie required. A
user_sessioncookie grants full account access (not scoped like a PAT) — treat it like a password; use a bot account in CI. - Write access to the target repo is required; orgs that enforce SAML SSO need
the session authorized at
https://github.com/orgs/<org>/ssofirst. - Private-repo images stay private: the
user-attachmentsURL inherits repo visibility, so an anonymous fetch on a private repo returns 404/403 by design. - Windows + Chrome 127+ cannot read cookies (library limitation) — use another
browser or
GH_SESSION_TOKEN. - The skill embeds the Markdown itself;
gh-imageonly prints the URL.
FAQ
Do I need to have GitHub installed on my computer?
Yes, you need to have the 'gh' tool installed and configured to use GitHub from your terminal.
How does the tool know which image to upload?
You provide the exact file path of the image on your computer when you make the request.
Where are the images hosted?
The images are uploaded to GitHub and are associated with your repository's visibility.
Details
Original description by the author
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.
Popularity
- GitHub stars
- 48k
- Ranking position
- #4663
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
ios-icon-gen
Lets your agent generate icons for iOS apps. It uses Apple symbols or icons from other sources to create the correct files.
affaan-m/ECC
algorithmic-art
Helps your agent create art using code, generating unique images. It's useful when you want original computer-generated art.
anthropics/skills
canvas-design
Helps your agent create beautiful visual art in files. It's useful when you ask for a poster, art, or any static design.
anthropics/skills