Official agent skill

Gh Attach

by github in github/awesome-copilot

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.

OfficialMITAuto-check passedDocuments & Office

Install Gh Attach

skills CLI
$ npx skills add github/awesome-copilot --skill gh-attach -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install github/awesome-copilot gh-attach --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/gh-attach .claude/skills/gh-attach && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gh-attach
GitHub stars
40k
Used in
1 other repo
Token cost
~529 tokens
SKILL.md length
200 words
Files
1
Skills in repo
417
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Asked to attach a screenshot to the PR
  • SKILL.md covers Prerequisites, Steps and Notes
  • Calls gh; needs GH_ATTACH_SESSION_TOKEN
  • Add an image to the issue

What it does

Gh Attach is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. 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.

Its SKILL.md is about 530 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office. It works with GitHub. The repository describes itself as: Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot. The licence is MIT.

When your agent uses it

  • Asked to attach a screenshot to the PR
  • Add an image to the issue
  • Embed before/after screenshots
  • Attach this file

Example prompts

  • “attach a screenshot to the PR”
  • “add an image to the issue”
  • “embed before/after screenshots”
  • “/gh-attach”

Requirements

  • A credential in GH_ATTACH_SESSION_TOKEN

What it can do on your machine

Read from SKILL.md and the folder at commit 727ff2e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GH_ATTACH_SESSION_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gh Attach loads about 529 tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 200 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~529

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from github/awesome-copilot at commit 727ff2e, republished under its MIT licence (© github). 200 words, ~529 tokens.

Download SKILL.mdSave it as .claude/skills/gh-attach/SKILL.md (or your agent's skills folder).
name
gh-attach
description
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`.

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

sh
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:

sh
URL=$(gh attach "$FILE" -R <owner>/<repo>)

2. Embed (always --body-file -, e.g. gh pr comment/edit, gh issue comment/edit):

sh
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:

sh
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.

© github, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/gh-attach of github/awesome-copilot.

Open the folder on GitHubat commit 727ff2e

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in github/awesome-copilot, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Gh Attach next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gh Attach compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gh Attach this skillgithub/awesome-copilot40k1 repos~529Automated safety check: PassMIT
Markitshift-labs-ai/markit1.3k—~299Automated safety check: PassMIT
Asu Resume Audit SkillClaycui828/ASu-resume-skills369—~1.5kAutomated safety check: PassMIT
Best SkillsLinklyAI/best-skills630—~575Automated safety check: PassCC-BY-4.0
Deepxiv Baseline TableDeepXiv/deepxiv_sdk802—~1.6kAutomated safety check: PassMIT
Editor Updateqwrtln/Homm3BG-mission-book110—~1.2kAutomated safety check: PassCustom licence

Similar skills

  • Markit

    shift-labs-ai/markit

    Convert files and URLs to Markdown. An agent skill from shift-labs-ai/markit.

    1.3k GitHub stars~299 tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Asu Resume Audit Skill

    Claycui828/ASu-resume-skills

    以证据为中心的简历真实性审计与报告生成技能。用户要求核验简历、打假履历、调查候选人经历、分析 GitHub/开源贡献、识别 contributor 到 maintainer/core author 的角色膨胀、核验中外合作办学或学校 title、检查业务指标、梳理公开争议,或者把调查结果制作成 HTML/PDF…

    369 GitHub stars~1.5k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Best Skills

    LinklyAI/best-skills

    Daily cross-platform rankings of AI agent skills (skills.sh, ClawHub, Tencent SkillHub, GitHub, X/HN/Bluesky).

    630 GitHub stars~575 tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Deepxiv Baseline Table

    DeepXiv/deepxiv_sdk

    Build a markdown baseline table for a research topic using deepxiv search, brief, head, and experiment-section reads, extracting paper title, URL, open-source status, datasets, benchmark scores, and…

    802 GitHub stars~1.6k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Editor Update

    qwrtln/Homm3BG-mission-book

    Build a feature or fix a bug in the browser scenario builder under web/ — app, shared parsers, compile/PDF preview, GitHub pull-request flow, picker, search, routes — with tests and every…

    110 GitHub stars~1.2k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Release Latex Fork

    zly2006/zhihu-plus-plus

    Release the LaTeX fork used by Zhihu++. An agent skill from zly2006/zhihu-plus-plus.

    4.2k GitHub stars~1.8k tokensUpdated today
    Documents & OfficeAuto-check passed

More from github/awesome-copilot

All 417 skills in this repo
  • Acquire Codebase Knowledge

    github/awesome-copilot

    Official

    Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Azure Architecture Autopilot

    github/awesome-copilot

    Official

    Designs Azure infrastructure from a natural-language description, or diagrams an existing resource group, then refines the design through conversation and deploys it with Bicep.

    40k GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Draw.io Diagram Generator

    github/awesome-copilot

    Official

    Generates, edits and validates draw.io files with correct mxGraph XML, covering flowcharts, architecture, sequence, ER and UML class diagrams.

    40k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed
  • Credit Risk Data Cleaning

    github/awesome-copilot

    Official

    Cleans raw credit data and screens variables before loan modeling, dropping unstable, noisy or redundant features and writing an Excel report of every step.

    40k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Daily Focus Board

    github/awesome-copilot

    Official

    Builds a warm, browser-based daily focus board the user updates by talking to their agent, with Eisenhower priorities, a brain-dump box and kind not-today carryover.

    40k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Python Pypi Package Builder

    github/awesome-copilot

    Official

    End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI.

    40k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Works with

Questions about Gh Attach

What does Gh Attach do?

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. Gh Attach is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. 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.

When should I use Gh Attach?

Gh Attach fits situations like: asked to attach a screenshot to the PR; add an image to the issue; embed before/after screenshots; attach this file.

How do I install Gh Attach in Claude Code?

Run `npx skills add github/awesome-copilot --skill gh-attach -a claude-code`. Or copy the skill folder (skills/gh-attach in github/awesome-copilot) into .claude/skills/gh-attach in your project. Claude Code loads it when a task matches its description.

How do I install Gh Attach in Codex?

Run `npx skills add github/awesome-copilot --skill gh-attach -a codex`. Or copy the skill folder (skills/gh-attach in github/awesome-copilot) into .agents/skills/gh-attach in your project. Codex loads it when a task matches its description.

Can I use Gh Attach in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add github/awesome-copilot --skill gh-attach -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gh-attach, .gemini/skills/gh-attach, .github/skills/gh-attach and .opencode/skills/gh-attach in your project.

What does Gh Attach need to run?

Going by SKILL.md and its folder, Gh Attach needs the command-line tools its instructions call (gh) and credentials named GH_ATTACH_SESSION_TOKEN. Our summary lists: A credential in GH_ATTACH_SESSION_TOKEN.

Does Gh Attach access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Gh Attach safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gh Attach use?

Gh Attach is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gh Attach use?

About 529 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gh Attach?

Skills that share tags, products or a category with Gh Attach: Markit (shift-labs-ai/markit, 1.3k stars), Asu Resume Audit Skill (Claycui828/ASu-resume-skills, 369 stars), Best Skills (LinklyAI/best-skills, 630 stars) and Deepxiv Baseline Table (DeepXiv/deepxiv_sdk, 802 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gh Attach?

github (a GitHub organization, an official publisher) maintains it in github/awesome-copilot, which has 39,748 GitHub stars. The repository holds 417 skills in this directory. The repository was last updated on October 7, 2026.

Source: github/awesome-copilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.