add-policy

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

1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/voidful/Aixlarity --skill add-policy-voidful
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-policy
Source: https://github.com/voidful/Aixlarity/tree/main/aixlarity-ide/.github/skills/add-policy
Command: npx skills add https://github.com/voidful/Aixlarity --skill add-policy-voidful

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding an enterprise configuration policy to VS Code touches many layers: the configuration schema, the PolicyCategory enum, account-level policy data, and generated ADMX/plist/JSON artifacts. This Skill walks you through the full lifecycle so nothing is missed and the auto-generated policy catalog stays in sync. ## Core Features & Use Cases - Policy Registration: Add a policy field to any configuration property with the correct name, category, minimumVersion, and localization keys. - Account-Based Policies: Wire policies to Copilot account policy data via IPolicyData value functions. - Artifact Export: Regenerate policyData.jsonc with npm run export-policy-data so Windows Group Policy, macOS plist, and Linux JSON artifacts stay current. - Extension Policies: Define policies for extension settings through the vscode-distro product.json and keep test fixtures in sync. - Use Case: You need to let enterprise admins lock a new chat setting via Group Policy. This Skill guides you from adding the policy: field, through compilation checks, to exporting the updated policy catalog. ## Quick Start Add a new configuration policy named MyPolicyName to the setting I just created and regenerate the exported policy data.

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 PascalCase name, a PolicyCategory, a minimumVersion taken from the major.minor of package.json, and localization keys. Then run 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?

Extensions cannot add policy fields directly. Policies for extension settings are defined in the vscode-distro product.json under extensionConfigurationPolicy, then merged into policyData.jsonc during export.

How do account-based policies work with IPolicyData?

Add a value function to the policy that receives IPolicyData from the default account service. Return a concrete value to override the user setting, or undefined to fall through to OS policy or the user's own setting.

Why does the policy export test fail after adding an extension policy?

The test fixture extensionPolicyFixture.json must match the extension policies in the checked-in policyData.jsonc. Update the fixture whenever distro extension policies change, and bump the pinned distro commit in package.json.