Github auth recovery
Custom Cursor AI agent skills for mobile QA workflows — bug creation, JIRA refinement, RC revalidation, crash analysis, and build installation. Built for a large consumer mobile app (iOS/Android).
npx -y skills add vikenpatel14/cursor-qa-skills --skill github-auth-recoveryAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Automatically recover from GitHub CLI authentication failures. Use when any gh command fails with 401, SAML enforcement, token invalid, or authentication-related errors.
SKILL.md
2.2 KB, as published. Nobody here has run it
GitHub Auth Recovery
When Triggered
Any gh CLI command fails with one of these errors:
HTTP 401: Requires authenticationToken is invalidResource protected by organization SAML enforcementCould not resolve to a Repository- Any other auth/token-related GitHub CLI error
Recovery Flow
Step 1: Diagnose
Run gh auth status to determine the failure type.
Step 2: Handle by failure type
A) Token is invalid / expired / missing from keyring:
- Ask the user: "Your GitHub token is no longer in the keyring. Please paste your lifetime token and I'll set it up."
- Once provided, run:
echo "<token>" | gh auth login --with-token - Verify with
gh auth status - Retry the original command
B) SAML / SSO authorization required:
The error will contain an authorization URL. Do this:
- Extract the URL from the error message
- Tell the user exactly this (nothing more):
Open this link and approve access, then tell me "done": [the SSO authorization URL]
- Wait for user to confirm
- Retry the original command
C) Token is valid but command still fails:
Check if it's a permissions/scope issue. Inform the user which scope is missing.
Step 3: Retry
After auth is recovered, immediately retry the original command that failed. Do not ask the user to repeat their request.
Important Rules
- NEVER store or hardcode tokens in any file. Tokens belong only in the system keyring via
gh auth login. - NEVER log or display the full token in chat output.
- Keep it fast — no lengthy explanations about what went wrong. Diagnose, fix, retry.
- If SSO link is needed, give the user just the link — no tutorial about what SSO is or how it works.
- NEVER ask the user to run commands in their terminal. You have full permission to run all
gh authand recovery commands yourself using the Shell tool. The only thing the user should ever need to do is open a link in their browser or paste a token — everything else you handle directly.