gh-attach
यह क्या करती है
यह टूल आपको files (जैसे images या documents) GitHub पर upload करने और उन्हें discussions में इस्तेमाल करने में मदद करता है, जैसे bug reports या code review requests में। यह GitHub पर upload की गई files को download करने की सुविधा भी देता है।
कब इस्तेमाल करें
- ✓जब आपको bug report में कोई image जोड़नी हो।
- ✓किसी code change request में file शामिल करने के लिए।
- ✓जब आप GitHub पर किसी की शेयर की हुई file download करना चाहें।
Skill का लिंक
https://github.com/github/awesome-copilot/blob/main/skills/gh-attach/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस screenshot को मेरी bug report में attach करो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
पर्दे के पीछे, टूल आपकी file भेजने के लिए एक खास GitHub command का उपयोग करता है। फिर यह आपको एक link देता है, जिसे GitHub अपने-आप समझकर file दिखा देता है। Download के लिए, यह उसी link और आपके GitHub login का उपयोग करके file लाता है।
तकनीकी सामग्री (मूल 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.
अक्सर पूछे जाने वाले सवाल
अगर file private repository की हो तो क्या होगा?
अगर file किसी private प्रोजेक्ट पर upload की गई है, तो link के ज़रिए केवल वही लोग उसे देख पाएंगे जिनके पास उस प्रोजेक्ट को देखने की अनुमति है।
क्या discussion में डालने पर image का साइज़ बदल सकता हूं?
हां, आप सरल HTML code से image का साइज़ बता सकते हैं, जैसे `<img width="800" src="FILE_URL">`।
मैं किस तरह की files upload कर सकता हूं?
GitHub खुद तय करता है कि कौन सी file types और content types स्वीकार होंगे। आम तौर पर images, PDF, videos और zip files समर्थित होती हैं।
जानकारी
लेखक का मूल विवरण
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
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
acquire-codebase-knowledge
40kआपके एजेंट को किसी मौजूदा code प्रोजेक्ट को समझने और उसका documentation बनाने में मदद करता है। यह नए लोगों को प्रोजेक्ट से जोड़ने या architecture का सार जानने में उपयोगी है।
acreadiness-assess
40kआपके एजेंट को किसी प्रोजेक्ट की AI के लिए तैयारी जाँचने और रिपोर्ट बनाने देता है। यह समझने में उपयोगी है कि प्रोजेक्ट AI tools इस्तेमाल करने के लिए कितना तैयार है।
acreadiness-generate-instructions
40kआपके एजेंट को assessment के आधार पर AI tools के लिए निर्देश बनाने में मदद करता है। यह बताता है कि AI कोड के साथ बेहतर कैसे काम करे और पहचानी गई कमियाँ कैसे दूर हों।
acreadiness-policy
40kआपके एजेंट को AI प्रोजेक्ट assessment के लिए नीतियाँ तय करने या लागू करने में मदद करता है। यह प्रोजेक्ट्स के मूल्यांकन को मानक बनाने और compliance सुनिश्चित करने में उपयोगी है।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।