← 返回 Skills 市场
drumrobot

Choco

作者 es6kr · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
41
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install choco
功能描述
Chocolatey operations integration — post-processing after choco upgrade, nssm service path refresh, NSSM → shawl migration (syncthing v2 etc.), resync on Uni...
使用说明 (SKILL.md)

Choco

Chocolatey operations integration skill. Pre- and post-processing for choco upgrade, nssm service compatibility management, and metadata update failure recovery.

Core Problems

Area Problem Resolution Topic
Package path After choco upgrade, the nssm Application path becomes stale due to version-specific folders update-path.md
Service compatibility After major upgrade (e.g., syncthing v1→v2), NSSM fails with service-specific error shawl-migration.md
Metadata Runtime install succeeds + chocolatey .nuspec is stale (UniGetUI shows repeated upgrades) metadata-fix.md
Diagnosis Identify which service has issues / which package is stale diagnose.md
Bulk post-processing Automatically check affected services after choco upgrade post-upgrade.md

Path Strategy (HARD STOP — required decision before nssm set Application)

Strategy Example Path Pros Cons
Stable shim path (recommended) %ChocolateyInstall%\bin\syncthing.exe Path remains unchanged after choco upgrade Without --shimgen-waitforexit, nssm may misinterpret shim exit as a crash
Version-specific actual path %ChocolateyInstall%\lib\syncthing ools\...-v2.1.0\syncthing.exe No shim issues Path 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.

Using environment variable paths in nssm

nssm supports REG_EXPAND_SZ but nssm set defaults to REG_SZ. Set registry directly via PowerShell:

$regPath = "HKLM:\SYSTEM\CurrentControlSet\Services\\x3Cservice>\Parameters"
Set-ItemProperty -Path $regPath -Name "Application" -Value '%ChocolateyInstall%\bin\\x3Cexe>' -Type ExpandString

Or use an expanded literal path:

gsudo nssm set \x3Cservice> Application "C:\ProgramData\chocolatey\bin\\x3Cexe>"

Topics

Topic File Description
diagnose diagnose.md nssm service diagnosis procedure
metadata-fix metadata-fix.md Recovery for UniGetUI/choco metadata (.nuspec) update failures
post-upgrade post-upgrade.md Post-processing after choco upgrade
shawl-migration shawl-migration.md NSSM → shawl migration (major upgrades like syncthing v2)
update-path update-path.md nssm path refresh

Scripts

Mode Command Description
diagnose node \x3Cskill-dir>/scripts/nssm-manager.js diagnose Check all nssm services
update-path node \x3Cskill-dir>/scripts/nssm-manager.js update-path \x3Cservice> Output path refresh command for a specific service
post-upgrade node \x3Cskill-dir>/scripts/nssm-manager.js post-upgrade Full post-processing check

\x3Cskill-dir> = ~/.claude/skills/choco

Note: node may not be on PATH in bash. In an fnm environment, use the full path:

"$APPDATA/fnm/node-versions/v20.20.0/installation/node.exe" \x3Cskill-dir>/scripts/nssm-manager.js \x3Cmode>

Administrator Privileges

nssm set/stop/start and choco upgrade commands require administrator privileges. Per the Windows rule, using gsudo is the default:

gsudo choco upgrade \x3Cpkg> -y
gsudo nssm set \x3Cservice> Application "\x3Cpath>"

Or invoke via the PowerShell tool:

gsudo powershell -ExecutionPolicy Bypass -File "\x3Cscript.ps1>"

Topic Dependencies

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)
  • Simple path refresh → update-path
  • Major upgrade requiring nssm deprecation → shawl-migration
  • Runtime OK + only chocolatey metadata stale → metadata-fix
  • Multiple services in bulk → diagnose + post-upgrade

Self-heal

This skill is subject to self-improvement after execution. If malfunction is detected, improve it via /skill-kit upgrade choco.

Checklist:

  1. Are the trigger keywords in description sufficient?
  2. Was the topic selection accurate? (e.g., misrouting metadata stale to update-path)
  3. Was the procedure complete? (Was no manual correction needed?)
  4. Were there no omissions in the deliverables?

References

安全使用建议
Install only if you are comfortable with an agent assisting Windows Administrator-level Chocolatey and service-management work. Review every generated command before running it, verify the exact service and executable path, use a maintenance window for stop/remove/re-register operations, avoid storing Windows passwords in scripts, and do not allow the self-heal upgrade step unless you explicitly intend to modify the installed skill.
能力评估
Purpose & Capability
The Chocolatey, NSSM, and shawl workflows match the stated purpose, and the included script mainly diagnoses services and prints commands rather than directly applying changes.
Instruction Scope
Several workflows normalize Administrator commands that stop, remove, re-register, and reconfigure services; the instructions include some hard stops and verification, but do not consistently require explicit user confirmation, rollback, maintenance-window checks, or target validation before disruptive changes.
Install Mechanism
No install-time execution hook was found, but the documentation tells users to download a shawl binary from GitHub releases into ~/.local/bin as a runtime prerequisite.
Credentials
Administrator privileges, ExecutionPolicy Bypass examples, Chocolatey bulk upgrades, and Windows service identity changes are proportionate to the purpose but high impact; the guidance is under-scoped for preventing downtime or wrong-target changes.
Persistence & Privilege
The skill instructs persistent Windows service reconfiguration and includes a self-heal section directing '/skill-kit upgrade choco' after malfunction, which is unrelated to the immediate service-management task and lacks an explicit user approval gate.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install choco
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /choco 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the choco skill for Chocolatey and service management workflows: - Integrates Chocolatey (choco) upgrade operations with NSSM/shawl service management and metadata fixes. - Provides post-processing after choco upgrades, including service path refresh and migration from NSSM to shawl for major upgrades (e.g., syncthing v2). - Automated recovery for UniGetUI/choco metadata (.nuspec) update failures. - Includes diagnosis, metadata-fix, post-upgrade, shawl-migration, and update-path procedures. - Script usage and administrator privilege requirements are clearly documented.
元数据
Slug choco
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Choco 是什么?

Chocolatey operations integration — post-processing after choco upgrade, nssm service path refresh, NSSM → shawl migration (syncthing v2 etc.), resync on Uni... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 41 次。

如何安装 Choco?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install choco」即可一键安装,无需额外配置。

Choco 是免费的吗?

是的,Choco 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Choco 支持哪些平台?

Choco 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Choco?

由 es6kr(@drumrobot)开发并维护,当前版本 v1.0.0。

💬 留言讨论