Skip to content
Back to skills

Managing Credentials

ASecurity

Use when storing, injecting, rotating or revoking a secret or token that a service, workload or CI job uses to reach another system, or when one has leaked. Triggers on API tokens, PATs, client secrets, keychains, secret managers, masked CI variables, workload identity federation, OIDC, `.env` secrets, credential rotation, or leaked credentials, even when the user doesn't say 'credential management' and names only a provider-specific token.

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentsrustgoshelldebugginggitapisecurity

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned November 30, 2026

npx -y skills add xonovex/platform --skill managing-credentials --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Managing Credentials?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Managing Credentials
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/xonovex-managing-credentials/badge)](https://www.skillsdirectory.com/skills/xonovex-managing-credentials)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: managing-credentials
description: "Use when storing, injecting, rotating or revoking a secret or token that a service, workload or CI job uses to reach another system, or when one has leaked. Triggers on API tokens, PATs, client secrets, keychains, secret managers, masked CI variables, workload identity federation, OIDC, `.env` secrets, credential rotation, or leaked credentials, even when the user doesn't say 'credential management' and names only a provider-specific token."
---

# Credential Management Guidelines

Own the provider-neutral credential lifecycle. A provider guide still owns its token types, exact scopes, login command, request header, and verification probe.

## Essentials

- **Avoid stored secrets when possible** - Prefer a native login cache for a person and a short-lived workload identity or federated credential for automation, see [references/credential-selection.md](references/credential-selection.md)
- **Use one credential per integration** - Bind it to one non-human identity, environment, purpose, and minimum resource/operation scope
- **Keep a single source of truth** - Store local credentials in the platform secret store and shared credentials in an approved secret manager, see [references/local-storage.md](references/local-storage.md)
- **Resolve at the last responsible moment** - Read the value immediately before use, pass it through the provider-supported channel, and remove it from process state as soon as practical
- **Treat environment variables as transport** - They may be appropriate for a process or CI step, but are not a durable secret store
- **Design the full lifecycle** - Record owner, purpose, consumers, creation, expiry, rotation, revocation, audit source, and recovery before adoption
- **Assume masking can fail** - Never print, transform for debugging, place in URLs, or enable shell tracing around a secret
- **Revoke before cleanup** - On suspected exposure, invalidate the credential first; repository or log cleanup does not stop its use, see [references/automation-and-response.md](references/automation-and-response.md)

## Ownership boundary

Load the relevant provider skill for whether a PAT, app token, OAuth grant, service account, or another credential is valid; its exact permissions; host-specific environment variables; and the cheapest authenticated probe. This skill selects storage, delivery, automation, rotation, and incident behavior after those provider facts are known.

## Gotchas

- A secret encrypted at rest becomes plaintext when consumed; storage encryption does not make logs, child processes, crash dumps, or command arguments safe.
- A CI secret is available to any code that executes in that trusted job. Masking changes display, not authority.
- Fork, pull-request, reusable-workflow, and protected-environment rules differ by CI provider. Verify both allowed and denied paths.
- Rotating a value without updating every consumer causes an outage; updating consumers without revoking the old value leaves two valid credentials.
- Rewriting git history does not revoke a leaked credential and can destroy useful incident evidence if done before containment.
- An end user's own password is not a machine credential: hashing parameters, reset rules, and login flows are account security and follow different guidance from the tokens covered here.

## Progressive Disclosure

- Read [references/credential-selection.md](references/credential-selection.md) - Load when choosing between interactive login, workload identity, dynamic credentials, service identities, and stored tokens
- Read [references/local-storage.md](references/local-storage.md) - Load when storing or retrieving a developer credential on macOS, Linux, Windows, WSL, or a local development fallback
- Read [references/automation-and-response.md](references/automation-and-response.md) - Load when injecting credentials into CI or services, defining rotation, or responding to a suspected leak

Files in this skill

  • SKILL.md3.9 KB
  • eval-output.json3.4 KB
  • eval-trigger.json4.9 KB
  • moon.yml86 B
  • references/automation-and-response.md2.1 KB
  • references/credential-selection.md1.6 KB
  • references/local-storage.md1.7 KB
  • sources.json2.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.