microsoft/skills

azure-appconfiguration-ts

选对CRUD客户端、配置provider和功能开关评估器

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

azure-appconfiguration-ts 是什么?

azure-appconfiguration-ts 将底层配置CRUD与应用运行时加载分开:@azure/app-configuration 管设置,provider负责加载与刷新,@microsoft/feature-management评估功能开关。适合Node.js服务把环境配置、用户灰度条件和刷新行为明确接入。

中文说明由本站依据来源整理;英文原文保留在页面下方。

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 azure-appconfiguration-ts,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 azure-appconfiguration-ts

请在 Codex 的当前工作环境中安装并检查 azure-appconfiguration-ts 这个 Skill。

项目身份:microsoft/skills / azure-appconfiguration-ts
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-typescript/skills/azure-appconfiguration-ts/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-typescript/skills/azure-appconfiguration-ts/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 准备store endpoint与身份,管理任务安装底层SDK,应用加载按需安装provider,功能开关评估再加feature-management;分别准备App Configuration与Key Vault读取权限。

会得到什么

  • 职责清楚的TypeScript配置模块、刷新触发点和功能开关上下文接入方式。

实际使用顺序

  1. 管理设置用AppConfigurationClient,按key/label读取;更新现有项通过ETag与onlyIfUnchanged避免静默覆盖,新增与set覆盖区分。
  2. 应用用load设置selectors和trimKeyPrefixes,再通过get或constructConfigurationObject读取;动态刷新配置间隔后仍需在请求中调用refresh或接入相应触发,onRefresh可响应实际刷新。
  3. Key Vault引用在provider的keyVaultOptions中配置身份与刷新周期;功能开关单独启用featureFlagOptions并交给FeatureManager,用户定向时传userId/groups。固定发布配置可从snapshotName加载。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

教学任务:使用 azure-appconfiguration-ts,给Express服务设计production标签app:*配置加载器。管理CRUD与运行时provider分开,在请求中触发受间隔限制的refresh,并记录onRefresh;Beta功能开关通过FeatureManager按userId/groups评估。只写代码,不修改远端store。
预期结果

预期得到加载、触发刷新和评估开关各自明确的接入方案;本站未运行服务。

使用前先看这些限制

使用条件与边界

  • refreshIntervalInMs配置的是刷新节奏,不能把它写成安装后自动后台每30秒更新的保证。
  • 配置服务身份能读取store,不表示同一身份能解析Key Vault引用;两项权限分别验证。
针对这个 Skill 的疑问

常见问题

直接读取开关的enabled为什么不够?

源文的用户/群组定向还包含过滤条件,需要FeatureManager和上下文参与评估。只读enabled会忽略这些条件,可能让灰度范围失效。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

.github/plugins/azure-sdk-typescript/skills/azure-appconfiguration-ts/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 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.

查看源文件章节 / Source sections
  • 原文:Azure App Configuration SDK for TypeScript
  • 安装 / Installation
  • 原文:Environment Variables
  • 原文:Authentication
  • 原文:CRUD Operations
  • 原文:Create/Update Settings
  • 原文:Read Settings
  • 原文:Delete Settings
  • 原文:Lock/Unlock (Read-Only)
  • 原文:App Configuration Provider
  • 原文:Load Configuration
  • 原文:Dynamic Refresh
  • 原文:Key Vault References
  • 原文:Feature Flags
  • 原文:Create Feature Flag (Low-Level)
  • 原文:Load and Evaluate Feature Flags
  • 原文:Snapshots
  • 原文:Labels
  • 原文:Key Types
  • 原文:Best Practices
原文: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! ); ```

原文: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}`); } ```

文件 SHA256:9e3d2e976b1ed5ed25786a9a1df704a448408c7c0eea0a1f1c277bbf89d439e3

仓库许可证记录:MIT;skill-declaration-captured-not-interpreted,查看来源。

SKILL.md原文description · 2026-11-16T12:36:35.145Z

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.

查看历史简介来源

历史收录数据

来源仓库microsoft/skills
Skill源路径.github/plugins/azure-sdk-typescript/skills/azure-appconfiguration-ts/SKILL.md

安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源