Agent skill

GitHub PR Images

by bikeindex in bikeindex/bike_index

Embed a local image file into an existing GitHub PR — either in the PR body or as a comment.

AGPL-3.0Auto-check passedDevelopment

Install GitHub PR Images

skills CLI
$ npx skills add bikeindex/bike_index --skill github-pr-images -a claude-code

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

GitHub CLI
$ gh skill install bikeindex/bike_index github-pr-images --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/bikeindex/bike_index.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/github-pr-images .claude/skills/github-pr-images && 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
github-pr-images
GitHub stars
308
Token cost
~1.8k tokens
SKILL.md length
763 words
Files
4 (incl. references, assets)
Skills in repo
12
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Embed a local image file into an existing GitHub PR — either in the PR body or as a comment.

  • Works in 4 steps: Resolve PR context → The body → Post it → …
  • A request pairs a local image (screenshot
  • SKILL.md covers Preflight: which route this…, Step 1: Resolve PR context, Step 2: The body and Step 3: Post it, plus 2 more sections
  • Runs Shell and Ruby scripts from its folder; calls gh, brew and ruby; reaches github.com

What it does

GitHub PR Images is an agent skill from bikeindex/bike_index. Embed a local image file into an existing GitHub PR — either in the PR body or as a comment. Trigger when a request pairs a local image (screenshot, .png/.jpg, CleanShot capture, before/after) with an existing PR (by number, URL, branch name, or "the open PR"), regardless of verb — attach, embed, add, put, post, drop, show, document. Also covers visually documenting test runs, bug repros, UI states, or CI failures on an existing PR. Uploads through gh's --attach flag — except in the Claude Code web sandbox, which…

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files and assets (for example `assets/commit_images.sh` and `references/web-sandbox.md`).

It sits in Development, covering Pull requests and Failing and flaky tests. It works with GitHub. The repository describes itself as: All the code for Bike Index, because we love you. The licence is AGPL-3.0.

When your agent uses it

  • A request pairs a local image (screenshot
  • CleanShot capture
  • Before/after) with an existing PR (by number
  • Regardless of verb — attach

Example prompts

  • “the open PR”
  • “s history instead. It also owns the PR”
  • “/github-pr-images”

Requirements

  • A Bash shell
  • Pre-approved tools (allowed-tools): Bash(gh:*), Bash(rtk proxy gh:*), Bash(ruby .claude/skills/github-pr-images/assets/inline_attachments.rb:*), Bash(brew upgrade gh), Bash(cp:*), Bash(bash .claude/skills/github-pr-images/assets/commit_images.sh:*), Bash(curl -sI https://raw.githubusercontent.com/:*), Read, Write, mcp__github__list_pull_requests, mcp__github__get_me, mcp__github__issue_read, mcp__github__add_issue_comment, mcp__github__update_issue_comment

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Resolve PR context
  2. The body
  3. Post it
  4. Verify

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(gh:*)
    • Bash(rtk proxy gh:*)
    • Bash(ruby .claude/skills/github-pr-images/assets/inline_attachments.rb:*)
    • Bash(brew upgrade gh)
    • Bash(cp:*)
    • Bash(bash .claude/skills/github-pr-images/assets/commit_images.sh:*)
    • Bash(curl -sI https://raw.githubusercontent.com/:*)
    • Read
    • Write
    • mcp__github__list_pull_requests

    …and 4 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell and Ruby), which the agent can run.

    Shell commands in SKILL.md call:

    • gh
    • brew
    • ruby

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

GitHub PR Images loads about 1.8k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 210 tokens; SKILL.md has 763 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~210
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.7k

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 bikeindex/bike_index at commit ba388d8, republished under its AGPL-3.0 licence (© bikeindex). 763 words, ~1,807 tokens.

Download SKILL.mdSave it as .claude/skills/github-pr-images/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
github-pr-images
description
Embed a local image file into an existing GitHub PR — either in the PR body or as a comment. Trigger when a request pairs a local image (screenshot, .png/.jpg, CleanShot capture, before/after) with an existing PR (by #number, URL, branch name, or "the open PR"), regardless of verb — attach, embed, add, put, post, drop, show, document. Also covers visually documenting test runs, bug repros, UI states, or CI failures on an existing PR. Uploads through `gh`'s `--attach` flag — except in the Claude Code web sandbox, which has no `gh` and hosts images through the PR branch's history instead. It also owns the PR's one `## Screenshots` comment — finding, creating, editing and verifying it — so other workflows (the `pr` skill's screenshot phase) hand it a composed body that references local image paths, and it posts it.
allowed-tools
Bash(gh:*), Bash(rtk proxy gh:*), Bash(ruby .claude/skills/github-pr-images/assets/inline_attachments.rb:*), Bash(brew upgrade gh), Bash(cp:*), Bash(bash .claude/skills/github-pr-images/assets/commit_images.sh:*), Bash(curl -sI https://raw.githubusercontent.com/:*), Read, Write, mcp__github__list_pull_requests, mcp__github__get_me, mcp__github__issue_read, mcp__github__add_issue_comment, mcp__github__update_issue_comment

Upload Image to PR

gh pr comment, gh pr edit and gh pr create take --attach '<file>#<alt text>', up to 50 per command. A markdown ![alt](tmp/x.png) reference to an attached path is rewritten in place to the uploaded user-attachments/assets/ URL. An <img src="tmp/x.png"> isn't — it keeps its path, and the upload is appended to the end as ![<basename>](url), as is any attached file the body doesn't reference.

There's no upload-only call: assets upload as part of posting, so callers hand over a body that references local paths, never URLs they need back first.

Preflight: which route this run takes

$CLAUDE_CODE_REMOTE decides which, before anything else here.

true — the web sandbox, which has no gh and follows references/web-sandbox.md for the whole flow.

Unset — make sure gh has --attach:

bash
gh help pr comment | grep -q -- --attach || brew upgrade gh

gh help pr comment, not gh pr comment --help — the rtk hook swallows the latter's output. Still missing after the upgrade, or no gh at all → stop and say so, posting nothing.

Step 1: Resolve PR context

If the user didn't specify a PR number or URL, auto-detect it:

bash
gh pr view --json number,url -q '"\(.number) \(.url)"'

Reference each image by its path from the repo root, the same in the body as in --attach. A path with special characters (Unicode narrow spaces from CleanShot X) goes through the project's tmp/ first:

bash
cp /path/to/CleanShot*keyword*.png tmp/screenshot.png

Step 2: The body

A caller's body is posted verbatim — don't recompose it. Composing it yourself:

## Screenshots

<img src="tmp/screenshot.png" width="500">

Images in table cells want <img … width=…>; elsewhere ![alt](path) is fine. Don't give an <img>'s file a #alt on --attach — step 3's script finds its upload by the basename gh uses as the default alt.

Step 3: Post it

This skill owns the ## Screenshots comment: one per PR, authored by you, body starting ## Screenshots even when what's under it isn't screenshots — retitle it and the next run can't find it.

bash
ME=$(gh api user --jq .login)
gh api --paginate "repos/{owner}/{repo}/issues/$PR_NUMBER/comments" \
  --jq ".[] | select(.user.login == \"$ME\") | {id, body: .body[:14]}"

The comment whose body starts ## Screenshots is $SCREENSHOT_COMMENT_ID. --paginate matters — on a busy PR it often isn't on the first page.

A caller updating one page of a multi-page comment needs the current body to edit — hand it back on request: gh api repos/{owner}/{repo}/issues/comments/$SCREENSHOT_COMMENT_ID --jq .body.

Write the body to a file. With images to upload, attach one --attach per image the body references, and update $SCREENSHOT_COMMENT_ID in place rather than replacing it — a re-capture never posts a second comment. Which command depends on whether it's your last comment on the PR:

bash
gh api --paginate "repos/{owner}/{repo}/issues/$PR_NUMBER/comments" --jq ".[] | select(.user.login == \"$ME\") | .id" | tail -1
  • No $SCREENSHOT_COMMENT_ID yet — post it: rtk proxy gh pr comment $PR_NUMBER --body-file <file> --attach tmp/a.png --attach tmp/b.png.
  • It's your last comment — --edit-last takes --attach, so the same command with --edit-last edits it in place and keeps its id.
  • You've commented since — --edit-last would hit that later one. Upload through a stand-in: post the body as a new comment with its --attaches, run the script below on it, write its body to a file (gh api …/issues/comments/<stand-in-id> --jq .body), PATCH that into $SCREENSHOT_COMMENT_ID as under With nothing to upload, then gh api -X DELETE the stand-in.
Show full SKILL.md (279 more words)Show less

Then, on the comment the uploads landed on:

bash
ruby .claude/skills/github-pr-images/assets/inline_attachments.rb {owner}/{repo} <comment-id>

rtk proxy because the hook reduces the output to "ok commented", and the comment URL it prints carries the id. The script moves each appended upload into its <img src> and PATCHes the comment; it stops without patching if a local src has no upload to take. An image already uploaded stays in the body as its asset URL — attach only what was recaptured.

With nothing to upload, edit in place: gh api -X PATCH repos/{owner}/{repo}/issues/comments/$SCREENSHOT_COMMENT_ID -F body=@<absolute-path> --jq .html_url. -F reads a file from @; -f would post the literal @<file>. The path is absolute because gh resolves @ against the shell's cwd.

Only edit the PR description when the user explicitly asks: gh pr edit $PR_NUMBER --body-file <file> --attach …, referencing images as ![alt](path) — the script patches comments only — with the existing body plus a ## Screenshots section — replace that section if it's already there rather than adding a second. The pr-guardrails hook denies gh pr edit until the pr skill is loaded.

Step 4: Verify

Read the posted body back:

bash
gh api repos/{owner}/{repo}/issues/comments/<id> --jq .body

Pass: no tmp/ path left, an https://github.com/user-attachments/assets/ URL in place of each attached file, and still one ## Screenshots comment on the PR — rerun Step 3's listing. Don't curl those URLs — they 302 to a session-signed S3 URL that 403s unauthenticated.

Troubleshooting

IssueSolution
unknown flag: --attachbrew upgrade gh
no upload matched: <path>The <img>'s file wasn't attached, or its --attach gave a #alt — the script matches on the default alt, the basename
File path with special characters (e.g., Unicode narrow spaces from CleanShot)cp /path/CleanShot*keyword*.png tmp/screenshot.png
Upload refused--attach needs push access to the repo, and takes images and video only

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

Files

SKILL.md and 3 other files (references, assets) in .claude/skills/github-pr-images of bikeindex/bike_index.

  • SKILL.md
  • assets/commit_images.sh
  • assets/inline_attachments.rb
  • references/web-sandbox.md

Open the folder on GitHubat commit ba388d8

Compare with similar skills

GitHub PR Images 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.

GitHub PR Images compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
GitHub PR Images this skillbikeindex/bike_index308—~1.8kAutomated safety check: PassAGPL-3.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
IterateOpenHands/extensions158—~3.8kAutomated safety check: PassMIT
Exposed Bug Fix WorkflowJetBrains/Exposed9.3k—~3.8kAutomated safety check: PassApache-2.0
Debug Os Failure On GitHubstrands-agents/box110—~1.3kAutomated safety check: NotesApache-2.0
Has Review Workopenshift-eng/ai-helpers120—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Iterate

    OpenHands/extensions

    Iterate on a GitHub pull request — drive it through CI, code review, and QA until it is merge-ready.

    158 GitHub stars~3.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Exposed Bug Fix Workflow

    JetBrains/Exposed

    Official

    Takes a GitHub or YouTrack issue for the Exposed project through reproduction, a failing test, a fix, validation and a pull request.

    9.3k GitHub stars~3.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Debug Os Failure On GitHub

    strands-agents/box

    Debug a CI failure on an OS you are not on (you are on Linux, it fails on macos-latest, or the reverse) without opening a pull request per attempt.

    110 GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check: notes
  • Has Review Work

    openshift-eng/ai-helpers

    Decide whether a GitHub PR has unanswered authorized review comments or new required CI failures worth a follow-up agent.

    120 GitHub stars~1.9k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Gh Address Comments

    tech-leads-club/agent-skills

    Address review and issue comments on the open GitHub PR for the current branch using gh CLI.

    7k GitHub stars~353 tokensUpdated 18 days ago
    DevelopmentAuto-check passed

More from bikeindex/bike_index

All 12 skills in this repo
  • Admin Data API

    bikeindex/bike_index

    Read live production data from Bike Index through the admin OAuth token — Sidekiq and PgHero status, and the user-submitted bug reports — the same data as the cookie-gated dashboards, but…

    308 GitHub stars~1.9k tokensUpdated today
    Auto-check: notes
  • Manufacturers

    bikeindex/bike_index

    Add a manufacturer to Bike Index in production through the admin OAuth token (POST /admin/manufacturers).

    308 GitHub stars~452 tokensUpdated today
    Auto-check passed
  • PR

    bikeindex/bike_index

    Create or update a pull request for the current branch. An agent skill from bikeindex/bike_index.

    308 GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Fixing Flaky Failures

    bikeindex/bike_index

    How to fix a test that fails intermittently in Bike Index — one that passes locally but fails on CI, fails on one shard, passes on re-run, or is already tagged :flaky.

    308 GitHub stars~5k tokensUpdated today
    Auto-check passed
  • Honeybadger Debugging

    bikeindex/bike_index

    Investigate and fix a specific Honeybadger exception in the Bike Index app — pull the fault, read its backtrace, find the offending code, write the fix.

    308 GitHub stars~1k tokensUpdated today
    Auto-check: notes
  • Merge Conflicts

    bikeindex/bike_index

    How to bring a branch up to date and resolve git merge conflicts the way this repo expects — merge (never rebase or force-push), understand each side's intent before choosing, ask when a resolution…

    308 GitHub stars~3.2k tokensUpdated today
    Auto-check: notes

Works with

Questions about GitHub PR Images

What does GitHub PR Images do?

Embed a local image file into an existing GitHub PR — either in the PR body or as a comment. GitHub PR Images is an agent skill from bikeindex/bike_index. Embed a local image file into an existing GitHub PR — either in the PR body or as a comment.

When should I use GitHub PR Images?

GitHub PR Images fits situations like: A request pairs a local image (screenshot; cleanShot capture; before/after) with an existing PR (by number; regardless of verb — attach.

How do I install GitHub PR Images in Claude Code?

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

How do I install GitHub PR Images in Codex?

Run `npx skills add bikeindex/bike_index --skill github-pr-images -a codex`. Or copy the skill folder (.claude/skills/github-pr-images in bikeindex/bike_index) into .agents/skills/github-pr-images in your project. Codex loads it when a task matches its description.

Can I use GitHub PR Images 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 bikeindex/bike_index --skill github-pr-images -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/github-pr-images, .gemini/skills/github-pr-images, .github/skills/github-pr-images and .opencode/skills/github-pr-images in your project.

What does GitHub PR Images need to run?

Going by SKILL.md and its folder, GitHub PR Images needs a shell and Ruby for the scripts in its folder and the command-line tools its instructions call (gh, brew and ruby). Our summary lists: A Bash shell. Its frontmatter pre-approves these tools: Bash(gh:*), Bash(rtk proxy gh:*), Bash(ruby .claude/skills/github-pr-images/assets/inline_attachments.rb:*), Bash(brew upgrade gh), Bash(cp:*), Bash(bash .claude/skills/github-pr-images/assets/commit_images.sh:*), Bash(curl -sI https://raw.githubusercontent.com/:*), Read, Write, mcp__github__list_pull_requests, mcp__github__get_me, mcp__github__issue_read, mcp__github__add_issue_comment, mcp__github__update_issue_comment.

Does GitHub PR Images access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is GitHub PR Images 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 GitHub PR Images use?

GitHub PR Images is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does GitHub PR Images use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 889 tokens, read only when the agent opens those files.

What are the alternatives to GitHub PR Images?

Skills that share tags, products or a category with GitHub PR Images: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Iterate (OpenHands/extensions, 158 stars), Exposed Bug Fix Workflow (JetBrains/Exposed, 9.3k stars) and Debug Os Failure On GitHub (strands-agents/box, 110 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains GitHub PR Images?

bikeindex (a GitHub organization) maintains it in bikeindex/bike_index, which has 308 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 8, 2026.

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