An agentic skills framework & software development methodology that works.
GitHub PR image upload skill for agent workflows
This skill lets an agent upload local images to a GitHub pull request and place them in the PR description or comments. On `gh` 2.99.0 or newer, it uses native `--attach`; on older setups, it falls back to a browser flow that extracts GitHub's uploaded image URL and writes it into the PR.
Builders who use a skill-capable agent and want screenshots, test images, or before-and-after images added to GitHub PRs.
You can attach images to a PR by asking your agent instead of uploading them manually.
What it does
Native GitHub CLI attachment
Uses `gh pr edit --attach` and `gh pr comment --attach` when `gh` 2.99.0+ is available.
Browser upload fallback
Opens the PR in a browser, uploads the file through GitHub's comment UI, and reuses the generated hosted image URL.
Preserve existing PR content
Keeps the current PR description when attaching images unless you provide a new body.
Prompt-based triggering
Responds to phrases like "Attach this screenshot to the PR" or "Embed before/after images in the PR".
How to get it
- 1Run
gh skill install tonkotsuboy/github-upload-image-to-pr github-upload-image-to-pr
- 2or
npx skills add tonkotsuboy/github-upload-image-to-pr
README
GitHub Upload Image to PR
[!IMPORTANT] This skill now prefers GitHub CLI's native
--attachflag (gh2.99.0+). When yourghis new enough, it runsgh pr edit --attach ./screenshot.png(orgh pr comment --attach) and is done — no browser automation, no MCP server, no flakiness. On olderghit prompts you to upgrade and falls back to the browser route so the work still gets done. See the v2.99.0 release notes and GitHub's docs.
An AI agent skill that uploads local images to a GitHub PR and embeds them in the description or comments — automatically, just by asking.
Installation
gh skill install tonkotsuboy/github-upload-image-to-pr github-upload-image-to-pr
or
npx skills add tonkotsuboy/github-upload-image-to-pr
Usage
Trigger the skill with phrases like:
- "Attach this screenshot to the PR"
- "Add images to the PR description"
- "Upload test results to the PR"
- "Put this screenshot in the PR"
- "Embed before/after images in the PR"
How It Works
The skill picks one of two paths based on your gh version.
Path A — gh --attach (preferred, gh 2.99.0+)
GitHub CLI 2.99.0 added a repeatable --attach flag to gh pr create / pr edit / pr comment (and the matching gh issue commands), so uploading is a single command:
gh pr edit 23 --attach './screenshot.png#Login error state'
gh pr comment 23 --attach ./before.png --attach ./after.png
Without --body, the existing description is kept and the attachment appended. If the body references a local path such as , that reference is rewritten in place — which is how you get Before/After tables and other layouts from one command.
Requires push access to the repository, and works on GitHub.com and GitHub Enterprise Cloud (not Enterprise Server).
Path B — browser upload (fallback)
GitHub does not provide a public REST API endpoint for uploading image attachments, so before --attach existed the only route was to drive a browser the way a human would:
- Open the PR page in a browser via Chrome DevTools MCP or Playwright MCP
- Locate the comment textarea at the bottom of the PR conversation
- Upload the image file using the file input attached to the textarea — this triggers GitHub's internal upload pipeline and generates a persistent
https://github.com/user-attachments/assets/...URL - Extract the URL from the textarea value before submitting anything
- Clear the textarea (the image URL remains valid even without posting the comment)
- Update the PR description via
gh pr edit, embedding the image as markdown
This works because GitHub's image hosting is separate from comment submission — images persist the moment they're uploaded, whether or not the comment is ever posted. The skill uses this path when gh is older than 2.99.0, when the host is Enterprise Server, or when you lack push access.
Requirements
- An AI agent that supports skills (e.g., Claude Code)
- GitHub CLI (
gh) — 2.99.0 or newer for Path A; required in both paths - Only for Path B (older
gh), one of the following browser automation tools:- Chrome DevTools MCP (recommended — connects to your existing browser, login state preserved)
- Playwright MCP (connects to an existing browser instance)
License
MIT
Copyright 2026 tonkotsuboy
Files in the repo
- skills
- LICENSE
- README.ja.md
- README.md
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More skills

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.
Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.
Public repository for Agent Skills
Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

Production-grade engineering skills for AI coding agents.