refactor(skills): move the Python encoding guard out of the skills root (#7606)

skills/python-encoding.test.mjs was the only loose file in skills/, whose
top level otherwise holds one directory per skill. It checks every skill's
Python scripts, so it is a repo-level guard and belongs next to the others
of its kind in scripts/ (check-skill-import-boundaries,
check-media-use-copy-parity).

Renamed to scripts/check-skill-python-encoding.test.mjs. The test now
resolves skills/ relative to its new home. The skills CI job no longer
finds it with its skills/ glob, so it is appended to SKILLS_TESTS next to
the copy-parity guard and added to the skills path filter. The
test-reachability manifest is updated to match, keyed to skills/**/*.py.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WaterrrForever
2026-11-12 19:58:01 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 97df93fb07
commit 33304cff04
3 changed files with 7 additions and 4 deletions
+2 -1
View File
@@ -164,6 +164,7 @@ jobs:
- "packages/cli/src/media-use/**"
- "scripts/check-media-use-copy-parity.test.mjs"
- "scripts/check-skill-import-boundaries.test.mjs"
- "scripts/check-skill-python-encoding.test.mjs"
- "scripts/generate-skill-module-copies.mjs"
- "skills/**"
- ".claude/skills/**"
@@ -763,7 +764,7 @@ jobs:
echo "::error::No skills/**/*.test.mjs files found. Did the layout change?"
exit 1
fi
SKILLS_TESTS+=(scripts/check-media-use-copy-parity.test.mjs scripts/creator-editing-capabilities.test.mjs)
SKILLS_TESTS+=(scripts/check-media-use-copy-parity.test.mjs scripts/check-skill-python-encoding.test.mjs scripts/creator-editing-capabilities.test.mjs)
printf 'Running %d skills test file(s):\n' "${#SKILLS_TESTS[@]}"
printf ' * %s\n' "${SKILLS_TESTS[@]}"
node --import ./packages/cli/scripts/test-home.mjs --test "${SKILLS_TESTS[@]}"
@@ -16,7 +16,7 @@ import { dirname, join, relative } from "node:path";
import { fileURLToPath } from "node:url";
import { describe, it } from "node:test";
const SKILLS_DIR = dirname(fileURLToPath(import.meta.url));
const SKILLS_DIR = join(dirname(fileURLToPath(import.meta.url)), "..", "skills");
function pythonScripts(dir) {
const found = [];
+4 -2
View File
@@ -22,16 +22,18 @@
"packages/producer/**"
],
"scripts/generate-catalog-payloads.test.ts": ["registry/**", "scripts/**"],
"scripts/check-skill-import-boundaries.test.mjs": ["skills/**"]
"scripts/check-skill-import-boundaries.test.mjs": ["skills/**"],
"scripts/check-skill-python-encoding.test.mjs": ["skills/**/*.py"]
},
"runners": [
{
"cwd": ".",
"command": "set -euo pipefail\nmapfile -t SKILLS_TESTS < <(find skills packages/cli/src/media-use -type f -name \"*.test.mjs\" | sort)\nif [ \"${#SKILLS_TESTS[@]}\" -eq 0 ]; then\necho \"::error::No skills/**/*.test.mjs files found. Did the layout change?\"\nexit 1\nfi\nSKILLS_TESTS+=(scripts/check-media-use-copy-parity.test.mjs scripts/creator-editing-capabilities.test.mjs)\nprintf 'Running %d skills test file(s):\\n' \"${#SKILLS_TESTS[@]}\"\nprintf ' * %s\\n' \"${SKILLS_TESTS[@]}\"\nnode --import ./packages/cli/scripts/test-home.mjs --test \"${SKILLS_TESTS[@]}\"",
"command": "set -euo pipefail\nmapfile -t SKILLS_TESTS < <(find skills packages/cli/src/media-use -type f -name \"*.test.mjs\" | sort)\nif [ \"${#SKILLS_TESTS[@]}\" -eq 0 ]; then\necho \"::error::No skills/**/*.test.mjs files found. Did the layout change?\"\nexit 1\nfi\nSKILLS_TESTS+=(scripts/check-media-use-copy-parity.test.mjs scripts/check-skill-python-encoding.test.mjs scripts/creator-editing-capabilities.test.mjs)\nprintf 'Running %d skills test file(s):\\n' \"${#SKILLS_TESTS[@]}\"\nprintf ' * %s\\n' \"${SKILLS_TESTS[@]}\"\nnode --import ./packages/cli/scripts/test-home.mjs --test \"${SKILLS_TESTS[@]}\"",
"tests": [
"skills/**/*.test.mjs",
"packages/cli/src/media-use/**/*.test.mjs",
"scripts/check-media-use-copy-parity.test.mjs",
"scripts/check-skill-python-encoding.test.mjs",
"scripts/creator-editing-capabilities.test.mjs"
],
"sources": {},