/install github-image-hosting
Image Upload for GitHub
Upload an image to img402.dev's free tier and embed the returned URL in GitHub markdown.
Quick reference
# Upload (multipart)
curl -s -X POST https://img402.dev/api/free -F image=@/tmp/screenshot.png
# Response
# {"url":"https://i.img402.dev/aBcDeFgHiJ.png","id":"aBcDeFgHiJ","contentType":"image/png","sizeBytes":182400,"expiresAt":"2026-02-17T..."}
Workflow
- Get image: Use an existing file, or capture a screenshot:
screencapture -x /tmp/screenshot.png # macOS — full screen screencapture -xw /tmp/screenshot.png # macOS — frontmost window - Verify size: Must be under 1MB. If larger, resize:
sips -Z 1600 /tmp/screenshot.png # macOS — scale longest edge to 1600px - Upload:
curl -s -X POST https://img402.dev/api/free -F image=@/tmp/screenshot.png - Embed the returned
urlin GitHub markdown:
GitHub integration
Use gh CLI to embed images in PRs and issues:
# Add to PR description
gh pr edit --body "$(gh pr view --json body -q .body)
"
# Add as PR comment
gh pr comment --body ""
# Add to issue
gh issue comment 123 --body ""
Constraints
- Max size: 1MB
- Retention: 7 days — suitable for PR reviews, not permanent docs
- Formats: PNG, JPEG, GIF, WebP
- Rate limit: 1,000 free uploads/day (global)
- No auth required
Tips
- Prefer PNG for UI screenshots (sharp text). Use JPEG for photos.
- If a screenshot is too large, reduce dimensions with
sips -Z 1600before uploading. - When adding to a PR body or comment, use
gh pr commentorgh pr editwith the image markdown.
Paid tier
For permanent images (1 year, 5MB max), use the paid endpoint at $0.01 USDC via x402. See https://img402.dev/blog/paying-x402-apis for details.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install github-image-hosting - 安装完成后,直接呼叫该 Skill 的名称或使用
/github-image-hosting触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
github-image-hosting 是什么?
Upload images to img402.dev for embedding in GitHub PRs, issues, and comments. Images under 1MB are uploaded free (no payment, no auth) and persist for 7 days. Use when the agent needs to share an image in a GitHub context — screenshots, mockups, diagrams, or any visual. Triggers: "screenshot this", "attach an image", "add a screenshot to the PR", "upload this mockup", or any task producing an image for GitHub. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1101 次。
如何安装 github-image-hosting?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install github-image-hosting」即可一键安装,无需额外配置。
github-image-hosting 是免费的吗?
是的,github-image-hosting 完全免费(开源免费),可自由下载、安装和使用。
github-image-hosting 支持哪些平台?
github-image-hosting 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 github-image-hosting?
由 rahulgi(@rahulgi)开发并维护,当前版本 v1.0.0。