backlog(B-0581): RE-LAND skill wrapping gh auth refresh interactive flow (supersedes stale #3961)#4754
Merged
AceHack merged 1 commit intoMay 23, 2026
Conversation
…ope-grant registry
Aaron 2026-05-16, after Otto tried to fire `gh auth refresh` blindly via
Bash tool: "we need a skill around this." The empirical artifact that
made the gap visible was the one-time code (472D-B3EF in that run) that
gh surfaces mid-flow — Otto's non-interactive subprocess would burn the
code without surfacing it to the human.
Files the design row for a `.claude/skills/gh-auth-refresh-wrapper/SKILL.md`
+ `tools/auth/gh-auth-refresh-wrapper.ts` helper that:
1. Spawns gh + pumps stdin for Y/n
2. Captures the one-time code via stdout regex
3. Surfaces the code prominently (banner + pbcopy + osascript notification)
4. Pumps Enter to open browser (after surfacing the code)
5. Polls gh auth status until new scopes appear
6. Appends to ~/.local/share/zeta/scope-grants.jsonl
({machineId, scopes[], grantedBy, grantedAt, command})
6-slice decomposition, S effort overall. Aaron volunteered to be the
human-in-the-loop test subject when this row gets picked up.
Composes with B-0570 (scarcity tracker — scope affects API budget),
B-0571 (GitHub App = production alternative), B-0580 (Enterprise
ruleset management — uses scopes this skill grants), and the canonical
substrate at feedback_aaron_fine_grained_pat_workflow_*_2026_05_16.md.
Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced May 23, 2026
This was referenced May 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-lands B-0581 (skill wrapping gh auth refresh interactive flow + scope-grant registry) from stale PR #3961 (7 days old, DIRTY, 0 unresolved threads but unable to merge).
Per
.claude/rules/blocked-green-ci-investigate-threads.mdstale-armed-PR resolution decision tree:What's in this PR
docs/backlog/P2/B-0581-gh-auth-refresh-skill-wrapper-2026-05-16.md— full backlog row (cherry-picked verbatim from backlog(B-0581): skill wrapping gh auth refresh interactive flow + scope-grant registry #3961's commit7558984e4)docs/BACKLOG.md— regenerated index viabun tools/backlog/generate-index.tsThe backlog row captures the empirically-motivated observation that Otto's Bash tool can't handle
gh auth refresh's Y/n prompt + one-time code surfacing + Enter-to-open-browser blocking step — a skill wrapper would unblock that flow.Composes with
.claude/rules/blocked-green-ci-investigate-threads.md(stale-armed-PR resolution pattern)Test plan
ZETA_EXPECTED_BRANCHguardNext step after merge: close #3961 with cross-link.
🤖 Generated with Claude Code