Skip to main content
skill

azure-appconfiguration-ts — Claude Code & Copilot skill for Azure

A skill that gets your agent writing TypeScript against Azure App Configuration: settings, feature flags, Key Vault references and dynamic refresh.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add microsoft/skills --skill azure-appconfiguration-ts -a claude-code
Open on GitHub

What azure-appconfiguration-ts does

The skill covers the @azure/app-configuration SDK and the @azure/app-configuration-provider package. It ships code patterns for adding and updating settings with labels, listing them by key filter, locking a key with setReadOnly, and creating snapshots with a retention period.

Feature flags get their own section, using @microsoft/feature-management with a ConfigurationMapFeatureFlagProvider and FeatureManager. Key Vault references resolve automatically once you pass keyVaultOptions with a credential and a secret refresh interval. For live config, refreshOptions takes refreshIntervalInMs, and onRefresh hooks into an Express middleware.

You need an App Configuration resource in Azure plus AZURE_APPCONFIG_ENDPOINT or AZURE_APPCONFIG_CONNECTION_STRING in the environment. Running DefaultAzureCredential in production requires AZURE_TOKEN_CREDENTIALS=prod; skip it and auth fails there. Everything installs through npm, so the project has to be on Node.js.

What it helps with

  • read settings from App Configuration filtered by label
  • roll out a feature flag to a percentage of a group
  • pull a database password from Key Vault through a config reference
  • refresh configuration without restarting the app
  • freeze a set of settings into a snapshot before a release

Example prompts for the agent

  • Show me how to load settings from Azure App Configuration with @azure/app-configuration-provider
  • Add a Beta feature flag targeting the beta-testers group
  • Set up dynamic config refresh every 30 seconds in Express

How to install azure-appconfiguration-ts

1Skills CLI (Vercel)

npx skills add microsoft/skills --skill azure-appconfiguration-ts -a claude-code

2Manually: put the files in place

~/.claude/skills/azure-appconfiguration-ts/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/azure-appconfiguration-ts/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about azure-appconfiguration-ts

How do I install azure-appconfiguration-ts in Claude?

Run npx skills add microsoft/skills --skill azure-appconfiguration-ts -a claude-code. The skill lands at ~/.claude/skills/azure-appconfiguration-ts/SKILL.md.

What does azure-appconfiguration-ts do?

It gives the agent TypeScript patterns for Azure App Configuration: settings CRUD, feature flags, Key Vault references, dynamic refresh and snapshots.

How do I install it for GitHub Copilot?

Run gh skill install microsoft/skills azure-appconfiguration-ts. The file goes to .github/skills/azure-appconfiguration-ts/SKILL.md.

Source text

SKILL.md · MIT
---
name: azure-appconfiguration-ts
description: Build applications using Azure App Configuration SDK for JavaScript (@azure/app-configuration). Use when working with configuration settings, feature flags, Key Vault references, dynamic refresh, or centralized configuration management.
license: MIT
metadata:
  author: Microsoft
  version: "1.0.0"
  package: '@azure/app-configuration'
---

# Azure App Configuration SDK for TypeScript

Centralized configuration management with feature flags and dynamic refresh.

## Installation

```bash
# Low-level CRUD SDK
npm install @azure/app-configuration @azure/identity

# High-level provider (recommended for apps)
npm install @azure/app-configuration-provider @azure/identity

# Feature flag management
npm install @microsoft/feature-management
```

## Environment Variables

```bash
AZURE_APPCONFIG_ENDPOINT=https://<your-resource>.azconfig.io
# OR
AZURE_APPCONFIG_CONNECTION_STRING=Endpoint=https://...;Id=...;Secret=...
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
```

## Authentication

```typescript
import { AppConfigurationClient } from "@azure/app-configuration";
import { DefaultAzureCredential, ManagedIdentityCredential } from "@azure/identity";

// Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>
const credential = new DefaultAzureCredential({requiredEnvVars: ["AZURE_TOKEN_CREDENTIALS"]});
// Or use a specific credential directly in production:
// See https://learn.microsoft.com/javascript/api/overview/azure/identity-readme?view=azure-node-latest#credential-classes
// const credential = new ManagedIdentityCredential();

const client = new AppConfigurationClient(
  process.env.AZURE_APPCONFIG_ENDPOINT!,
  credential
);

// Connection string
const client2 = new AppConfigurationClient(
  process.env.AZURE_APPCONFIG_CONNECTION_STRING!
);
```

