jssblck/agents

github-image-upload

>- Attach local images and videos to a pull request, issue, or comment with gh --attach. Inline text (a transcript, log, or command output) in a fenced code block with a language tag. Use when asked to "attach a screenshot to the PR", "add an image to the PR description", "put this image in the issue", "show test results in the PR", "embed before/after screenshots", or otherwise put visual or text proof on GitHub.

Trending #1459 Hot #3624

Installation

$ npx skills add jssblck/agents --skill github-image-upload

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from jssblck/agents · top by installs.

npx skills add jssblck/agents

Browse all from jssblck/agents

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseMIT
CompatibilityRequires GitHub CLI (`gh`) 2.99.0 or newer, and network access to GitHub.
Allowed toolsGlob Bash(gh auth status) Bash(gh --version) Bash(gh pr create:*) Bash(gh pr edit:*) Bash(gh pr comment:*) Bash(gh issue create:*) Bash(gh issue edit:*) Bash(gh issue comment:*) Bash(gh pr view:*) Bash(gh issue view:*)

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,568 B
  • docs SUMMARY.md 441 B

History

  1. First recorded snapshot · 665 installs

SKILL.md

Attach images and videos on GitHub

--attach uploads a local image or video on the same command that writes an issue, pull request, or comment: gh issue create, gh issue edit, gh issue comment, gh pr create, gh pr edit, and gh pr comment.

--attach is for images and videos. Inline text in the body as a fenced code block with a language tag.

Prerequisites

  1. gh auth status: if it fails, tell the user to run gh auth login.
  2. gh --version: needs 2.99.0+. If older, stop and tell the user to upgrade

(brew upgrade gh, or the install they use). Do not upgrade gh yourself.

Attach

State the image and video files and the destination, then attach. Quote --attach values. --attach accepts png, jpg, jpeg, gif, webp, svg, mp4, mov, and webm.

If you are writing the body, put a Markdown image whose destination is the same path you pass to --attach. gh rewrites that path to a user-attachments URL and keeps the alt text from the Markdown:

gh pr comment 13 --body "$(cat <<'EOF'
The error state:

![Error state](/abs/path/error.png)
EOF
)" --attach '/abs/path/error.png'

A video renders as a player only when its image reference is the whole paragraph, with empty alt: ![](/abs/path/walkthrough.mp4).

If you are not rewriting the body, --attach alone appends:

gh pr comment 13 --attach '/abs/path/shot.png#The login error state'
gh pr edit 13 --attach '/abs/path/shot.png#The login error state'

# alt on the flag applies only when the body does not already reference the file. Repeat --attach for each file.

If attach fails, stop and tell the user. Partial success still creates or updates the item and prints its URL, then exits non-zero: treat that as failure until every intended file is present.

Do not commit the attached files.

Text

Inline a transcript, log, or other text in the body as a fenced code block. Set the language to match the content: console for a shell transcript, json for JSON, diff for a diff, text when nothing else fits. Do not pass text files to --attach.

````markdown

$ pnpm test
PASS  src/foo.test.ts

````

Verify

After --attach, count matches instead of printing the body. Expect at least 1 (use gh issue view <n> for issues):

gh pr view <pr> --repo owner/repo --json body,comments \
  -q '[.body] + [.comments[].body] | join("\n")' | grep -c 'user-attachments'

0 means the attach failed. Re-run the attach command. On a private repo the URL renders only for authorized viewers; an anonymous 404/403 is expected.

When the proof is only inlined text, confirm the language-tagged fence is in the body. A missing user-attachments URL is not a failure if you did not attach media.