upload-github-attachment
Installation
SKILL.md
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