From 38e1bb85bf54cfa45767c9bffcdacc6b9e985870 Mon Sep 17 00:00:00 2001 From: Satya Sai Bharath Vemula Date: Wed, 4 Nov 2026 08:30:17 -0800 Subject: [PATCH 1/3] docs(skill-inspector): document the Windows stdout form for scan reports Fixes #1015: step 2's --output command always fails on Windows because safe file output is unsupported on that platform (exit code 2, no report written). Label the existing command as POSIX and add the PowerShell stdout-redirect form, noting that a non-zero exit from --output on Windows is a platform refusal with no partial report to inspect. AI-assistance disclosure: this change was prepared with AI assistance. Signed-off-by: Satya Sai Bharath Vemula --- skills/skill-inspector/SKILL.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/skills/skill-inspector/SKILL.md b/skills/skill-inspector/SKILL.md index 25f071e28..1c38d3a22 100644 --- a/skills/skill-inspector/SKILL.md +++ b/skills/skill-inspector/SKILL.md @@ -36,11 +36,23 @@ Do not rely on the numeric score alone. A low score can miss semantic risk, and 2. Run the static scan. + On POSIX systems: + ```bash skillspector scan "$TARGET" --no-llm --format json --output /tmp/skill-inspector-report.json ``` - If the command exits non-zero, inspect any partial report and continue manually. Record that the static line was incomplete. + On Windows, safe file output is unsupported, so `--output` always fails + (exit code 2) and no report is written. Omit `--output` and redirect + stdout to a file outside the scan target instead. Use + `Set-Content -Encoding utf8`, not `>`, so PowerShell writes UTF-8 JSON + rather than UTF-16: + + ```powershell + skillspector scan "$TARGET" --no-llm --format json | Set-Content -Encoding utf8 "$env:TEMP\skill-inspector-report.json" + ``` + + If the command exits non-zero, inspect any partial report and continue manually. Record that the static line was incomplete. On Windows, a non-zero exit from a command using `--output` is a platform refusal, not a scan failure: no partial report exists, so do not look for one or retry the same command. 3. Read the SkillSpector report. From e554641f0380f077de99777cdbde948d6eccfe01 Mon Sep 17 00:00:00 2001 From: bharathvemula Date: Fri, 6 Nov 2026 04:54:12 +0000 Subject: [PATCH 2/3] docs(skill-inspector): write the Windows report with -LiteralPath A quoted positional path still binds to wildcard-aware -Path, so a $env:TEMP containing square brackets (e.g. C:\Temp[1]) can send the report elsewhere. -LiteralPath handles these valid Windows paths in both PowerShell 5.1 and newer versions. Addresses review feedback on #1017. Signed-off-by: Bharath Vemula --- skills/skill-inspector/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/skill-inspector/SKILL.md b/skills/skill-inspector/SKILL.md index 1c38d3a22..278e733a7 100644 --- a/skills/skill-inspector/SKILL.md +++ b/skills/skill-inspector/SKILL.md @@ -49,7 +49,7 @@ Do not rely on the numeric score alone. A low score can miss semantic risk, and rather than UTF-16: ```powershell - skillspector scan "$TARGET" --no-llm --format json | Set-Content -Encoding utf8 "$env:TEMP\skill-inspector-report.json" + skillspector scan "$TARGET" --no-llm --format json | Set-Content -Encoding utf8 -LiteralPath "$env:TEMP\skill-inspector-report.json" ``` If the command exits non-zero, inspect any partial report and continue manually. Record that the static line was incomplete. On Windows, a non-zero exit from a command using `--output` is a platform refusal, not a scan failure: no partial report exists, so do not look for one or retry the same command. From 5eb23f7c733ee1923792a94f7c231a9adb20cdf8 Mon Sep 17 00:00:00 2001 From: Bharath Vemula Date: Tue, 10 Nov 2026 05:24:26 +0000 Subject: [PATCH 3/3] docs(skill-inspector): use BOM-free WriteAllText for Windows report Set-Content -Encoding utf8 writes a UTF-8 BOM on PowerShell 5.1, so the report fails to parse in Python and Node. Use the BOM-free [IO.File]::WriteAllText(...) form tested by KAYOKG on PowerShell 5.1 (first bytes 7B 0A, parses in Python and Node), and note -Encoding utf8NoBOM as a PowerShell 6+ alternative. Signed-off-by: Bharath Vemula --- skills/skill-inspector/SKILL.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/skills/skill-inspector/SKILL.md b/skills/skill-inspector/SKILL.md index 278e733a7..22ae3a429 100644 --- a/skills/skill-inspector/SKILL.md +++ b/skills/skill-inspector/SKILL.md @@ -45,11 +45,16 @@ Do not rely on the numeric score alone. A low score can miss semantic risk, and On Windows, safe file output is unsupported, so `--output` always fails (exit code 2) and no report is written. Omit `--output` and redirect stdout to a file outside the scan target instead. Use - `Set-Content -Encoding utf8`, not `>`, so PowerShell writes UTF-8 JSON - rather than UTF-16: + `[IO.File]::WriteAllText(...)`, not `>` or `Set-Content -Encoding utf8`: + plain `>` writes UTF-16 JSON on PowerShell 5.1, which JSON parsers + reject, and `Set-Content -Encoding utf8` writes a UTF-8 BOM on + PowerShell 5.1, which Python and Node JSON parsers also reject. The + `[IO.File]::WriteAllText(...)` form is BOM-free on both PowerShell 5.1 + and 7+ (`-Encoding utf8NoBOM` is an alternative, but only on + PowerShell 6+): ```powershell - skillspector scan "$TARGET" --no-llm --format json | Set-Content -Encoding utf8 -LiteralPath "$env:TEMP\skill-inspector-report.json" + [IO.File]::WriteAllText("$env:TEMP\skill-inspector-report.json", ((skillspector scan "$TARGET" --no-llm --format json) -join "`n")) ``` If the command exits non-zero, inspect any partial report and continue manually. Record that the static line was incomplete. On Windows, a non-zero exit from a command using `--output` is a platform refusal, not a scan failure: no partial report exists, so do not look for one or retry the same command.