githubnext/apm/auth
- community
Checking that the SKILL.md file is still in the repository.
Activate when code touches token management, credential resolution, git auth flows, GITHUB_APM_PAT, ADO_APM_PAT, AuthResolver, HostInfo, AuthContext, or any remote host authentication -- even if 'auth' isn't mentioned explicitly.
Install
npx vskill@latest install githubnext/apm/authSKILL.md
Auth Skill
When to activate
- Any change to
src/apm_cli/core/auth.pyorsrc/apm_cli/core/token_manager.py - Code that reads
GITHUB_APM_PAT,GITHUB_TOKEN,GH_TOKEN,ADO_APM_PAT - Code using
git ls-remote,git clone, or GitHub/ADO API calls - Error messages mentioning tokens, authentication, or credentials
- Changes to
github_downloader.pyauth paths - Per-host or per-org token resolution logic
Key rule
All auth flows MUST go through AuthResolver. No direct os.getenv() for token variables in application code.
Canonical reference
The full per-org -> global -> credential-fill -> fallback resolution flow is in `docs/src/content/docs/getting-started/authentication.md` (mermaid flowchart). Treat it as the single source of truth; if behavior diverges, fix the diagram in the same PR.
Bearer-token authentication for ADO
ADO hosts (dev.azure.com, *.visualstudio.com) resolve auth in this order:
ADO_APM_PATenv var if set- AAD bearer via
az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798ifazis installed andaz account showsucceeds - Otherwise: auth-failed error from
build_error_context
ADO_APM_PAT is the env var name used by the auth flow. The AAD bearer source constant lives in src/apm_cli/core/token_manager.py as GitHubTokenManager.ADO_BEARER_SOURCE = "AAD_BEARER_AZ_CLI".
Stale-PAT silent fallback: if ADO_APM_PAT is rejected with HTTP 401, APM retries with the az bearer and emits:
Verbose source line (one per host, emitted under --verbose):
Diagnostic cases (_emit_stale_pat_diagnostic + build_error_context in src/apm_cli/core/auth.py):
- No PAT, no
az:No ADO_APM_PAT was set and az CLI is not installed.-> installaz, runaz login --tenant <tenant>, or setADO_APM_PAT. - No PAT,
aznot signed in:az CLI is installed but no active session was found.-> runaz login --tenant <tenant>against the tenant that owns the org, or setADO_APM_PAT. - No PAT, wrong tenant:
az CLI returned a token but the org does not accept it (likely a tenant mismatch).-> runaz login --tenant <correct-tenant>, or setADO_APM_PAT. - PAT 401, no
azfallback:ADO_APM_PAT was rejected (HTTP 401) and no az cli fallback was available.-> rotate the PAT, or installazand runaz login --tenant <tenant>.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.apm/skills/auth/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/githubnext/apm/auth)