gh-image
하는 일
이 도구는 컴퓨터의 이미지를 GitHub에 올리고, 어디서든 볼 수 있는 링크를 만듭니다. GitHub 프로젝트에 스크린샷이나 이미지를 추가할 때 유용합니다.
사용하는 경우
- ✓pull request(PR)에 이미지를 추가하고 싶을 때.
- ✓GitHub의 이슈나 댓글에 이미지를 넣고 싶을 때.
- ✓README 파일에 변경 전후 모습을 보여 주고 싶은 경우.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/gh-image/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 스크린샷을 제 PR에 첨부해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 이미지를 GitHub에 올리고 특별한 링크를 돌려줍니다. 이 링크를 PR 설명이나 댓글처럼 원하는 곳에 넣습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Upload images to GitHub (gh-image)
GitHub has no public API for image uploads — the web UI uses an internal
endpoint that mints user-attachments URLs scoped to the repo's visibility.
gh-image (MIT, © drogers0) replicates
that flow as a gh CLI extension, so an agent can upload a local image from the
terminal and get a ready-to-embed Markdown image line back.
Overview
This skill drives gh-image to turn a local image file into a hosted GitHub
user-attachments URL, then embeds that URL into a pull request, issue, or
comment. It is the missing "attach a screenshot" capability for terminal agents.
When to Use This Skill
Use this skill when asked to:
- "Attach a screenshot to the PR" or "add an image to the PR description"
- "Put this image in the issue" / "comment with these screenshots"
- "Show the test results / before-and-after in the PR"
- Embed any local image into GitHub Markdown without leaving the terminal
How It Works
Step 1: Verify prerequisites
gh auth status # gh installed & authenticated
gh extension list | grep -q 'drogers0/gh-image' \
|| gh extension install drogers0/gh-image # review/pin the extension source first
gh-image does not use the gh token for the upload (that endpoint rejects
tokens). It needs a GitHub user_session cookie, resolved in this order:
--token <value> flag → GH_SESSION_TOKEN env var (use in CI/headless) → a
logged-in browser's cookie store (default for local use).
Step 2: Upload
# Use an absolute path; --repo is optional inside a repo working dir.
gh image "/abs/path/screenshot.png" --repo <owner>/<repo>
gh image prints Markdown to stdout, one line per image:

Capture that output — it is the embeddable reference.
Step 3: Embed into the PR / issue / comment
MD="$(gh image "/abs/path/shot.png" --repo owner/repo)"
BODY="$(gh pr view <pr> --repo owner/repo --json body -q .body)"
printf '%s\n\n## Screenshots\n\n%s\n' "$BODY" "$MD" \
| gh pr edit <pr> --repo owner/repo --body-file -
Use gh pr comment, gh issue edit, or gh issue comment with --body-file -
for other targets. Always pass --body-file - (not inline --body) so multi-line
bodies and special characters can't break shell quoting.
Step 4: Verify
gh pr view <pr> --repo owner/repo --json body -q .body # confirm URL present
Examples
- Attach a CleanShot screenshot to PR #42: upload the file, append it under a
## Screenshotsheading in the PR body. - Embed before/after images in a README: upload both, paste the two Markdown lines into the README at the relevant section.
Best Practices
- Resolve globs to absolute paths first; quote paths with spaces/Unicode.
- For display sizing, embed an HTML tag instead of bare Markdown:
<img width="800" src="https://github.com/user-attachments/assets/<uuid>" />. - In CI, set
GH_SESSION_TOKENfrom a dedicated bot account.
Limitations
- Session cookie required. A
user_sessioncookie grants full account access (not scoped like a PAT) — treat it like a password; use a bot account in CI. - Write access to the target repo is required; orgs that enforce SAML SSO need
the session authorized at
https://github.com/orgs/<org>/ssofirst. - Private-repo images stay private: the
user-attachmentsURL inherits repo visibility, so an anonymous fetch on a private repo returns 404/403 by design. - Windows + Chrome 127+ cannot read cookies (library limitation) — use another
browser or
GH_SESSION_TOKEN. - The skill embeds the Markdown itself;
gh-imageonly prints the URL.
자주 묻는 질문
컴퓨터에 GitHub를 설치해야 하나요?
예, 터미널에서 GitHub를 사용하려면 ‘gh’ 도구가 설치되고 설정되어 있어야 합니다.
도구는 어떤 이미지를 올릴지 어떻게 아나요?
요청할 때 컴퓨터에 있는 이미지의 정확한 파일 경로를 알려 주면 됩니다.
이미지는 어디에 저장되나요?
이미지는 GitHub에 올라가며, 저장소의 공개 설정에 연결됩니다.
상세 정보
작성자의 원본 설명
Upload local images to GitHub and get canonical user-attachments embed URLs; use when asked to attach a screenshot to a PR, issue, or comment, or to embed before/after images in a README.
인기도
- GitHub 스타
- 48k
- 순위
- #6277
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.