## CRUD Operations

### Create/Update Settings

```typescript
// Add new (fails if exists)
await client.addConfigurationSetting({
  key: "app:settings:message",
  value: "Hello World",
  label: "production",
  contentType: "text/plain",
  tags: { environment: "prod" },
});

// Set (create or update)
await client.setConfigurationSetting({
  key: "app:settings:message",
  value: "Updated value",
  label: "production",
});

// Update with optimistic concurrency
const existing = await client.getConfigurationSetting({ key: "myKey" });
existing.value = "new value";
await client.setConfigurationSetting(existing, { onlyIfUnchanged: true });
```

### Read Settings

```typescript
// Get single setting
const setting = await client.getConfigurationSetting({
  key: "app:settings:message",
  label: "production",  // optional
});
console.log(setting.value);

// List with filters
const settings = client.listConfigurationSettings({
  keyFilter: "app:*",
  labelFilter: "production",
});

for await (const setting of settings) {
  console.log(`${setting.key}: ${setting.value}`);
}
```

### Delete Settings

```typescript
await client.deleteConfigurationSetting({
  key: "app:settings:message",
  label: "production",
});
```

### Lock/Unlock (Read-Only)

```typescript
// Lock
await client.setReadOnly({ key: "myKey", label: "prod" }, true);

// Unlock
await client.setReadOnly({ key: "myKey", label: "prod" }, false);
```

## App Configuration Provider

### Load Configuration

```typescript
import { load } from "@azure/app-configuration-provider";
import { DefaultAzureCredential } from "@azure/identity";

const appConfig = await load(
  process.env.AZURE_APPCONFIG_ENDPOINT!,
  new DefaultAzureCredential({requiredEnvVars: ["AZURE_TOKEN_CREDENTIALS"]}),
  {
    selectors: [
      { keyFilter: "app:*", labelFilter: "production" },
    ],
    trimKeyPrefixes: ["app:"],
  }
);

// Map-style access
const value = appConfig.get("settings:message");

// Object-style access
const config = appConfig.constructConfigurationObject({ separator: ":" });
console.log(config.settings.message);
```

### Dynamic Refresh

```typescript
const appConfig = await load(endpoint, credential, {
  selectors: [{ keyFilter: "app:*" }],
  refreshOptions: {
    enabled: true,
    refreshIntervalInMs: 30_000,  // 30 seconds
  },
});

// Trigger refresh (non-blocking)
appConfig.refresh();

// Listen for refresh events
const disposer = appConfig.onRefresh(() => {
  console.log("Configuration refreshed!");
});

// Express middleware pattern
app.use((req, res, next) => {
  appConfig.refresh();
  next();
});
```

### Key Vault References

```typescript
const appConfig = await load(endpoint, credential, {
  selectors: [{ keyFilter: "app:*" }],
  keyVaultOptions: {
    credential: new DefaultAzureCredential({requiredEnvVars: ["AZURE_TOKEN_CREDENTIALS"]}),
    secretRefreshIntervalInMs: 7200_000,  // 2 hours
  },
});

// Secrets are automatically resolved
const dbPassword = appConfig.get("database:password");
```

## Feature Flags

### Create Feature Flag (Low-Level)

```typescript
import {
  featureFlagPrefix,
  featureFlagContentType,
  FeatureFlagValue,
  ConfigurationSetting,
} from "@azure/app-configuration";

const flag: ConfigurationSetting<FeatureFlagValue> = {
  key: `${featureFlagPrefix}Beta`,
  contentType: featureFlagContentType,
  value: {
    id: "Beta",
    enabled: true,
    description: "Beta feature",
    conditions: {
      clientFilters: [
        {
          name: "Microsoft.Targeting",
          parameters: {
            Audience: {
              Users: ["[email protected]"],
              Groups: [{ Name: "beta-testers", RolloutPercentage: 50 }],
              DefaultRolloutPercentage: 0,
            },
          },
        },
      ],
    },
  },
};

await client.addConfigurationSetting(flag);
```

### Load and Evaluate Feature Flags

