Chocolatey operations integration skill. Pre- and post-processing for choco upgrade, nssm service compatibility management, and metadata update failure recovery.
AreaProblemResolution TopicPackage pathAfter choco upgrade, the nssm Application path becomes stale due to version-specific foldersupdate-path.mdService compatibilityAfter major upgrade (e.g., syncthing v1→v2), NSSM fails with service-specific errorshawl-migration.mdMetadataRuntime install succeeds + chocolatey .nuspec is stale (UniGetUI shows repeated upgrades)metadata-fix.mdDiagnosisIdentify which service has issues / which package is stalediagnose.mdBulk post-processingAutomatically check affected services after choco upgradepost-upgrade.md
StrategyExample PathProsConsStable shim path (recommended)%ChocolateyInstall%\bin\syncthing.exePath remains unchanged after choco upgradeWithout --shimgen-waitforexit, nssm may misinterpret shim exit as a crashVersion-specific actual path%ChocolateyInstall%\lib\syncthing\tools\...-v2.1.0\syncthing.exeNo shim issuesPath breaks on every upgrade — this is why this skill exists
Default choice: stable shim path. Use version-specific path + post-upgrade hook combination only for services where shim issues occur. When NSSM compatibility itself breaks (like syncthing v2), apply shawl-migration.
nssm supports REG_EXPAND_SZ but nssm set defaults to REG_SZ. Set registry directly via PowerShell:
powershell
$regPath = "HKLM:\SYSTEM\CurrentControlSet\Services\<service>\Parameters"
Set-ItemProperty -Path $regPath -Name "Application" -Value '%ChocolateyInstall%\bin\<exe>' -Type ExpandString
Or use an expanded literal path:
bash
gsudo nssm set <service> Application "C:\ProgramData\chocolatey\bin\<exe>"
TopicFileDescriptiondiagnosediagnose.mdnssm service diagnosis proceduremetadata-fixmetadata-fix.mdRecovery for UniGetUI/choco metadata (.nuspec) update failurespost-upgradepost-upgrade.mdPost-processing after choco upgradeshawl-migrationshawl-migration.mdNSSM → shawl migration (major upgrades like syncthing v2)update-pathupdate-path.mdnssm path refresh
ModeCommandDescriptiondiagnosenode <skill-dir>/scripts/nssm-manager.js diagnoseCheck all nssm servicesupdate-pathnode <skill-dir>/scripts/nssm-manager.js update-path <service>Output path refresh command for a specific servicepost-upgradenode <skill-dir>/scripts/nssm-manager.js post-upgradeFull post-processing check
<skill-dir> = ~/.claude/skills/choco
Note: node may not be on PATH in bash. In an fnm environment, use the full path:
bash
"$APPDATA/fnm/node-versions/v20.20.0/installation/node.exe" <skill-dir>/scripts/nssm-manager.js <mode>
nssm set/stop/start and choco upgrade commands require administrator privileges. Per the Windows rule, using gsudo is the default:
bash
gsudo choco upgrade <pkg> -y
gsudo nssm set <service> Application "<path>"
Or invoke via the PowerShell tool:
powershell
gsudo powershell -ExecutionPolicy Bypass -File "<script.ps1>"
text
choco (main workflow)
├─→ diagnose (step 1 diagnosis)
├─→ metadata-fix (recover stale choco/UniGetUI metadata)
├─→ post-upgrade (bulk check after choco upgrade)
├─→ update-path (nssm path refresh)
└─→ shawl-migration (NSSM → shawl migration)
└─→ shawl binary (~/.local/bin/shawl.exe, downloaded from GitHub releases)
update-pathshawl-migrationmetadata-fixdiagnose + post-upgradeThis skill is subject to self-improvement after execution.
If malfunction is detected, improve it via /skill-kit upgrade choco.
Checklist:
choco-nssm (absorbed into this skill, moved to ~/.claude/.bak/)