Gh Attach
Install this skill
No account required. Pick your tool, then copy.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install cherry-studio-gh-attachWhat this does: Attach local images or videos (screenshots, recordings) to GitHub issues, pull requests, and comments with `gh --attach`. Use before any `gh issue` or `gh pr` create, edit, or comment that carries a screenshot or recording.
Manual setup by platform
Claude Code
~/.claude/skills/cherry-studio-gh-attach/SKILL.md
Signing
SignedSLSA L2- Signed by
- skills-hub.ai distributor
- Method
- Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
- Key
- skills-hub-ed25519-2026-11
- Signed
Instructions
Attaching Images and Videos to GitHub
--attach <file> (gh 2.99+) uploads each file and puts it into the body. It works on
gh issue create|edit|comment and gh pr create|edit|comment. gh pr review has no --attach,
so post a review's images in a gh pr comment. Each command's --help has the flag syntax.
Check Every File First
An upload cannot be taken back. It is public as soon as it finishes, gh has no way to delete
it, and removing its reference from the body leaves the file at its public URL. Editing the issue,
pull request, or comment afterwards does not undo what a screenshot shows. Look at every image
yourself before uploading, and at frames extracted from each GIF or video with ffmpeg. Look for local
context: user names, home-directory paths, conversation or topic titles, browser tabs, other
windows, API keys, email addresses. Crop or recapture a file that shows any of it, or ask the user.
Wherever the user sees the body, in a preview before posting or in the report after it, list each
attachment's path with one line on what it shows.
Place Files in the Body
Keep the files inside the repository, such as under .context/capture-ui/, copying in any file from
elsewhere, and run gh from the repository root. Embed each image where it belongs in the body, and
pass the same file with --attach:

gh issue create --title "<title>" --body-file "<body_file>" \
--attach ".context/capture-ui/<task>/settings-error.png"
Write the same relative path in both places. gh pairs a reference with its file by resolving both
against the directory gh runs in, not the body file's directory. A reference that does not pair
stays a broken local path, and its file is appended to the end of the body instead. A reference
whose upload fails is posted exactly as written, so the path itself must show nothing private, such
as a user name in a home directory.
A video plays only when its reference stands alone in a paragraph. Anywhere else, such as in a table
cell, gh turns it into a link.
Read the Outcome
Whether a URL reached stdout decides the next step:
-
Non-zero exit, no URL, and one of these errors: nothing was posted, so retrying is safe.
unknown flag: --attachmeans gh is older than 2.99: ask the user to upgrade gh, or go on
without attachments.attaching files requires write access to the repositorymeans the account
lacksWRITE,MAINTAIN, orADMINpermission: go on without attachments. To go on without
them, remove the image references from the body, post without--attach, and tell the user to
drag the files into the issue, pull request, or comment on GitHub. -
Non-zero exit, no URL, any other error: the item may exist.
gh issue create, for one,
creates the issue before it sets the issue type, and prints the URL only after that. Look the
item up by its title before posting again. -
Non-zero exit, URL printed: the issue, pull request, or comment exists, but uploads stopped
at the first failure and the remaining references are still local paths. Repair what was posted
instead of posting again, which would leave a duplicate. Pass every file again, since the body
file still holds the local paths:gh issue edit "<url>" --body-file "<body_file>" --attach "<file_1>" --attach "<file_2>" gh pr edit "<url>" --body-file "<body_file>" --attach "<file_1>" --attach "<file_2>" # a comment: rewrite your last one gh pr comment "<number>" --edit-last --body-file "<body_file>" --attach "<file_1>"
Security
Reviews (0)
Related skills
Browse all →More from Cherry Studio
View source →More Build skills
Browse category →Frequently asked questions about gh-attach
What does the gh-attach skill do?
Attach local images or videos (screenshots, recordings) to GitHub issues, pull requests, and comments with `gh --attach`. Use before any `gh issue` or `gh pr` create, edit, or comment that carries a screenshot or recording. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the gh-attach skill?
Run `npx @skills-hub-ai/cli install cherry-studio-gh-attach` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/cherry-studio-gh-attach/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does gh-attach work with?
gh-attach runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the gh-attach skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use gh-attach after installing it?
In Claude Code, type `/cherry-studio-gh-attach` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the gh-attach skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.