add-policy

Registers and exports VS Code configuration policies across Windows, macOS, and Linux platforms.

1|Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Niiihuel/openide --skill add-policy-niiihuel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-policy
Source: https://github.com/Niiihuel/openide/tree/main/vscode/.github/skills/add-policy
Command: npx skills add https://github.com/Niiihuel/openide --skill add-policy-niiihuel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding an enterprise configuration policy to VS Code involves many coordinated steps—registering the policy field, choosing a category, setting the minimum version, handling account-level overrides, and regenerating platform artifacts—and missing any step breaks the export pipeline or produces invalid ADMX/plist files. ## Core Features & Use Cases - Full Policy Lifecycle Guidance: Walks through adding a policy field to a configuration property, importing PolicyCategory, validating with npm run typecheck-client, and regenerating policyData.jsonc via npm run export-policy-data. - Account and Preview Feature Policies: Explains how to wire value functions against IPolicyData, including the chat_preview_features_enabled pattern for GitHub organization-controlled preview features. - Extension Policy Support: Covers defining policies for extension-contributed settings through extensionConfigurationPolicy in vscode-distro product.json files and keeping test fixtures in sync. - Use Case: When a PR adds a policy: field to a chat setting, use this Skill to verify the minimumVersion matches the current package.json version, enumDescriptions align with the enum array, and the export script regenerates the catalog without manual edits. ## Quick Start Ask the assistant to add a new configuration policy for a VS Code setting and have it follow the registration, validation, and export steps end to end.

Frequently Asked Questions about add-policy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a configuration policy to a VS Code setting?▼

Add a `policy` object to the configuration property schema with a unique PascalCase name, a PolicyCategory, a minimumVersion taken from package.json, and a localized description. Then run npm run typecheck-client and npm run export-policy-data to regenerate the policy catalog.

How do I set the minimumVersion for a new VS Code policy?▼

Read the version field from the root package.json and use its major.minor portion, for example 1.112 from version 1.112.0. Never hardcode an older version such as 1.99.

Can extension settings have enterprise policies in VS Code?▼

Extension authors cannot add policy fields directly. Policies for extension settings are defined in vscode-distro product.json under extensionConfigurationPolicy, then merged into policyData.jsonc during export, with the test fixture kept in sync.

Why does export-policy-data fail with an enumDescriptions error?▼

The export fails when a string-typed policy with an enum array lacks enumDescriptions in its localization block, or when the counts differ. Add one localized enumDescription entry per enum value to resolve it.

When should a policy check chat_preview_features_enabled?▼

Add a value function checking chat_preview_features_enabled === false when the setting controls a preview Copilot or chat feature that organization admins can disable via GitHub account policy. Return undefined otherwise so user settings are not overridden.