agentsclimarketplace

Github auth recovery

Skill vikenpatel14/cursor-qa-skills/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).

Install
npx -y skills add vikenpatel14/cursor-qa-skills --skill github-auth-recovery

Assembled 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 authentication
  • Token is invalid
  • Resource protected by organization SAML enforcement
  • Could 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:

  1. Ask the user: "Your GitHub token is no longer in the keyring. Please paste your lifetime token and I'll set it up."
  2. Once provided, run: echo "<token>" | gh auth login --with-token
  3. Verify with gh auth status
  4. Retry the original command

B) SAML / SSO authorization required:

The error will contain an authorization URL. Do this:

  1. Extract the URL from the error message
  2. Tell the user exactly this (nothing more):

    Open this link and approve access, then tell me "done": [the SSO authorization URL]

  3. Wait for user to confirm
  4. 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 auth and 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.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.