gh-image
Was er macht
Dieses Tool lädt Bilder von deinem Computer zu GitHub hoch und erstellt einen Link, über den du die Bilder überall ansehen kannst. Das ist praktisch, um Screenshots oder Bilder zu Projekten auf GitHub hinzuzufügen.
Wann du ihn nutzt
- ✓Wenn du ein Bild zu einem Pull Request (PR) auf GitHub hinzufügen möchtest.
- ✓Um ein Bild in ein Issue oder einen Kommentar auf GitHub einzufügen.
- ✓Um in einer README-Datei zu zeigen, wie etwas vorher und nachher aussah.
Link zum Skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/gh-image/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Hänge diesen Screenshot an meinen PR an.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Das Tool lädt das Bild zu GitHub hoch und gibt dir einen speziellen Link zurück. Dieser Link wird dann dort eingefügt, wo du ihn haben möchtest, zum Beispiel in der PR-Beschreibung oder in einem Kommentar.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von 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.
Häufige Fragen
Muss GitHub auf meinem Computer installiert sein?
Ja, du brauchst das Tool 'gh', das installiert und eingerichtet sein muss, damit du GitHub über dein Terminal nutzen kannst.
Wie weiß das Tool, welches Bild hochgeladen werden soll?
Du gibst den genauen Dateipfad des Bildes auf deinem Computer an, wenn du die Anfrage stellst.
Wo werden die Bilder gespeichert?
Die Bilder werden zu GitHub hochgeladen und sind an die Sichtbarkeit deines Repositorys gebunden.
Details
Originalbeschreibung des Autors
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.
Beliebtheit
- GitHub-Sterne
- 48k
- Platz im Ranking
- #6277
- Lizenz
- MIT
- Aktualisiert
- 15.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
00-andruia-consultant
48kHilft deinem Agenten, KI-Projekte zu starten oder zu verbessern. Er analysiert Code, schlägt Tools vor und erstellt Aktionspläne auf Spanisch.
007
48kLässt deinen Agenten Sicherheitsaudits und Bedrohungsmodellierung durchführen. Nützlich, um Projekte vor Angriffen und Schwachstellen zu schützen.
10-andruia-skill-smith
48kHilft deinem Agenten, KI-Tools zu erstellen oder zu verbessern. Er legt fest, wie Tools funktionieren, schreibt die Dokumentation und prüft die Struktur.
20-andruia-niche-intelligence
48kLässt deinen Agenten eine Branchenzusammenfassung erstellen. Nützlich, um Kontext, Regeln, Nutzungsmuster und Risiken anhand verlässlicher Quellen zu verstehen.
Ähnliche Skills
gifgrep
394kLässt deinen Agenten GIF-Bibliotheken durchsuchen, Ergebnisse vorab ansehen, ein GIF herunterladen und ein Einzelbild oder ein Kontaktblatt mit Bildern herausziehen.
meme-maker
394kLässt deinen Agenten eine Vorlage für ein Meme auswählen, eigene Beschriftungen hinzufügen und das Meme als SVG- oder PNG-Bild erstellen.
ios-icon-gen
280kHilft deinem Agenten, Icons für iOS-Apps zu erstellen. Er nutzt Apple-Symbole oder Icons aus anderen Quellen und erzeugt die richtigen Dateien.