Azure Key Vault Keys for TypeScript
A practical TypeScript guide to creating, protecting, rotating, and using cryptographic keys in Azure Key Vault.
The documentation uses Azure identity credentials and recommends managed identity, restricted key operations, soft delete, and backups, showing partial least-privilege and recovery awareness. However, it includes irreversible purge, bulk secret export, and local backup examples without user confirmation, sensitive-data-flow disclosure, explicit permission scoping, or secure-storage requirements, so points are deducted. No malware, credential theft, or covert exfiltration red line is evident.
It covers creation, retrieval, rotation, cryptography, deletion/recovery, and error handling, but the main SKILL.md uses SecretClient without importing it and does not install @azure/keyvault-secrets. Its stated Keys scope is mixed with extensive Secrets content, and authentication/configuration examples are inconsistent. No skill-specific committed tests or reproducible execution evidence are shown, so static scoring is limited.
The target scenarios and TypeScript/Node.js boundary are mostly clear, and key management, cryptographic operations, and rotation are identified. However, the actual scope mixes secret management, and it does not define non-fit cases, input/output contracts, permission prerequisites, algorithm constraints, or exclusion triggers. It also provides no Chinese-language or mainland-China reachability guidance, so points are deducted.
The skill has YAML metadata, an MIT license, installation notes, progressive reference files, examples, best practices, and error handling; repository context also supplies Microsoft provenance, licensing, and CI/maintenance signals. However, version 1.0.0 has no changelog, explicit maintainer/update path, complete dependency notes, or sufficient troubleshooting and limitations disclosure, and the scope boundaries are unstable.
It offers broad, reusable TypeScript snippets for common Key Vault key operations. However, there is no complete runnable project, permission setup, input validation, or verification workflow; important examples have issues such as an unimported SecretClient and a missing secrets SDK dependency. Bulk secret export and purge patterns also require substantial human review, so the core value is only partially directly usable.
The files provide API examples, type names, error statuses, and repository CI/test infrastructure, giving some auditability. However, the supplied CI and generic harness do not demonstrate dedicated coverage for this skill, and there are no pinned SDK versions, test results, or third-party execution records. Key claims therefore cannot be independently reproduced from the static material alone.
- The skill claims to cover Keys but contains extensive Secrets material; if Secrets remain in scope, add @azure/keyvault-secrets explicitly and fix the missing SecretClient import.
- Purge, bulk secret export, and local backup-writing examples can create irreversible or sensitive-data risks; add explicit confirmation, least-privilege, secure-storage, and recovery guidance.
- Add pinned dependencies, permission prerequisites, runnable skill-specific tests, failure scenarios, and mainland-China service/network reachability guidance.
What it does & when to use it
This Microsoft Agent Skills entry helps Node.js developers work with the Azure Key Vault Keys SDK for JavaScript, @azure/keyvault-keys. It covers key creation, retrieval, enumeration, deletion, backup, restore, rotation, and rotation policies. It also demonstrates RSA-OAEP encryption and decryption, RS256 signing and verification, and key wrapping and unwrapping. The document includes SecretClient secret-management examples, but its installation command does not list @azure/keyvault-secrets, so that dependency should be checked before adoption.
Shows how to install the Azure SDK packages and configure KEY_VAULT_URL or AZURE_KEYVAULT_NAME; constructs KeyClient and CryptographyClient instances with DefaultAzureCredential or ManagedIdentityCredential; creates generic, RSA, and elliptic-curve keys; retrieves, lists, rotates, deletes, purges, backs up, and restores keys; configures rotation policies; encrypts and decrypts data with RSA-OAEP; signs and verifies SHA-256 digests with RS256; wraps and unwraps key material; and demonstrates secret CRUD, recovery, purge, and not-found error handling.
- A TypeScript backend developer creating RSA or elliptic-curve keys in Azure Key Vault.
- A Node.js application that needs RSA-OAEP encryption and decryption for protected data.
- A platform team enforcing expiration dates and rotation policies for production keys.
- An operations engineer backing up keys and restoring them into the same or another vault.
- An Azure developer moving from local development credentials to managed identity in production.
Pros & cons
- Covers the key lifecycle from creation and rotation through cryptographic use, backup, and restore.
- Includes authentication examples for local development and production managed identity.
- Calls out soft delete, expiration dates, limited key operations, and rotation policies as best practices.
- Provides concrete TypeScript SDK snippets rather than only conceptual guidance.
- It is explicitly Node.js-only and does not support browsers.
- The document uses SecretClient examples without showing its import, and the install command omits @azure/keyvault-secrets.
- The source provides no per-skill test coverage, compatibility matrix, or detailed troubleshooting guidance.
- The sample expiration date is 2025-12-31 and must be replaced for a current deployment.
How to install
Place the skill directory in the skills directory used by your Agent Skills-compatible client. The skill file is at .github/plugins/azure-sdk-typescript/skills/azure-keyvault-keys-ts/SKILL.md. To install the collection, run: npx skills add microsoft/skills, then select the required skill in the wizard. The package example is: npm install @azure/keyvault-keys @azure/identity. The source does not document a standalone installation command for only this skill.
How to use
Example trigger: Use azure-keyvault-keys-ts to help me create a P-256 key in a TypeScript Node.js application, configure Azure authentication, and set a rotation policy. Follow the KeyClient, CryptographyClient, DefaultAzureCredential, or ManagedIdentityCredential examples for the required operation. Browser usage is explicitly unsupported.