plugins/github/skills/upload-screenshot/SKILL.md
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.
npx skillsauth add openshift-eng/ai-helpers upload-screenshotInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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_createtools
Analyze a JIRA issue and create a pull request to solve it. Use when the user wants to implement a fix or feature described in a Jira issue, push a branch, and open a draft PR.
development
Use when a deeper level of code review is requested. Multi-agent panel code review with specialist reviewers and forced runtime reproducers for all BLOCKING bug findings. Optionally posts to GitHub/GitLab as a PENDING review.
development
Review agentic documentation — verify claims locally against source code first, then use chai-bot for cross-repo and cross-functional verification
development
Use this skill when debugging a failed Prow CI job.