gh-attach
하는 일
이 도구는 이미지나 문서 같은 파일을 GitHub에 올려 버그 보고나 코드 리뷰 요청 같은 토론에서 쓸 수 있도록 돕습니다. 또한 GitHub에 올라온 파일을 내려받을 수도 있습니다.
사용하는 경우
- ✓버그 보고서에 이미지를 추가해야 할 때.
- ✓코드 변경 요청에 파일을 포함할 때.
- ✓GitHub에서 누군가 공유한 파일을 내려받고 싶을 때.
스킬 링크
https://github.com/github/awesome-copilot/blob/main/skills/gh-attach/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 스크린샷을 제 버그 보고서에 첨부해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
내부에서는 도구가 특별한 GitHub 명령을 사용해 파일을 보냅니다. 그런 다음 GitHub이 자동으로 이해하고 표시하는 링크를 줍니다. 내려받을 때는 같은 링크와 사용자의 GitHub 로그인을 사용해 파일을 가져옵니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
gh-attach
gh attach uploads a file to GitHub's internal user-attachments endpoint (no public API exists) and prints the URL, which GitHub auto-renders (image/video/file) wherever it's pasted. The URL inherits the repo's visibility, so private-repo uploads stay private.
Prerequisites
gh extension list | grep -q 'gh attach' || gh extension install sudosubin/gh-attach
Uploads use a GitHub browser session cookie, not the gh token. By default, gh must be authenticated so gh-attach can select the matching browser account. If the wrong account is selected, add --browser <name> --profile <name>. For headless use, set GH_ATTACH_SESSION_TOKEN to the bare user_session cookie value. Treat it as a full account credential.
Steps
1. Upload: Use an absolute quoted path. -R is optional inside a repository. For GHES, use -R host/owner/repo. The command prints the URL on one line. GitHub auto-renders it (image/video/file), so use it as-is:
URL=$(gh attach "$FILE" -R <owner>/<repo>)
2. Embed (always --body-file -, e.g. gh pr comment/edit, gh issue comment/edit):
printf '## Screenshots\n\n%s\n' "$URL" | gh pr comment <pr> -R <owner>/<repo> --body-file -
3. Download: Specify the destination explicitly. Private attachments use the active gh token, with browser cookies as an authorization fallback:
gh attach download "$URL" -O "$FILE"
Notes
- Private repo: URL renders only for authorized viewers. An anonymous fetch is expected to return 404 or 403.
- Sizing: embed
<img width="800" src="$URL">instead of the bare URL. - GitHub Cloud and GHES decide which file extensions and content types they accept.
자주 묻는 질문
파일이 비공개 저장소에서 온 것이라면 어떻게 되나요?
비공개 프로젝트에 올린 파일이라면, 그 프로젝트를 볼 권한이 있는 사람만 링크로 파일을 볼 수 있습니다.
토론에 이미지를 넣을 때 크기를 바꿀 수 있나요?
네, 간단한 HTML 코드로 이미지 크기를 지정할 수 있습니다. 예를 들어 `<img width="800" src="FILE_URL">`처럼 씁니다.
어떤 종류의 파일을 올릴 수 있나요?
GitHub이 허용하는 파일 형식과 콘텐츠 유형은 GitHub이 결정합니다. 일반적으로 이미지, PDF, 동영상, zip 파일이 지원됩니다.
상세 정보
작성자의 원본 설명
Uploads a local file (screenshot, image, PDF, zip, video) to GitHub user-attachments, downloads GitHub user-attachments, and embeds local files in a PR, issue, or comment. Use when asked to "attach a screenshot to the PR", "add an image to the issue", "embed before/after screenshots", "attach this file", or "download this GitHub attachment". Powered by `gh-attach`.
repo: github/awesome-copilot
인기도
- GitHub 스타
- 40k
- 순위
- #7221
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
acquire-codebase-knowledge
40k에이전트가 기존 코드 프로젝트를 이해하고 문서화하도록 돕습니다. 새 구성원을 맞이하거나 아키텍처를 개괄적으로 파악할 때 유용합니다.
acreadiness-assess
40k에이전트가 프로젝트의 AI 준비 상태를 평가하고 보고서를 만들도록 합니다. 프로젝트가 AI 도구를 쓸 준비가 얼마나 되어 있는지 이해하는 데 유용합니다.
acreadiness-generate-instructions
40k에이전트가 평가 결과를 바탕으로 AI 도구를 위한 지침을 만들도록 돕습니다. AI가 코드와 상호작용하는 방식을 개선하고 확인된 공백을 메울 때 유용합니다.
acreadiness-policy
40k에이전트가 AI 프로젝트 평가를 위한 정책을 정의하거나 적용하도록 돕습니다. 프로젝트 평가 방식을 표준화하고 규정 준수를 보장할 때 유용합니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.