Skip to content

Replace broken github plugin with skills-based gh CLI workflow#1364

Closed
axisrow wants to merge 1 commit intoanthropics:mainfrom
axisrow:fix/github-plugin-codex-port
Closed

Replace broken github plugin with skills-based gh CLI workflow#1364
axisrow wants to merge 1 commit intoanthropics:mainfrom
axisrow:fix/github-plugin-codex-port

Conversation

@axisrow
Copy link
Copy Markdown

@axisrow axisrow commented Apr 12, 2026

Problem

external_plugins/github/ ships a single .mcp.json pointing at the remote
GitHub Copilot MCP endpoint (https://api.githubcopilot.com/mcp/). That
endpoint does not support OAuth 2.0 Dynamic Client Registration
(RFC 7591), which Claude Code's plugin auth path currently requires.

Installing the plugin fails at startup with:

Invalid MCP server config for "github": Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN

and clicking "Authenticate" in the plugin UI returns:

SDK auth failed: Incompatible auth server: does not support dynamic client registration

Reported against macOS, Windows 11, and Linux:

Until CC gains pre-registered OAuth client support for MCP, this plugin cannot authenticate interactively.

Approach

OpenAI ships a functionally analogous github@openai-curated plugin for Codex that works today. Its model is hybrid:

  1. A proprietary Apps & Connectors registry on OpenAI's backend (pre-registered GitHub OAuth app — no DCR needed).
  2. A local gh CLI fallback required in every SKILL.md prerequisite section: gh auth status is checked before any write; if unauthenticated the user is asked to run gh auth login. Everything the connector doesn't cover goes through gh.

We can't port part (1) — Claude Code has no equivalent connector registry today. But part (2) is pure prompting: four SKILL.md files plus gh CLI, no MCP server at all. That part we can borrow.

This PR replaces the broken remote MCP config with an adapted skills bundle derived from openai/plugins (Apache License 2.0, attribution in NOTICE).

Changes

  • Deleted external_plugins/github/.mcp.json — the broken Copilot endpoint.
  • Added four model-invoked skills under skills/:
    • github/SKILL.md — umbrella triage skill that routes to specialists.
    • yeet/SKILL.md — full publish flow (branch, stage, commit, push, open draft PR).
    • gh-fix-ci/SKILL.md — debug failing GitHub Actions checks. Ships with a Python helper (scripts/inspect_pr_checks.py) that handles gh field drift and job-log fallbacks.
    • gh-address-comments/SKILL.md — thread-aware PR review follow-up. Ships with a GraphQL helper (scripts/fetch_comments.py) that preserves isResolved / isOutdated / file-and-line anchors that flat PR comment reads lose.
  • Added README.md with prerequisites (gh auth login), setup, the reason the MCP was removed, and attribution.
  • Added LICENSE (Apache 2.0) and NOTICE (attribution + modification list).
  • Updated .claude-plugin/plugin.json with version, license, keywords, and a new description reflecting the skills-based workflow.

Connector-specific language from the original Codex skills ("GitHub app from this plugin", "connector-backed reads", "prefer the GitHub app ... for PR creation") was rewritten to use gh commands directly. In every case the replacement is a concrete gh ... --json ... invocation. All modified files carry in-file "Adapted from ..." notices per Apache 2.0 §4(b); see NOTICE for the full modification list.

Why this is strictly an improvement

  • Plugin actually works out of the box — no PAT, no env vars, no ~/.claude/settings.json changes.
  • Uses real OAuth via gh auth login (device flow, stored in the OS keyring).
  • Zero static secrets in Claude Code settings.
  • Four specialist workflows (triage, publish, CI debug, review follow-up) that the current plugin lacks entirely.
  • Clean removal of the failing MCP server — no more ✘ failed in /mcp.
  • When Claude Code cannot connect to GitHub's remote MCP server using OAuth authentication claude-code#3433 lands and CC gains pre-registered OAuth client support, a structured MCP server can be added back alongside the skills without breaking anything.

Prior art in this repo

#1305 removed the broken hosted slack plugin stub entirely. That approach is a reasonable option when a plugin has no salvageable fallback. This PR takes the alternative path — replace with a working skills-based flow — because gh CLI provides a clean, widely-available fallback that the Codex plugin already validates as a viable pattern.

Testing

Verified locally on macOS (Darwin 25.3.0), Claude Code Opus 4.6:

  • Plugin manifest validates (python3 -m json.tool .claude-plugin/plugin.json).
  • Both Python helpers compile cleanly (python3 -m py_compile).
  • All four SKILL.md files have valid name: / description: YAML frontmatter.
  • No stray references to "connector" or "GitHub app from this plugin" in skill content — only in NOTICE / attribution blocks where they belong.
  • Ran plugin-dev:plugin-validator in Claude Code against the plugin directory — verdict: READY, no blockers. (Minor polish suggestions like adding version already applied.)
  • gh is authenticated via macOS keyring; no GITHUB_PERSONAL_ACCESS_TOKEN env var is set anywhere.

End-to-end skill invocation testing inside Claude Code requires the plugin to be installed from a marketplace entry; happy to walk through that together if you'd like before marking this ready for review.

Attribution & license

Skills and helper scripts are adapted from openai/plugins github@openai-curated (Apache License 2.0):

  • skills/github/SKILL.md — adapted, connector references rewritten to gh CLI.
  • skills/yeet/SKILL.md — adapted, PR-creation flow rewritten to gh pr create.
  • skills/gh-fix-ci/SKILL.md — adapted, minor connector refs removed (skill was already shell-based).
  • skills/gh-fix-ci/scripts/inspect_pr_checks.pyunchanged from OpenAI source.
  • skills/gh-address-comments/SKILL.md — adapted, connector refs rewritten to gh pr view / gh pr diff.
  • skills/gh-address-comments/scripts/fetch_comments.pyunchanged from OpenAI source.

LICENSE is a complete copy of the Apache License 2.0. NOTICE enumerates the modifications and preserves copyright/attribution per §4. Each modified file carries an <!-- Adapted from ... --> trailer.

If the maintainers would prefer a different attribution style or want to host the skills under a different top-level directory, happy to iterate.

Closes #283 (plugin-level fix; root-cause CC issue anthropics/claude-code#3433 remains open for pre-registered OAuth support).

The external_plugins/github/ plugin shipped a single .mcp.json pointing at
the remote GitHub Copilot MCP endpoint, which does not support OAuth 2.0
Dynamic Client Registration. Claude Code's plugin auth path requires DCR,
so the plugin failed at startup with "Missing environment variables:
GITHUB_PERSONAL_ACCESS_TOKEN" and at auth time with "SDK auth failed:
Incompatible auth server: does not support dynamic client registration".

Reported against macOS, Windows 11, and Linux in anthropics#283 and
anthropics/claude-code#3433.

This replaces the broken MCP config with a skills bundle adapted from
OpenAI's github@openai-curated Codex plugin (Apache License 2.0 —
attribution in NOTICE). Four model-invoked skills cover the core
workflows:

  - github: umbrella triage skill
  - yeet: commit, push, open draft PR
  - gh-fix-ci: debug failing GitHub Actions checks (+ Python helper)
  - gh-address-comments: thread-aware PR review follow-up (+ GraphQL helper)

All skills use the gh CLI via Claude Code's Bash tool. Authentication
goes through "gh auth login" (device-flow OAuth, stored in the OS
keyring) — no PAT or env vars required. When CC gains pre-registered
OAuth client support for MCP, a structured MCP server can be added back
alongside the skills without breaking anything.

Connector-specific language from the original Codex skills ("GitHub app
from this plugin", "connector-backed reads") was rewritten to use gh
commands directly, since Claude Code has no equivalent to OpenAI's
proprietary Apps & Connectors registry today.

Closes anthropics#283

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Thanks for your interest! This repo only accepts contributions from Anthropic team members. If you'd like to submit a plugin to the marketplace, please submit your plugin here.

@github-actions github-actions bot closed this Apr 12, 2026
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.

[Bug] GitHub plugin fails: 'Incompatible auth server: does not support dynamic client registration'

1 participant