moeru-ai/upload-github-attachment-skill
upload-github-attachment
VerifiedUpload a local image or file to GitHub's user-attachments storage and return a URL suitable for issue, pull request, discussion, or comment Markdown. Use when Codex must embed local screenshots, videos, logs, or other evidence in GitHub content without committing the files to a repository.
Upload GitHub Attachment
Use the bundled script so authentication, repository resolution, MIME detection, and URL extraction remain consistent.
Requirements
- Require the
ghCLI andcurl. - Prefer an existing
gh auth loginsession. - When interactive
ghauthentication is unavailable, requireGH_TOKENorGITHUB_TOKENin the environment. - Stop and ask the user to configure one of those authentication methods if
gh auth tokencannot resolve a token. Never print, persist, or interpolate the token into diagnostic output.
Upload
<skill-dir> is the directory that contains this SKILL.md. Run from a checkout of the destination repository:
<skill-dir>/scripts/upload-github-attachment.sh /absolute/path/to/image.png
Specify the repository when the current directory cannot resolve it:
<skill-dir>/scripts/upload-github-attachment.sh \
--repo OWNER/REPO \
/absolute/path/to/image.png
The script prints only the final https://github.com/user-attachments/assets/... URL. Embed it with  for an image or [label](URL) for another file.
Verification
- Require a successful upload command and a returned
https://github.com/user-attachments/assets/...URL. - Use that URL for the intended local file. Do not issue GET or HEAD requests to verify the uploaded asset.
- Do not treat anonymous access returning 404 as an upload failure or a reason to stop the workflow.
- After creating or editing GitHub content, reopen it and verify the attachment Markdown uses the returned URL.
The upload endpoint is currently undocumented by GitHub. Treat a rejected upload request as a blocking capability change instead of committing PR-only artifacts. Background and the observed Bearer-token flow: https://island94.org/2026/08/programmatically-upload-attachments-to-github-issues-pull-requests-comments.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 468k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |