apm: Skill for Claude Code

.agents/skills/auth/SKILL.md

auth is a skill for Claude Code, Codex from microsoft/apm. It costs 52 tokens per session (969 once invoked), scanned A, original, MIT.

A coding guide for handling login credentials, access tokens, and authentication with GitHub, Azure DevOps, and other remote hosts.

In plain words
What is it for?
Use it when changing token management, Git operations, remote-host API calls, or authentication-related error handling.
Why use it?
It prevents different parts of an application from resolving or using credentials in inconsistent ways.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is microsoft/apm's own configuration. It tells Claude Code and Codex how to work on apm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything apm configures →

About the project

APM is a package manager for AI-agent configuration, using a manifest to declare reusable instructions, skills, prompts, agents, hooks, plugins, and MCP components. Development teams use it to reproduce agent setups across projects and control their dependencies through policies and lockfiles, while the catalogue contains many of these agent components.

microsoft/apm · 4,133 stars · on GitHub · microsoft.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to microsoft/apm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/microsoft/apm/main/.agents/skills/auth/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/microsoft/apm

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for auth

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/apm/auth/github.svg)](https://agentmods.dev/skills/microsoft/apm/auth)
Your own site
<a href="https://agentmods.dev/skills/microsoft/apm/auth"><img src="https://agentmods.dev/badge/skills/microsoft/apm/auth/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for auth

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/apm/auth"><img src="https://agentmods.dev/badge/skills/microsoft/apm/auth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 969 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.00969
Opus 5.5 $0.00021 $0.00388
Sonnet 5.5 $0.00010 $0.00194
Haiku 4.5 $0.00005 $0.00097

Measured 12d ago against content hash 3107d81eacc4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

auth scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/auth/SKILL.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auth Skill

Auth expert persona

When to activate

  • Any change to src/apm_cli/core/auth.py or src/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.py auth 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

Azure DevOps Services (dev.azure.com, *.visualstudio.com) use this chain:

  1. ADO_APM_PAT env var if set
  2. AAD bearer via az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 if az is installed and az account show succeeds
  3. Operation-time path-scoped git credential fill after HTTP 401/403 or a recognized Git authentication failure (is_ado_auth_failure_signal)
  4. Otherwise: AdoAuthChainExhaustedError from try_with_fallback, or build_error_context on resolve-time failures

Azure DevOps Server hosts (ADO_HOST / APM_ADO_HOSTS) skip az bearer: PAT, then fill.

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 fallback: on HTTP 401/403 or a recognized Git authentication failure, APM tries an available az bearer. A successful bearer retry emits:

[!] ADO_APM_PAT was rejected for {host}; fell back to az cli bearer.
[!]     Consider unsetting the stale variable.

Read the full file on GitHub · 67 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago Changed · +7 lines 3107d81eacc4
  2. 1mo ago First seen · 60 lines · 52 tokens per session scan A bf1039cb63db

Subscribe to this mod's changes

auth is a skill published in the GitHub repository microsoft/apm (4,133 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 969 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

code-review-csharp

Perform structured code reviews of C# source code covering naming conventions, performance, security, readability, and .NET best practices. Trigger phrases include "review this C# code", "check my C# for best practices", "analyze this C# class", "find issues in my C# code".

pnp/copilot-prompts · 66 tokens

git-branch-cleanup

Analyzes and safely cleans up local Git branches. Categorizes branches by merge status, staleness, and remote tracking. Provides interactive selection with safety guards. Use when the user wants to clean up branches, delete old branches, organize Git branches, or asks about which branches can be safely deleted.

gotalab/skillport · 66 tokens

self-awareness-review

Reviews a given week of your OWN Teams meetings, chats, and sent emails to surface moments where you may have misread social signals or come across as passive-aggressive, curt, sarcastic, or dismissive — returning the exact quote, how it likely landed, and a kinder rewrite. Private self-reflection coaching for the…

pnp/copilot-prompts · 202 tokens

audit

Audits recent work against its Definition of Done and project patterns, from a review package of the diff. Runs the test suite, compares code against the spec, tests scenarios, sabotages risk code, and reports PASS / PARTIAL / FAIL with a severity and a cause on every finding. Also runs the Critical Gate — a safety…

pe-menezes/vibeflow · 132 tokens

markdown-preview

Generate browser-viewable HTML previews from markdown, plain text, and Mermaid diagrams. Auto-validates, styles, and opens in browser.

rp1-run/rp1 · 30 tokens

pr-review

Intent-aware map-reduce PR review with CI/CD support, confidence gating, and intelligent comment deduplication.

rp1-run/rp1 · 25 tokens