openspec-zcode/uninstall.ps1
keboss-m 163483eb50 feat: initial OpenSpec skills + /opsx commands for ZCode
Port of @fission-ai/openspec@1.4.1 workflow templates into ZCode-native
skills and slash commands.

- 11 skills (skills/openspec-*/SKILL.md): auto-trigger + /skill force-load
- 11 commands (commands/opsx/*.md): /opsx:explore, /opsx:propose, /opsx:apply,
  /opsx:sync, /opsx:archive, /opsx:new, /opsx:continue, /opsx:ff, /opsx:verify,
  /opsx:bulk-archive, /opsx:onboard
- install.sh / install.ps1 (idempotent, copies to ~/.zcode/)
- uninstall.sh / uninstall.ps1
- README.md with command table, install/update/uninstall, upstream mapping

Skill instruction text is ported verbatim from the upstream
get…SkillTemplate().instructions fields, with three ZCode adaptations:
1. /opsx:<cmd> cross-refs inside skill bodies → /skill openspec-<name>
2. Task tool → Agent tool (one occurrence in openspec-archive-change)
3. Source-version comment header in each SKILL.md
2026-07-06 15:36:43 +03:00

34 lines
1.2 KiB
PowerShell

# uninstall.ps1 — remove OpenSpec skills + /opsx commands from ZCode user directory.
[CmdletBinding()]
param(
[string]$ZCodeHome = (Join-Path $env:USERPROFILE ".zcode")
)
$ErrorActionPreference = "Stop"
$SkillsDest = Join-Path $ZCodeHome "skills"
$CommandsDest = Join-Path $ZCodeHome "commands\opsx"
$removedSkills = 0
if (Test-Path -LiteralPath $SkillsDest) {
Get-ChildItem -LiteralPath $SkillsDest -Directory -Filter "openspec-*" -ErrorAction SilentlyContinue | ForEach-Object {
Remove-Item -LiteralPath $_.FullName -Recurse -Force
$removedSkills++
}
}
$removedCmds = 0
if (Test-Path -LiteralPath $CommandsDest) {
Get-ChildItem -LiteralPath $CommandsDest -Filter "*.md" -File -ErrorAction SilentlyContinue | ForEach-Object {
Remove-Item -LiteralPath $_.FullName -Force
$removedCmds++
}
# Remove empty opsx commands dir if nothing is left.
if (-not (Get-ChildItem -LiteralPath $CommandsDest -Force -ErrorAction SilentlyContinue)) {
Remove-Item -LiteralPath $CommandsDest -Force -ErrorAction SilentlyContinue
}
}
Write-Host "✓ Removed $removedSkills skills + $removedCmds commands from $ZCodeHome"
Write-Host "Restart ZCode for the change to take effect."