microsoft/windowsdeveloperconfig/dsc-resource-authoring
Claude Code and agent skill by microsoft/windowsdeveloperconfig
- vendor
Checking that the SKILL.md file is still in the repository.
Helps discover DSC resources available via dsc.exe, author new configuration.winget files for this repository, and debug existing DSC configurations. Use this skill when the user asks to add a new flow, pick a DSC resource, write or fix a configuration.winget, or debug a winget configure error.
Install
npx vskill@latest install microsoft/windowsdeveloperconfig/dsc-resource-authoringSKILL.md
The same SKILL.md was published earlier as microsoft/windowsdeveloperconfig/dsc-resource-authoring.
DSC Resource Authoring Skill
This skill guides you through three related tasks that all revolve around dsc.exe (DSC v3) and winget configure:
- Discover — enumerate and inspect resources available on the machine.
- Author — compose a valid
configuration.wingetfile that follows
the rules in AGENTS.md.
- Debug — validate and diagnose an existing configuration.
Read AGENTS.md at the repo root before starting. It is the authoritative source of rules; this skill translates those rules into concrete dsc commands.
Phase 1 — Discover Available Resources
List all resources
Using -o json gives structured output that is easy to filter and inspect. Key fields on each object:
- type — the resource type string you put in the
type:field of a.winget. - kind —
Resource,Adapter, orGroup. - version — the resource module version.
Filter by name or adapter
For a new language/tool flow the two relevant types are:
- `Microsoft.WinGet/Package` — dscv3 native resource (preferred, see AGENTS.md §3).
- `Microsoft.WinGet.DSC/WinGetPackage` — v0.2 PowerShell resource (fallback
only when PSDscResources/Script is also needed).
Inspect a resource's schema
This emits the JSON Schema for the resource as a structured object. Drill into specific properties to confirm names and types — e.g. confirm that acceptAgreements (required by AGENTS.md §4) is present:
Find the exact winget package id
Per AGENTS.md §6, always use a versioned id (e.g. Python.Python.3.14), never a bare id (e.g. Python.Python).
Phase 2 — Author a configuration.winget
Ask the user what they want to install
Use ask_user to confirm:
- The package(s) to install and the preferred minor version.
- Whether a post-install PowerShell step is needed (if yes → v0.2 with
PSDscResources/Script; otherwise → dscv3, which is strongly preferred).
- Whether there are install-order dependencies between packages.
Choose the schema version (AGENTS.md §3)
| Need | Schema | Resource | |
|---|---|---|---|
| Pure package install | dscv3 | Microsoft.WinGet/Package | |
| Simple fire-and-forget command | dscv3 | Microsoft.DSC.Transitional/RunCommandOnSet | |
| Idempotent PowerShell 7 script (get/test/set) | dscv3 | Microsoft.DSC.Transitional/PowerShellScript | |
| Idempotent Windows PowerShell 5.1 script (get/test/set) | dscv3 | Microsoft.DSC.Transitional/WindowsPowerShellScript | |
Requires PSDscResources/Script specifically | v0.2 | Microsoft.WinGet.DSC/WinGetPackage + PSDscResources/Script |
Prefer the native dscv3 Microsoft.DSC.Transitional/* resources over v0.2 + PSDscResources/Script whenever possible — they keep the dscv3 document shape and do not require dropping the schema version. Only fall back to v0.2 if the CI runner cannot resolve the Transitional resources.
dscv3 template (preferred)
dscv3 — RunCommandOnSet (fire-and-forget, runs only on Set)
Use when you need to run a single command or script file as a post-step and idempotency checking is handled externally (or not required). The resource only runs its command during a set operation; get and test are no-ops.
To run an inline snippet instead of a script file, use -Command:
dscv3 — PowerShellScript (idempotent, PowerShell 7)
Use when you need full get/test/set idempotency in PowerShell 7. DSC calls testScript first; if it returns $true, setScript is skipped. _inDesiredState: true in the output signals "no change needed".
dscv3 — WindowsPowerShellScript (idempotent, Windows PowerShell 5.1)
Identical schema to PowerShellScript but runs in powershell.exe (5.1). Use when the script relies on a module or API only available in Windows PowerShell.
Key rules to enforce (AGENTS.md §4, §6, §12):
acceptAgreements: truemust appear on everyMicrosoft.WinGet/Package
resource. Do not rely on CLI-level flags for consent.
$schemaURL must be
https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json (not an aka.ms short link).
- Package id must be versioned to minor level.
v0.2 template (only when PSDscResources/Script is needed)
Write the file
Place it at scripts/windows/<id>/configuration.winget. After writing, verify it parses cleanly:
Phase 3 — Debug an Existing Configuration
Validate YAML syntax
Dry-run the configuration
Check resource get state
Apply with verbose output
Logs are written to %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\.
Common failure patterns
| Symptom | Likely cause | Fix | |
|---|---|---|---|
acceptAgreements missing/false | Consent not passed | Add acceptAgreements: true to every Microsoft.WinGet/Package resource | |
| Package id not found | Unversioned or wrong id | Run winget search to confirm the exact id; use minor-versioned form | |
$schema URL rejected | Wrong schema URL | Use raw.githubusercontent.com/PowerShell/DSC/... URL, not aka.ms | |
| Interactive prompt during CI | --disable-interactivity missing | apply-configuration.ps1 adds this; verify it is invoked via the shim | |
PSDscResources/Script fails on dscv3 | Wrong schema version | Switch to v0.2 for any config that needs Script resources |
Checklist Before Committing a New Flow
Run the static checks from AGENTS.md §11:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 1 Oct 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/dsc-resource-authoring/SKILL.md
Popularity
- Repository stars
- 2,837
- Repository forks
- 199
- 7-day trend score
- 40
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
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/windowsdeveloperconfig/dsc-resource-authoring)