From github
Upload screenshots or images to GitHub and get back embeddable URLs for PR comments and issues. Use this when you have taken a screenshot, captured a UI change, or have any image file that needs to be shared in a GitHub PR or issue.
How this skill is triggered — by the user, by Claude, or both
Slash command
/github:upload-screenshotThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Upload images to GitHub via release assets and get back stable, embeddable URLs. This is the recommended way to share screenshots of frontend changes, UI diffs, or any visual artifacts in PR comments and issue descriptions.
Upload images to GitHub via release assets and get back stable, embeddable URLs. This is the recommended way to share screenshots of frontend changes, UI diffs, or any visual artifacts in PR comments and issue descriptions.
Important: Always upload to the fork repo, not upstream, to avoid polluting upstream releases.
Use this skill when you:
gh CLI: Authenticated with gh auth logingh token must have permission to create releases on the target repobash "${CLAUDE_PLUGIN_ROOT}/skills/upload-screenshot/upload_screenshot.sh" \
--file /path/to/screenshot.png \
--repo owner/fork-repo
bash "${CLAUDE_PLUGIN_ROOT}/skills/upload-screenshot/upload_screenshot.sh" \
--file /path/to/screenshot.png \
--repo owner/fork-repo \
--title "Login page after dark mode changes"
| Parameter | Required | Description |
|---|---|---|
--file | Yes | Path to the image file (png, jpg, gif, svg, webp) |
--repo | No | Target GitHub repository in owner/repo format (defaults to $FORK_REPO env var) |
--title | No | Alt text for the image (defaults to filename) |
--token-file | No | Path to a file containing a GitHub token to use for auth |
When --token-file is provided, the token is loaded into GITHUB_TOKEN for the duration of the script. This is useful in CI where the default GITHUB_TOKEN may not have write access to the target repo.
Environment variable defaults: If --repo is not provided, the script uses $FORK_REPO. If no explicit token is provided via --token-file, the script uses $GH_FORK_TOKEN when available. This means in CI environments where these env vars are set, you can call the script with just --file and it will upload to the correct fork with the right credentials.
JSON on stdout:
{
"url": "https://github.com/owner/fork-repo/releases/download/screenshot-1719100000-a1b2c3d4/screenshot.png",
"markdown": "",
"tag": "screenshot-1719100000-a1b2c3d4",
"repo": "owner/fork-repo"
}
After uploading, use the markdown field directly in a gh pr comment:
result=$(bash "${CLAUDE_PLUGIN_ROOT}/skills/upload-screenshot/upload_screenshot.sh" \
--file /tmp/screenshot.png --repo owner/fork-repo --title "UI change")
markdown=$(echo "$result" | jq -r '.markdown')
gh pr comment 123 --repo owner/upstream-repo --body "## Screenshot
$markdown"
screenshot-<timestamp>-<random>)browser_download_url from the GitHub APIThe release is marked as a prerelease and tagged with a screenshot- prefix for easy identification and cleanup.
Screenshot releases accumulate over time. To clean up old uploads:
# Delete a specific screenshot release
gh release delete screenshot-1719100000-a1b2c3d4 --yes --cleanup-tag --repo owner/fork-repo
# Delete all screenshot releases older than 30 days
gh api "repos/owner/fork-repo/releases" --paginate --jq \
'.[] | select(.tag_name | startswith("screenshot-")) | select(.prerelease) | .tag_name' | \
while read -r tag; do
gh release delete "$tag" --yes --cleanup-tag --repo owner/fork-repo
done
| Error | Cause | Resolution |
|---|---|---|
Missing required arguments | --file or --repo not provided | Provide both required arguments |
File not found | Image path doesn't exist | Check the file path |
Failed to create release | Auth or permission issue | Run gh auth login or check repo access |
Failed to retrieve asset URL | Release created but asset missing | Retry; the release is auto-cleaned on failure |
gh release create docs: https://cli.github.com/manual/gh_release_createnpx claudepluginhub saschagrunert/ai-helpers --plugin githubCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
3plugins reuse this skill
First indexed Jul 11, 2026