Attach Github Assets logo

Attach Github Assets

Organization
intercom
attach-github-assets

Upload local files (screenshots, screen recordings, images, videos) to GitHub as user-attachment assets and return markdown-ready URLs for PR descriptions, issue bodies, or PR/issue comments.

Overview

Publisherintercom
Repository2x-skills
Skill nameattach-github-assets
Stars
251
Forks
14
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by intercom on GitHub. Read the source before you install it.

Installation

Install the Attach Github Assets AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/intercom/2x-skills/tree/main/plugins/pr-tools/skills/attach-github-assets
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/intercom/2x-skills.git /tmp/2x-skills
mkdir -p .claude/skills
cp -r /tmp/2x-skills/plugins/pr-tools/skills/attach-github-assets .claude/skills/attach-github-assets
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Attach Github Assets in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Attach Github Assets on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Attach Github Assets is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Attach GitHub Assets

Upload local files to GitHub via uploads.github.com/user-attachments/assets.

Contract: if loaded, run the script

This skill exists to call upload.sh. If it is loaded with a local file path in context, you MUST run the script — do not describe the flow, do not propose markdown without uploading, do not stop after acknowledging the request. The only correct trajectory ends with a gh/curl-backed upload and either a returned asset URL or a posted comment.

If no local file path is present and none can be inferred from conversation, output no-op: no local file path and exit — do NOT call upload.sh with a placeholder, a remote URL, or a guessed path.

When to Self-Invoke

Self-invoke ONLY when all of the following hold:

  1. The user (or a calling skill) references a concrete local file path — absolute (/tmp/..., ~/Desktop/...) or relative to cwd — for an image (png, jpg, jpeg, gif, webp, svg) or video (mov, mp4, webm).
  2. The destination is GitHub — a PR body, issue body, PR/issue comment, or /create-sub-issues flow.

Canonical triggers:

  • User pastes a local screenshot/recording path and asks to put it on a PR/issue.
  • A PR-creation flow is producing a body and the conversation already contains visual context (e.g. QA screenshots, extracted video frames).

When NOT to invoke

  • The change is backend/logic only and no images or recordings have been mentioned. Most PR-creation prompts in this category never need this skill — do not load it speculatively.
  • The user references a remote URL (already on GitHub, Slack, S3, etc.). The script only handles local files.
  • No file path appears in the conversation. "Should I add a screenshot?" is a question, not an invocation.
  • The file is not a supported type (see upload.sh for the list — only image/video formats are accepted).

If you have been loaded but none of the "When to Self-Invoke" conditions are met, emit no-op: <reason> and return control. This is the script-first path; staying loaded without uploading is the failure mode.

Flow

Step 1: Resolve file path(s)

  • If $ARGUMENTS is set, use those file path(s) verbatim — one per upload.
  • Otherwise, scan the recent conversation for local image/video paths. Use only paths the user actually referenced; do not invent paths.

upload.sh itself errors on missing files (File not found: <path>), so do not pre-gate on existence — pass the user's path through and surface the script's error verbatim if it fails.

Step 2: Run the upload script

The script has two modes. Pick by one fact — where do the files have to end up? Never by weighing mechanisms: the script chooses between native gh --attach and a direct upload itself, so there is nothing to decide beyond the mode.

A new comment on a named issue or PR → post it in one call, all files at once:

bash
${CLAUDE_PLUGIN_ROOT}/skills/attach-github-assets/scripts/upload.sh \
  --post-to <pr|issue>:<number> [--repo OWNER/REPO] [--body "<text>"] "<file-path>" ["<other-file>" ...]

Prints the comment URL. Use pr: for a pull request and issue: for an issue — the wrong one errors. This mode uses gh ... comment --attach when the installed gh has it (v2.99.0+) and otherwise uploads and composes the body itself; both produce the same comment, so no version check is needed here.

Anywhere else → print the asset URL, once per file, for embedding in a body assembled elsewhere:

bash
${CLAUDE_PLUGIN_ROOT}/skills/attach-github-assets/scripts/upload.sh "<file-path>"

The script auto-detects the repo ID from git remote and MIME type from extension. Returns the asset URL on stdout, exits non-zero on failure.

To override repo ID (e.g. uploading from a worktree whose remote isn't the target repo):

bash
${CLAUDE_PLUGIN_ROOT}/skills/attach-github-assets/scripts/upload.sh "<file-path>" <repo_id>

In this mode run the script once per file — never batch into a single invocation, because the second positional argument is read as the repo ID. Never substitute curl, a bare gh command, or any other upload mechanism for the script.

A named PR or issue does not by itself mean --post-to. A PR or issue body — "put these in PR #123's description", "add this to the issue body" — is this mode, not the comment mode: --post-to writes a separate comment and returns no URL, so the body it was meant for would stay unchanged. Use this mode for a body, and let whoever owns that body write the markdown from Step 3 into it.

Step 3: Return markdown for the returned URL(s)

Only for the no-target mode; --post-to has already written the comment.

  • Images (png, jpg, jpeg, gif, webp, svg) → ![{filename}]({url})
  • Videos (mov, mp4, webm) → paste the URL on its own line; GitHub auto-renders video URLs and ![]() would break that.

Examples

  • /attach-github-assets ~/Desktop/screenshot.png
  • /attach-github-assets /tmp/before.png /tmp/after.png

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Attach Github Assets AI skill do?

Upload local files (screenshots, screen recordings, images, videos) to GitHub as user-attachment assets and return markdown-ready URLs for PR descriptions, issue bodies, or PR/issue comments.

Why use Attach Github Assets on TypingMind?

Because you install it once and use it with any model. Attach Github Assets is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Attach Github Assets in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/intercom/2x-skills/tree/main/plugins/pr-tools/skills/attach-github-assets. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Attach Github Assets?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Attach Github Assets?

As many as you like. As long as a model supports skills, you can use Attach Github Assets with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Attach Github Assets AI skill free?

Yes. It is published on GitHub by intercom under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