```typescript
import { load } from "@azure/app-configuration-provider";
import {
  ConfigurationMapFeatureFlagProvider,
  FeatureManager,
} from "@microsoft/feature-management";

const appConfig = await load(endpoint, credential, {
  featureFlagOptions: {
    enabled: true,
    selectors: [{ keyFilter: "*" }],
    refresh: {
      enabled: true,
      refreshIntervalInMs: 30_000,
    },
  },
});

const featureProvider = new ConfigurationMapFeatureFlagProvider(appConfig);
const featureManager = new FeatureManager(featureProvider);

// Simple check
const isEnabled = await featureManager.isEnabled("Beta");

// With targeting context
const isEnabledForUser = await featureManager.isEnabled("Beta", {
  userId: "[email protected]",
  groups: ["beta-testers"],
});
```

## Snapshots

```typescript
// Create snapshot
const snapshot = await client.beginCreateSnapshotAndWait({
  name: "release-v1.0",
  retentionPeriod: 2592000,  // 30 days
  filters: [{ keyFilter: "app:*", labelFilter: "production" }],
});

// Get snapshot
const snap = await client.getSnapshot("release-v1.0");

// List settings in snapshot
const settings = client.listConfigurationSettingsForSnapshot("release-v1.0");
for await (const setting of settings) {
  console.log(`${setting.key}: ${setting.value}`);
}

// Archive/recover
await client.archiveSnapshot("release-v1.0");
await client.recoverSnapshot("release-v1.0");

// Load from snapshot (provider)
const config = await load(endpoint, credential, {
  selectors: [{ snapshotName: "release-v1.0" }],
});
```

## Labels

```typescript
// Create settings with labels
await client.setConfigurationSetting({
  key: "database:host",
  value: "dev-db.example.com",
  label: "development",
});

await client.setConfigurationSetting({
  key: "database:host",
  value: "prod-db.example.com",
  label: "production",
});

// Filter by label
const prodSettings = client.listConfigurationSettings({
  keyFilter: "*",
  labelFilter: "production",
});

// No label (null label)
const noLabelSettings = client.listConfigurationSettings({
  labelFilter: "\0",
});

// List available labels
for await (const label of client.listLabels()) {
  console.log(label.name);
}
```

## Key Types

```typescript
import {
  AppConfigurationClient,
  ConfigurationSetting,
  FeatureFlagValue,
  SecretReferenceValue,
  featureFlagPrefix,
  featureFlagContentType,
  secretReferenceContentType,
  ListConfigurationSettingsOptions,
} from "@azure/app-configuration";

import { load } from "@azure/app-configuration-provider";

import {
  FeatureManager,
  ConfigurationMapFeatureFlagProvider,
} from "@microsoft/feature-management";
```

## Best Practices

1. **Use provider for apps** - `@azure/app-configuration-provider` for runtime config
2. **Use low-level for management** - `@azure/app-configuration` for CRUD operations
3. **Enable refresh** - For dynamic configuration updates
4. **Use labels** - Separate configurations by environment
5. **Use snapshots** - For immutable release configurations
6. **Sentinel pattern** - Use a sentinel key to trigger full refresh
7. **RBAC roles** - `App Configuration Data Reader` for read-only access

© Microsoft · MIT · microsoft/skills

Similar skills

Everything for Cloud: AWS, Azure, GCP →

From the same set64

The whole set →
azure-compute Routes Azure VM and VMSS requests to the right workflow: sizing, pricing, provisioning, capacity reservation. Useful when the agent should follow a script instead of guessing. 1installs azure-storage-file-share-ts A skill that feeds the agent working TypeScript examples for Azure File Share via the @azure/storage-file-share SDK: shares, directories, uploads and downloads. 1installs azure-search-documents-ts A skill that gives your agent working TypeScript patterns for the Azure AI Search SDK: indexes, vector and hybrid search, semantic ranking. 1installs azure-identity-ts A skill that walks the agent through Azure authentication with the @azure/identity library in TypeScript. Useful once DefaultAzureCredential or managed identity shows up in your code. 1installs azure-ai-projects-ts Tells your coding agent how to use the Azure AI Projects SDK for JavaScript: agents, connections, deployments, datasets, indexes and evaluations. 1installs azure-monitor-opentelemetry-exporter-py A skill for low-level OpenTelemetry export of traces, metrics and logs to Application Insights from Python. Useful when you run a custom telemetry pipeline. 1installs azure-messaging-webpubsubservice-py A Python SDK skill for Azure Web PubSub Service: WebSocket messaging, groups, access tokens and connection management. 1installs azure-ai-language-conversations-py A skill for Conversational Language Understanding with the Python SDK: intent and entity analysis for dialog. Useful when you build NLP features on Azure. 1installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor