Skip to content

Universal SEO skill for Claude Code. 26 sub-skills + 19 sub-agents covering technical SEO, E-E-A-T, schema, GEO/AEO, agent readiness (Lighthouse Agentic Browsing, WebMCP, llms.txt), backlinks, local SEO, e-commerce, international SEO, Google APIs, and PDF/Excel reporting. 9 optional extensions for live SEO data.

fix(uninstall): report all removed Windows entries

Agrici.Daniel3344796aafe0
diff --git a/.github/workflows/windows-smoke.yml b/.github/workflows/windows-smoke.yml
index c417354..62f7773 100644
--- a/.github/workflows/windows-smoke.yml
+++ b/.github/workflows/windows-smoke.yml
@@ -119,9 +119,15 @@ jobs:
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
- ./uninstall.ps1
$skills = Join-Path $env:USERPROFILE ".claude\skills"
$agents = Join-Path $env:USERPROFILE ".claude\agents"
+ $expectedSkillDirs = @(Get-ChildItem -Path $skills -Directory -Filter "seo" -ErrorAction SilentlyContinue).Count + @(Get-ChildItem -Path $skills -Directory -Filter "seo-*" -ErrorAction SilentlyContinue).Count
+ $expectedAgentFiles = @(Get-ChildItem -Path $agents -File -Filter "seo-*.md" -ErrorAction SilentlyContinue).Count
+ $uninstallOutput = & ./uninstall.ps1 6>&1 | Out-String
+ $expectedSummary = "claude-seo uninstalled ($expectedSkillDirs skill dirs, $expectedAgentFiles agent files)"
+ if ($uninstallOutput -notmatch [regex]::Escape($expectedSummary)) {
+ throw "Uninstaller summary did not report all removed entries. Output: $uninstallOutput"
+ }
if (Test-Path (Join-Path $skills "seo")) { throw "Orchestrator skill remains" }
if (Get-ChildItem -Path $skills -Directory -Filter "seo-*" -ErrorAction SilentlyContinue) {
throw "SEO sub-skill directories remain"
@@ -130,6 +136,23 @@ jobs:
throw "SEO agent files remain"
}
+ # A partial install can contain sub-skills and agents without the
+ # orchestrator. Its removal count must still be accurate.
+ New-Item -ItemType Directory -Force -Path (Join-Path $skills "seo-local"), (Join-Path $skills "seo-maps") | Out-Null
+ New-Item -ItemType File -Force -Path (Join-Path $agents "seo-local.md"), (Join-Path $agents "seo-maps.md") | Out-Null
+ $partialOutput = & ./uninstall.ps1 6>&1 | Out-String
+ $partialSummary = "claude-seo uninstalled (2 skill dirs, 2 agent files)"
+ if ($partialOutput -notmatch [regex]::Escape($partialSummary)) {
+ throw "Partial-install summary was incorrect. Output: $partialOutput"
+ }
+ if (Test-Path (Join-Path $skills "seo-local")) { throw "Partial sub-skill remains" }
+ if (Test-Path (Join-Path $agents "seo-local.md")) { throw "Partial agent remains" }
+
+ $emptyOutput = & ./uninstall.ps1 6>&1 | Out-String
+ if ($emptyOutput -notmatch [regex]::Escape("Nothing to remove")) {
+ throw "Second uninstall did not report an empty install. Output: $emptyOutput"
+ }
+
- name: Remove isolated user profile
if: always()
shell: pwsh
diff --git a/tests/test_windows_uninstaller.py b/tests/test_windows_uninstaller.py
new file mode 100644
index 0000000..32f1786
--- /dev/null
+++ b/tests/test_windows_uninstaller.py
@@ -0,0 +1,26 @@
+"""Static contracts for the Windows manual uninstaller."""
+
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parents[1]
+
+
+def test_uninstaller_counts_removed_items_in_main_scope() -> None:
+ """Pipeline child scopes must not lose counts before the summary is printed."""
+ text = (ROOT / "uninstall.ps1").read_text(encoding="utf-8")
+
+ assert "foreach ($subSkill in @(Get-ChildItem" in text
+ assert "foreach ($agentFile in @(Get-ChildItem" in text
+ assert "$removedSkills++" in text
+ assert "$removedAgents++" in text
+ assert "$script:removedSkills++" not in text
+ assert "$script:removedAgents++" not in text
+
+
+def test_windows_smoke_checks_full_partial_and_empty_uninstalls() -> None:
+ text = (ROOT / ".github/workflows/windows-smoke.yml").read_text(encoding="utf-8")
+
+ assert "$expectedSummary" in text
+ assert "-Filter \"seo\" -ErrorAction SilentlyContinue) +" not in text
+ assert "Partial-install summary was incorrect" in text
+ assert "Nothing to remove" in text
diff --git a/uninstall.ps1 b/uninstall.ps1
index 009c7d2..bb751e5 100644
--- a/uninstall.ps1
+++ b/uninstall.ps1
@@ -38,19 +38,19 @@ function Main {
# Remove every seo-* sub-skill directory
if (Test-Path $SkillDir -PathType Container) {
- Get-ChildItem -Path $SkillDir -Directory -Filter "seo-*" -ErrorAction SilentlyContinue | ForEach-Object {
- Remove-Item -Recurse -Force $_.FullName
- Write-Color Green " Removed: $($_.FullName)"
- $script:removedSkills++
+ foreach ($subSkill in @(Get-ChildItem -Path $SkillDir -Directory -Filter "seo-*" -ErrorAction SilentlyContinue)) {
+ Remove-Item -Recurse -Force $subSkill.FullName
+ Write-Color Green " Removed: $($subSkill.FullName)"
+ $removedSkills++
}
}
# Remove every seo-*.md agent file
if (Test-Path $AgentDir -PathType Container) {
- Get-ChildItem -Path $AgentDir -File -Filter "seo-*.md" -ErrorAction SilentlyContinue | ForEach-Object {
- Remove-Item -Force $_.FullName
- Write-Color Green " Removed: $($_.FullName)"
- $script:removedAgents++
+ foreach ($agentFile in @(Get-ChildItem -Path $AgentDir -File -Filter "seo-*.md" -ErrorAction SilentlyContinue)) {
+ Remove-Item -Force $agentFile.FullName
+ Write-Color Green " Removed: $($agentFile.FullName)"
+ $removedAgents++
}
}