Dev cli auth diagnosis

From BlueSkyXN/Codex-is-all-you-need · View interactive version

Dev cli auth diagnosis is an AI agent skill from the GitHub repository BlueSkyXN/Codex-is-all-you-need. Use when gh, hf, lark-cli, Git/SSH, or another authenticated CLI works in one shell or host but reports missing credentials, cannot refresh or persist authentication, cannot reach its service, or behaves differently inside Codex or across permission profiles, macOS, Windows, WSL, containers, or CI.

How to use this skill

Skill file

CLI authentication diagnosis

Diagnose the failing boundary before changing credentials. Keep the investigation

read-only unless the user separately authorizes an authentication, storage, or

remote-state mutation.

Always read

references/authenticated-cli-sandbox-guide.md

before selecting probes, assigning a failure class, or proposing a repair.

Then load only the reference needed for the current branch:

references/codex-permissions-and-sandbox.md

when the task involves Codex permissions, sandbox modes, approval behavior,

filesystem roots, network policy, or Unix sockets.

lark-cli, or when transferring their credential patterns to another CLI.

references/platform-credential-backends.md

for macOS Keychain, Windows Credential Manager or DPAPI, named pipes, agent

sockets, WSL separation, browser/device login, or cross-platform differences.

Workflow

  1. Freeze the comparison.

boundary, operating system, and the exact non-mutating command that succeeds

and fails.

  1. Route to the relevant knowledge branch.

their different credential models into one generic token recipe.

reference for OS credential services. A filesystem rule is not a Keychain,

Credential Manager, DPAPI, GUI, or socket grant.

  1. Establish the local execution boundary.

approval reviewer, command rules, and tool-specific controls.

local config.toml is only one input.

  1. Map the credential chain without exposing it.

files, agent or daemon sockets, config roots, caches, and refresh storage.

diagnosis. Never print token, cookie, private key, refresh token, or secret

content.

  1. Separate safe probes.

stdout to a sink.

write local caches.

  1. Use a controlled comparator only when needed.

user-approved escalation or unrestricted comparator.

profile switching, and full access in one experiment.

  1. Assign one primary failure class from the reference guide.

context, authentication, authorization, and resource ACL distinct.

and list the later layers as unverified.

  1. Recommend the least-broad repair.

or a narrowly scoped permission/profile correction.

writable roots, and organization permission changes as separate mutations

requiring explicit authorization.

pass.

  1. Verify with independent readback.

Stop conditions

Stop and ask for a bounded decision when:

remote data;

has not been tried;

explicitly authorized read.

Output

Return:

  1. observed sandbox and approval boundary;
  2. CLI and credential-source chain, with all values redacted;
  3. probes run and their sandboxed versus comparator results;
  4. primary failure class and supporting evidence;
  5. minimal repair, authorization needed, and tradeoff;
  6. verification performed and remaining uncertainty.

Completion criteria

Complete only when the failure is classified with direct evidence and the

original command either succeeds under the intended boundary or is left with a

specific, user-owned authorization or external-state requirement. A successful

version command, readable config file, or unrestricted comparator alone is not

end-to-end authentication proof.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.