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(windows): make PowerShell installers parse on Windows PowerShell 5.1

Agrici Danield25a6755d822
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8a2b45b..6bf71d2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -72,6 +72,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- The ahrefs and dataforseo PowerShell installers failed to parse on
+ Windows PowerShell 5.1 (pre-existing). 5.1 reads a script without a BOM as
+ ANSI, so their check-mark and box symbols broke the string quoting; pwsh was
+ unaffected. Every shipped `.ps1` file is now ASCII, a test enforces it, and
+ CI parses every extension script on both PowerShell versions; the Matomo
+ credential writer prints plain ASCII so it runs under a cp1252 console.
+
- UTF-8 pages served as `text/html` without a charset were decoded as
ISO-8859-1 in seven scripts (`render_page`, `parse_html`, `nlp_analyze`,
`preload_check`, `parasite_risk`, `ucp_check`, `gbp_deprecation_lint`).
diff --git a/extensions/ahrefs/install.ps1 b/extensions/ahrefs/install.ps1
index 2e68029..b729bb9 100644
--- a/extensions/ahrefs/install.ps1
+++ b/extensions/ahrefs/install.ps1
@@ -1,4 +1,4 @@
-# Claude SEO — Ahrefs extension installer (Windows / PowerShell).
+# Claude SEO - Ahrefs extension installer (Windows / PowerShell).
# Mirrors extensions/ahrefs/install.sh.
[CmdletBinding()]
param()
@@ -31,7 +31,7 @@ $SkillTarget = Join-Path $SkillDir "seo-ahrefs"
New-Item -ItemType Directory -Path $SkillTarget -Force | Out-Null
Copy-Item -Path (Join-Path $SourceDir "skills/seo-ahrefs/SKILL.md") `
-Destination (Join-Path $SkillTarget "SKILL.md") -Force
-Write-Host "✓ Installed skill: $SkillTarget"
+Write-Host "[OK] Installed skill: $SkillTarget"
# Pre-warm.
& npx --yes --package=@ahrefs/[email protected] mcp --help *> $null
diff --git a/extensions/dataforseo/install.ps1 b/extensions/dataforseo/install.ps1
index d1d6925..34e23ba 100644
--- a/extensions/dataforseo/install.ps1
+++ b/extensions/dataforseo/install.ps1
@@ -3,41 +3,41 @@
$ErrorActionPreference = "Stop"
-Write-Host "════════════════════════════════════════" -ForegroundColor Cyan
-Write-Host "║ DataForSEO Extension - Installer ║" -ForegroundColor Cyan
-Write-Host "║ For Claude SEO ║" -ForegroundColor Cyan
-Write-Host "════════════════════════════════════════" -ForegroundColor Cyan
+Write-Host "========================================" -ForegroundColor Cyan
+Write-Host "| DataForSEO Extension - Installer |" -ForegroundColor Cyan
+Write-Host "| For Claude SEO |" -ForegroundColor Cyan
+Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""
# Check prerequisites
$SeoSkillDir = "$env:USERPROFILE\.claude\skills\seo"
if (-not (Test-Path $SeoSkillDir)) {
- Write-Host "✗ Claude SEO is not installed." -ForegroundColor Red
+ Write-Host "[X] Claude SEO is not installed." -ForegroundColor Red
Write-Host " Install it first: irm https://raw.githubusercontent.com/AgriciDaniel/claude-seo/main/install.ps1 | iex"
exit 1
}
-Write-Host "✓ Claude SEO detected" -ForegroundColor Green
+Write-Host "[OK] Claude SEO detected" -ForegroundColor Green
$nodeCmd = Get-Command -Name node -ErrorAction SilentlyContinue
if ($null -eq $nodeCmd) {
- Write-Host "✗ Node.js is required but not installed." -ForegroundColor Red
+ Write-Host "[X] Node.js is required but not installed." -ForegroundColor Red
Write-Host " Install Node.js 20+: https://nodejs.org/"
exit 1
}
$nodeVersion = (node -v) -replace 'v','' -split '\.' | Select-Object -First 1
if ([int]$nodeVersion -lt 20) {
- Write-Host "✗ Node.js 20+ required (found v$nodeVersion)." -ForegroundColor Red
+ Write-Host "[X] Node.js 20+ required (found v$nodeVersion)." -ForegroundColor Red
exit 1
}
-Write-Host "✓ Node.js $(node -v) detected" -ForegroundColor Green
+Write-Host "[OK] Node.js $(node -v) detected" -ForegroundColor Green
$npxCmd = Get-Command -Name npx -ErrorAction SilentlyContinue
if ($null -eq $npxCmd) {
- Write-Host "✗ npx is required but not found (comes with npm)." -ForegroundColor Red
+ Write-Host "[X] npx is required but not found (comes with npm)." -ForegroundColor Red
exit 1
}
-Write-Host "✓ npx detected" -ForegroundColor Green
+Write-Host "[OK] npx detected" -ForegroundColor Green
# Prompt for credentials
Write-Host ""
@@ -47,7 +47,7 @@ Write-Host ""
$DfseUsername = Read-Host "DataForSEO username (email)"
if ([string]::IsNullOrEmpty($DfseUsername)) {
- Write-Host "✗ Username cannot be empty." -ForegroundColor Red
+ Write-Host "[X] Username cannot be empty." -ForegroundColor Red
exit 1
}
@@ -56,7 +56,7 @@ $DfsePassword = [Runtime.InteropServices.Marshal]::PtrToStringBSTR(
[Runtime.InteropServices.Marshal]::SecureStringToBSTR($DfsePasswordSecure)
)
if ([string]::IsNullOrEmpty($DfsePassword)) {
- Write-Host "✗ Password cannot be empty." -ForegroundColor Red
+ Write-Host "[X] Password cannot be empty." -ForegroundColor Red
exit 1
}
@@ -67,7 +67,7 @@ if (Test-Path "$ScriptDir\skills\seo-dataforseo\SKILL.md") {
} elseif (Test-Path "$ScriptDir\extensions\dataforseo\skills\seo-dataforseo\SKILL.md") {
$SourceDir = "$ScriptDir\extensions\dataforseo"
} else {
- Write-Host "✗ Cannot find extension source files." -ForegroundColor Red
+ Write-Host "[X] Cannot find extension source files." -ForegroundColor Red
Write-Host " Run this script from the claude-seo repo."
exit 1
}
@@ -83,21 +83,21 @@ $FieldConfigPath = "$SeoSkillDir\dataforseo-field-config.json"
# Install skill
Write-Host ""
-Write-Host "→ Installing DataForSEO skill..." -ForegroundColor Yellow
+Write-Host "-> Installing DataForSEO skill..." -ForegroundColor Yellow
New-Item -ItemType Directory -Force -Path $SkillDir | Out-Null
Copy-Item -Force "$SourceDir\skills\seo-dataforseo\SKILL.md" "$SkillDir\SKILL.md"
# Install agent
-Write-Host "→ Installing DataForSEO agent..." -ForegroundColor Yellow
+Write-Host "-> Installing DataForSEO agent..." -ForegroundColor Yellow
New-Item -ItemType Directory -Force -Path $AgentDir | Out-Null
Copy-Item -Force "$SourceDir\agents\seo-dataforseo.md" "$AgentDir\seo-dataforseo.md"
# Install field config
-Write-Host "→ Installing field config..." -ForegroundColor Yellow
+Write-Host "-> Installing field config..." -ForegroundColor Yellow
Copy-Item -Force "$SourceDir\field-config.json" $FieldConfigPath
# Merge MCP config into ~/.claude.json
-Write-Host "→ Configuring MCP server..." -ForegroundColor Yellow
+Write-Host "-> Configuring MCP server..." -ForegroundColor Yellow
$settingsContent = if (Test-Path $McpConfigFile) { Get-Content $McpConfigFile -Raw | ConvertFrom-Json } else { [pscustomobject]@{} }
if (-not $settingsContent.mcpServers) { $settingsContent | Add-Member -NotePropertyName mcpServers -NotePropertyValue ([pscustomobject]@{}) -Force }
@@ -128,10 +128,10 @@ try {
} catch {
Write-Host " Note: could not restrict ~/.claude.json ACL; review manually." -ForegroundColor Yellow
}
-Write-Host " ✓ MCP server configured in ~/.claude.json" -ForegroundColor Green
+Write-Host " [OK] MCP server configured in ~/.claude.json" -ForegroundColor Green
# Pre-warm npx package
-Write-Host "→ Pre-downloading dataforseo-mcp-server..." -ForegroundColor Yellow
+Write-Host "-> Pre-downloading dataforseo-mcp-server..." -ForegroundColor Yellow
try {
& npx -y [email protected] --help 2>&1 | Out-Null
} catch {
@@ -139,7 +139,7 @@ try {
}
Write-Host ""
-Write-Host "✓ DataForSEO extension installed successfully!" -ForegroundColor Green
+Write-Host "[OK] DataForSEO extension installed successfully!" -ForegroundColor Green
Write-Host ""
Write-Host "Usage:" -ForegroundColor Cyan
Write-Host " 1. Start Claude Code: claude"
diff --git a/extensions/dataforseo/uninstall.ps1 b/extensions/dataforseo/uninstall.ps1
index 89a1021..ee3dac6 100644
--- a/extensions/dataforseo/uninstall.ps1
+++ b/extensions/dataforseo/uninstall.ps1
@@ -2,7 +2,7 @@
$ErrorActionPreference = "Stop"
-Write-Host "→ Uninstalling DataForSEO extension..." -ForegroundColor Yellow
+Write-Host "-> Uninstalling DataForSEO extension..." -ForegroundColor Yellow
# Remove skill
if (Test-Path "$env:USERPROFILE\.claude\skills\seo-dataforseo") {
@@ -46,13 +46,13 @@ if 'mcpServers' in settings and 'dataforseo' in settings['mcpServers']:
"@
$result = & $pyExe -c $pyScript 2>&1
if ($LASTEXITCODE -eq 0) {
- Write-Host " ✓ Removed dataforseo from ~/.claude.json" -ForegroundColor Green
+ Write-Host " [OK] Removed dataforseo from ~/.claude.json" -ForegroundColor Green
} else {
- Write-Host " ⚠ Could not auto-remove MCP config. Remove 'dataforseo' from ~\.claude.json manually." -ForegroundColor Yellow
+ Write-Host " [!] Could not auto-remove MCP config. Remove 'dataforseo' from ~\.claude.json manually." -ForegroundColor Yellow
}
} else {
- Write-Host " ⚠ Python not found. Remove 'dataforseo' from ~\.claude.json manually." -ForegroundColor Yellow
+ Write-Host " [!] Python not found. Remove 'dataforseo' from ~\.claude.json manually." -ForegroundColor Yellow
}
}
-Write-Host "✓ DataForSEO extension uninstalled." -ForegroundColor Green
+Write-Host "[OK] DataForSEO extension uninstalled." -ForegroundColor Green
diff --git a/extensions/matomo/install.sh b/extensions/matomo/install.sh
index 11b8762..b7fd39e 100755
--- a/extensions/matomo/install.sh
+++ b/extensions/matomo/install.sh
@@ -81,7 +81,7 @@ matomo_auth.save_config({
"matomo_token": token,
"matomo_site_id": site,
})
-print("✓ Wrote Matomo credentials to " + matomo_auth.CONFIG_PATH + " (0600)")
+print("Wrote Matomo credentials to " + matomo_auth.CONFIG_PATH + " (0600)")
PY
echo
diff --git a/extensions/matomo/uninstall.sh b/extensions/matomo/uninstall.sh
index e2219eb..885ab64 100755
--- a/extensions/matomo/uninstall.sh
+++ b/extensions/matomo/uninstall.sh
@@ -45,7 +45,7 @@ if removed:
except OSError:
pass
raise
- print("\u2713 Cleared " + ", ".join(removed) + " from " + path)
+ print("Cleared " + ", ".join(removed) + " from " + path)
PY
fi
diff --git a/extensions/seranking/install.ps1 b/extensions/seranking/install.ps1
index 952e8ea..2031f95 100644
--- a/extensions/seranking/install.ps1
+++ b/extensions/seranking/install.ps1
@@ -1,4 +1,4 @@
-# Claude SEO — SE Ranking extension installer (Windows / PowerShell).
+# Claude SEO - SE Ranking extension installer (Windows / PowerShell).
$ErrorActionPreference = "Stop"
if (-not (Get-Command python -ErrorAction SilentlyContinue)) {
diff --git a/tests/test_powershell_ascii.py b/tests/test_powershell_ascii.py
new file mode 100644
index 0000000..e5d7c70
--- /dev/null
+++ b/tests/test_powershell_ascii.py
@@ -0,0 +1,26 @@
+"""Windows PowerShell 5.1 reads a BOM-less script as ANSI, not UTF-8.
+
+A multibyte symbol such as a check mark then decodes to bytes that include a
+quote character, and the script fails to parse ("The string is missing the
+terminator"). Keep every shipped .ps1 file pure ASCII so it parses on 5.1 and
+on pwsh alike.
+"""
+
+from __future__ import annotations
+
+import subprocess
+from pathlib import Path
+
+import pytest
+
+ROOT = Path(__file__).resolve().parents[1]
+PS1_FILES = subprocess.run(
+ ["git", "ls-files", "*.ps1"], cwd=ROOT, capture_output=True, text=True, check=True
+).stdout.split()
+
+
[email protected]("rel", PS1_FILES)
+def test_ps1_is_ascii(rel: str) -> None:
+ data = (ROOT / rel).read_bytes()
+ bad = [(i + 1, line) for i, line in enumerate(data.splitlines()) if any(b > 127 for b in line)]
+ assert not bad, f"{rel}: non-ASCII bytes break Windows PowerShell 5.1 on lines {[n for n, _ in bad]}"