microsoft/winget-dsc/convert-to-v3
Claude Code and agent skill by microsoft/winget-dsc
- vendor
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Converts WinGet Configuration files from DSC schema v0.2 (v2) to the dscv3 processor syntax (v3). Use this skill when asked to convert, migrate, or upgrade a WinGet Configuration file from v2 to v3, or when working with .winget configuration files that need to be updated to the dscv3 schema.
Install
npx vskill@latest install microsoft/winget-dsc/convert-to-v3Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as microsoft/winget-dsc/convert-to-v3.
WinGet Configuration v2 → v3 Conversion Skill
You are an expert at converting WinGet Configuration files from DSC schema v0.2 (v2) to the dscv3 processor syntax (v3). Follow these rules precisely.
Document Structure
v2 structure
v3 structure
Key changes:
- Remove the
properties:wrapper andconfigurationVersion - Remove
assertions:section (v3 does not support assertions in the same way) - Add
$schemapointing to the DSC v3 schema - Add
metadata.winget.processor.identifier: dscv3 - Resources move to a top-level
resources:array
Field Renaming
Apply these renames to every resource:
| v2 Field | v3 Field | |
|---|---|---|
resource: | type: | |
id: | name: | |
settings: | properties: | |
directives: | metadata: |
Example
v2:
v3:
Resource Type Mapping
| v2 Resource Type | v3 Resource Type | Notes | |
|---|---|---|---|
Microsoft.WinGet.DSC/WinGetPackage | Microsoft.WinGet/Package | Renamed | |
PSDscResources/Registry | `Microsoft.Windows/Registry` | Use native v3 resource — dramatically faster | |
PSDscResources/Script | Microsoft.DSC.Transitional/RunCommandOnSet | Or PowerShellScript/WindowsPowerShellScript if test support needed | |
PSDscResources/WindowsOptionalFeature | Microsoft.Windows/OptionalFeatureList | Native v3, batch multiple features in one resource | |
Microsoft.Windows.Developer/* | Microsoft.Windows.Developer/* | Unchanged (adapted resource, requires module install) | |
Microsoft.Windows.Settings/* | Microsoft.Windows.Settings/* | Unchanged (adapted resource, requires module install) |
CRITICAL: Always prefer `Microsoft.Windows/Registry` over `PSDscResources/Registry`. The native v3 resource evaluates in ~3 seconds per key with linear scaling. The adapted PSDscResources/Registry takes 89–228 seconds per key with super-linear growth. For a configuration with 22 registry keys, this is the difference between ~2 minutes and 30+ minutes. Using the native resource also eliminates the need to install the PSDscResources module.
Package Resources (Microsoft.WinGet/Package)
Properties changes
- Add
useLatest: trueto properties (replaces the concept of always getting latest) - Remove
allowPrerelease: truefrom directives/metadata (this was a v2 directive) - The
source: wingetproperty remains the same
Security Context / Elevation
CRITICAL: Do NOT blindly add `securityContext: elevated` to package installs.
Before adding securityContext: elevated to any package resource, check the package's installer manifest in the microsoft/winget-pkgs repository for the ElevationRequirement field:
elevationRequired→ Yes, addsecurityContext: elevatedelevatesSelf→ No, the installer handles its own UAC prompt- No
ElevationRequirementfield → No, elevation is not needed - Portable/zip installers → No, never need elevation
- MSIX installers → No, never need elevation
To check, look up the installer manifest at: manifests/<first-letter>/<Publisher>/<Package>/<Version>/<Id>.installer.yaml
When elevation IS needed, add it in metadata:
Common packages and their elevation requirements
| Package | ElevationRequirement | Needs elevated? | |
|---|---|---|---|
| Git.Git | elevatesSelf | No | |
| GitHub.Cli | elevatesSelf | No | |
| GitHub.Copilot | None (portable) | No | |
| Microsoft.PowerShell | elevatesSelf (MSI) | No | |
| Microsoft.VisualStudioCode | None | No | |
| Python.Python.3.x | elevatesSelf (machine) | No | |
| astral-sh.uv | None (portable) | No | |
| OpenJS.NodeJS | elevatesSelf | No | |
| JanDeDobbeleer.OhMyPosh | None (MSIX) | No | |
| Microsoft.PowerToys | elevatesSelf (machine) | No | |
| Microsoft.WSL | None | No | |
| Canonical.Ubuntu | None (MSIX) | No |
Class-Based DSC Resources (PowerShell Modules)
In v2, PowerShell class-based DSC resources (like PSDscResources/Registry, Microsoft.Windows.Developer/*, Microsoft.Windows.Settings/*) are handled automatically by the WinGet DSC processor.
In v3, the dscv3 processor does NOT know about v2-style PowerShell DSC resources. You must explicitly install the PowerShell modules using Microsoft.DSC.Transitional/RunCommandOnSet before any resources that depend on them.
Required module installs
For each PowerShell DSC module used, add a RunCommandOnSet resource that installs it. All module installs depend on PowerShell 7 being installed first.
CRITICAL: Only use `-AllowPrerelease` when no stable version exists on the PowerShell Gallery.
Check the PowerShell Gallery before adding -Prerelease:
Known module status (verify before use — this may change)
| Module | Stable Available? | Needs -AllowPrerelease? | |
|---|---|---|---|
| PSDscResources | Yes (2.12.0.0) | No | |
| Microsoft.Windows.Settings | No (alpha only) | Yes | |
| Microsoft.Windows.Developer | No (alpha only) | Yes |
Module install pattern
Use Install-PSResource (built into PowerShell 7) rather than the older Install-Module:
For modules with a stable release (no -Prerelease flag needed):
Dependency chain
Resources using these modules MUST have dependsOn pointing to the module install resource:
PSDscResources/Script → RunCommandOnSet
v2 PSDscResources/Script resources have GetScript, TestScript, and SetScript blocks. In v3, these become Microsoft.DSC.Transitional/RunCommandOnSet which only runs the set logic. Combine the test and set logic into the command argument.
Alternative: If you need proper test/get/set separation, useMicrosoft.DSC.Transitional/PowerShellScript(runs in pwsh 7) orMicrosoft.DSC.Transitional/WindowsPowerShellScript(runs in Windows PowerShell 5.1).These havegetScript,testScript, andsetScriptproperties and can properly reportwhether the system is already in the desired state. Performance is comparable to RunCommandOnSet.
Example conversion
v2:
v3:
Registry Resources — Use Native Microsoft.Windows/Registry
CRITICAL: Convert all `PSDscResources/Registry` to `Microsoft.Windows/Registry`.
The native v3 resource is a completely different (and far superior) resource:
- No PowerShell module install needed
- No adapter overhead
- ~3 seconds per key vs 89–228 seconds
- Linear scaling vs super-linear growth
Property mapping
v2 (PSDscResources/Registry) | v3 (Microsoft.Windows/Registry) | Notes | |
|---|---|---|---|
Key: HKLM:\SOFTWARE\... | keyPath: HKLM\SOFTWARE\... | Drop the :\ — use HKLM\ not HKLM:\ | |
Key: HKCU:\SOFTWARE\... | keyPath: HKCU\SOFTWARE\... | Drop the :\ — use HKCU\ not HKCU:\ | |
ValueName: Name | valueName: Name | camelCase | |
ValueType: DWord + ValueData: '3' | valueData: { DWord: 3 } | Type is embedded in the data object | |
ValueType: String + ValueData: text | valueData: { String: "text" } | Type is embedded in the data object | |
ValueType: QWord + ValueData: '0' | valueData: { QWord: 0 } | Type is embedded in the data object | |
Ensure: Present | _exist: true | Different existence model | |
Ensure: Absent | _exist: false | Different existence model | |
Force: true | (not needed) | Native resource handles this | |
dependsOn: [PSDscResources.Module] | (not needed) | No module dependency |
Conversion example
v2:
v3:
Value data types
| Registry Type | v3 Format | Example | |
|---|---|---|---|
| DWord | valueData: { DWord: 3 } | 32-bit integer | |
| QWord | valueData: { QWord: 0 } | 64-bit integer | |
| String | valueData: { String: "text" } | String value | |
| ExpandString | valueData: { ExpandString: "%PATH%" } | Expandable string | |
| MultiString | valueData: { MultiString: ["a", "b"] } | Array of strings | |
| Binary | valueData: { Binary: [0, 1, 2] } | Array of bytes | |
| None | valueData: None | No data |
Elevation rules for Registry
HKLM\keys → addmetadata.winget.securityContext: elevatedHKCU\keys → no elevation needed
Security Context in v3
In v2, elevation was specified per-resource in directives.securityContext.
In v3, elevation is specified in metadata.winget.securityContext:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 2 Jul 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsamples/Convert to v3/SKILL.md
Popularity
- Repository stars
- 145
- Repository forks
- 46
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 May 2026, 6 months ago.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/winget-dsc/convert-to-v3)