From gh-workflow
Upload one or more image attachments to GitHub PRs without commits. Supports single or multiple file paths. Uses browser login for authentication. Triggers on requests like "upload this image to the PR," "attach this screenshot to the pull request," "add this image to GitHub without committing," "get a CDN URL for this image," "upload assets for the PR comment," or any variation of uploading images or attachments to GitHub.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gh-workflow:uploading-attachmentshaikuThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**IMPORTANT:** The workflow described below is the only way to upload attachments to GitHub. Do not explore or attempt any alternative approaches.
IMPORTANT: The workflow described below is the only way to upload attachments to GitHub. Do not explore or attempt any alternative approaches.
Upload the image(s) at $ARGUMENTS to GitHub's asset CDN and return markdown-ready URLs.
Heads up: This uses an undocumented GitHub API — uploaded images cannot be deleted from GitHub's CDN. The user should be aware of this before uploading sensitive screenshots.
!${CLAUDE_PLUGIN_ROOT}/skills/uploading-attachments/scripts/get-repo-info.sh
Before starting the workflow, verify preconditions:
$ARGUMENTS is empty, stop and tell the user: "Please provide one or more image file paths to upload."agent-browser --version. If it fails, tell the user: "agent-browser is not installed. Install it with npm install -g agent-browser."gh auth status fails, stop and tell the user: "GitHub CLI is not authenticated. Run gh auth login first."Do not proceed with the workflow if any validation fails.
Copy this checklist and track progress:
- [ ] Step 1: Authenticate via browser
- [ ] Step 2: Upload image(s)
- [ ] Step 3: Return results
First, clean up any stale session from a previous failed run:
agent-browser --session gh-upload close || true
Open the repository in the browser using a dedicated session. If a known auth method is available for GitHub (e.g., --profile, --state), include it:
agent-browser --session gh-upload [auth flags] open "$REPO_URL"
Where $REPO_URL is the repo_url from the repository context above.
Take a snapshot to check login status:
agent-browser --session gh-upload snapshot -i
Check the snapshot for login indicators:
If user is not logged in:
agent-browser --session gh-upload close
--profile so the login persists for future runs. GitHub uses OAuth, so --profile is required — --state and --session-name only capture cookies for the current origin, not third-party OAuth providers:
agent-browser --session gh-upload --headed --profile <profile_path> open https://github.com/login
agent-browser --session gh-upload snapshot -i
agent-browser --session gh-upload close
agent-browser --session gh-upload --profile <profile_path> open "$REPO_URL"
Call the upload script with the session name — it extracts cookies internally:
${CLAUDE_PLUGIN_ROOT}/skills/uploading-attachments/scripts/upload-image.sh \
"$REPO_ID" "gh-upload" $ARGUMENTS
Use repo_id from the repository context above.
This script handles all upload steps for each file:
Returns a JSON array with results for each file.
Then close the browser session:
agent-browser --session gh-upload close
Parse the JSON array response and output for each successful upload:
Upload successful!
| File | URL |
|------|-----|
| image1.png | https://github.com/user-attachments/assets/xxx |
| image2.png | https://github.com/user-attachments/assets/yyy |
Markdown:


| Error | Resolution |
|---|---|
| File not found | Verify file path |
| Unsupported file type | Use PNG, JPEG, GIF, or WebP |
| Cookie extraction failed | Ensure login completed, then retry |
| Upload / finalization failed | Session may have expired — re-run the skill to re-authenticate |
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub ibara1454/agent-marketplace --plugin gh-workflow