Skip to content

Add an Agent Skill (SKILL.md) so gh-image is installable via npx skills add - #19

Merged
drogers0 merged 4 commits into
drogers0:mainfrom
mxschmitt:agent-skill
Jun 4, 2026
Merged

Add an Agent Skill (SKILL.md) so gh-image is installable via npx skills add#19
drogers0 merged 4 commits into
drogers0:mainfrom
mxschmitt:agent-skill

Conversation

@mxschmitt

Copy link
Copy Markdown
Contributor

What

Adds skills/github-image-upload/SKILL.md — an Agent Skill that packages gh-image for AI coding agents.

With this, gh-image becomes installable as a cross-agent skill:

npx skills add drogers0/gh-image

The Agent Skills (SKILL.md) standard is consumed natively by Claude Code, OpenAI Codex, and ~40 other agents — so this gives gh-image an agent-native entry point and a listing on skills.sh (ranked by install telemetry, no submission step).

Why

gh-image is a great primitive, but an agent doesn't know it exists or how to use it. The skill provides the procedural knowledge: it walks the agent through the prerequisites, the upload, and embedding the result — so a user can just say "attach this screenshot to the PR" (or issue/comment) and it works.

What the skill does

  • Prerequisites (checked, idempotent): gh auth status; install the extension only if missing (gh extension list | grep -q drogers0/gh-image || gh extension install drogers0/gh-image); explains the user_session cookie / GH_SESSION_TOKEN auth model, with the full-account-cookie security caveat.
  • Upload: gh image <file> --repo owner/repo and capture the ![name](url) it prints.
  • Embed: splice the URL into a PR description, PR comment, or issue via gh ... --body-file - (quoting-safe).
  • Verify + optional <img width> sizing.
  • Troubleshooting table, including the SAML-SSO case (authorize at /orgs/<org>/sso), the Windows + Chrome 127+ note, and the CI/headless GH_SESSION_TOKEN path — all mirroring the README.

It's instruction-only (no bundled binary): the skill tells the agent to gh extension install drogers0/gh-image, so there's nothing to rebuild per release.

Tested

Installed from a fork branch (npx skills add mxschmitt/gh-image#agent-skill) and exercised end-to-end in an agent: "take a screenshot, file a GitHub issue, and upload the image to it" — worked. The skills CLI parses the frontmatter and lists it correctly:

◇  Found 1 skill
│    github-image-upload
│      Upload local images to GitHub and embed them in a pull request description, an issue, or a comment …

MIT-licensed to match the repo. Happy to adjust the wording/scope however you'd prefer.

@drogers0 drogers0 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mxschmitt — this is accurate and well-structured. Two small things before I merge:

  1. One-line README pointer. I'd like the skill discoverable from the README — could you add this under Installation?

    Also available as an agent skill: npx skills add drogers0/gh-image

  2. The SSO troubleshooting row is slightly behind v1.0.1. Since #16 shipped moments ago (thank you!), the tool now detects the SAML interstitial and emits a dedicated message (and the generic "write access?" message carries its own SSO hint), so the current mapping is out of date. Could you update that?

Happy to push these myself if that's easier.

mxschmitt added 2 commits June 3, 2026 17:17
Adds skills/github-image-upload/SKILL.md so gh-image is installable as a
cross-agent Agent Skill via `npx skills add` (works in Claude Code, Codex, and
~40 other agents that read the agentskills.io SKILL.md standard).

The skill instructs the agent through the prerequisites (gh auth, idempotent
`gh extension install drogers0/gh-image`, the user_session cookie / GH_SESSION_TOKEN),
the upload (`gh image <file> --repo`), and embedding the resulting
user-attachments URL into a PR/issue/comment via `gh ... --body-file -`. Includes
the SAML-SSO troubleshooting note.
…shooting

- README: add a skills.sh badge and a one-line "also available as an agent
  skill (npx skills add drogers0/gh-image)" pointer under Installation.
- SKILL.md: update the SSO troubleshooting rows to match v1.0.1 (drogers0#16) — the
  tool now emits a dedicated "enforces SAML SSO …" message and the generic
  no-token message carries its own /orgs/<org>/sso hint.

Rebased onto main (post-drogers0#16).
mxschmitt added 2 commits June 3, 2026 17:19
…section

Move it out of the Installation blockquote into its own ## section right after
Usage, peer to Authentication/CI — more prominent, with the install command and
supported agents (Claude Code, Codex, Cursor, Copilot).

@drogers0 drogers0 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — accurate, well-structured skill; README pointer reads well and the SSO troubleshooting now matches the v1.0.1 behavior. Thanks @mxschmitt!

@drogers0
drogers0 merged commit 0f815e3 into drogers0:main Jun 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants