github-pr-images

Upload local images to a GitHub pull request-scoped prerelease for asset URLs.

Updated Oct 15, 2021
One-click install
npx skills add https://github.com/toqoz/config --skill github-pr-images
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-pr-images
Source: https://github.com/toqoz/config/tree/main/home/agents/skills/github-pr-images
Command: npx skills add https://github.com/toqoz/config --skill github-pr-images

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, jq.

What problem does it solve?

This skill solves the lack of native GitHub CLI support for uploading images directly into a pull request body, ensuring that visual assets remain private and scoped to the repository.

Core Features & Use Cases

  • Automated Uploads: Uploads local screenshots, diagrams, or GIFs to a dedicated PR-scoped prerelease.
  • Asset Management: Returns raw asset URLs for embedding and supports cleanup after a PR is merged.
  • Use Case: When documenting a UI change in a PR, use this skill to upload your local screenshots to the repository's internal storage and receive the direct links needed to populate your PR description.

Quick Start

Use the github-pr-images skill to upload the screenshot file named feature-demo.png to the current pull request number.

Frequently Asked Questions about github-pr-images

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upload local images to a GitHub pull request from the CLI?

To upload local images to a GitHub pull request, you can use a skill that pushes files to a PR-scoped prerelease, generating persistent raw URLs for embedding directly in the PR body.

How can I keep screenshot assets private and scoped to my GitHub repository?

Keeping screenshot assets private involves anchoring them to a dedicated orphan branch within your repository, ensuring the visual assets remain scoped and inaccessible to the public.

Do I need the GitHub CLI and jq to automate PR image uploads?

Yes, you need the GitHub CLI and jq to automate PR image uploads, as the process requires authenticated GitHub CLI access and jq to parse the API responses during asset retrieval.

What is the best way to manage and clean up image assets after a pull request is merged?

The best way to manage and clean up image assets after a PR is merged is to use a tool that supports asset deletion from the PR-scoped prerelease, preventing repository storage bloat.

Why does my GitHub pull request image upload require a specific pull request number?

Your GitHub pull request image upload requires a specific pull request number because the mechanism creates a PR-scoped prerelease to anchor the images, which necessitates an existing target pull request.