From ca775b9302a6f5aceb3cacd6d4248be2f5de45a6 Mon Sep 17 00:00:00 2001 From: "nic | nic.ethkl.eth" Date: Tue, 18 Aug 2026 11:31:53 +0800 Subject: [PATCH 1/2] Fix ANSI color output --- .github/workflows/validate-skills.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate-skills.yml b/.github/workflows/validate-skills.yml index fe03309..ac15c8f 100644 --- a/.github/workflows/validate-skills.yml +++ b/.github/workflows/validate-skills.yml @@ -38,13 +38,22 @@ jobs: - name: Smoke-test Skills CLI discovery shell: bash + env: + NO_COLOR: "1" run: | mapfile -t skill_dirs < <(find skills -mindepth 1 -maxdepth 1 -type d -print | sort) test "${#skill_dirs[@]}" -gt 0 for skill_dir in "${skill_dirs[@]}"; do - output="$(npx --yes skills@1.5.22 add "./$skill_dir" --list 2>&1)" + if ! output="$(npx --yes skills@1.5.22 add "./$skill_dir" --list 2>&1)"; then + printf '%s\n' "$output" + echo "ERROR: Skills CLI failed for $skill_dir" + exit 1 + fi printf '%s\n' "$output" - grep -F "Found 1 skill" <<< "$output" + if ! grep -Fq "Found 1 skill" <<< "$output"; then + echo "ERROR: Expected exactly one discovered skill in $skill_dir" + exit 1 + fi done etherscan-flow: From e776da03480b5e85f0be20640d56c0006d094f81 Mon Sep 17 00:00:00 2001 From: kenny yong Date: Tue, 18 Aug 2026 11:40:55 +0800 Subject: [PATCH 2/2] Strip ANSI from CLI output and restore match confirmation in smoke test Make the "Found 1 skill" assertion independent of the Skills CLI's color behavior by stripping ANSI escape codes from the captured output before matching, rather than relying solely on the CLI honoring NO_COLOR. Also restore a per-skill confirmation line in the CI log (lost when switching to grep -Fq) so it is clear which assertion passed for each skill. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/validate-skills.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-skills.yml b/.github/workflows/validate-skills.yml index ac15c8f..4952fc4 100644 --- a/.github/workflows/validate-skills.yml +++ b/.github/workflows/validate-skills.yml @@ -50,10 +50,14 @@ jobs: exit 1 fi printf '%s\n' "$output" - if ! grep -Fq "Found 1 skill" <<< "$output"; then + # Strip ANSI escape codes so the assertion does not depend on the + # CLI honoring NO_COLOR (belt-and-suspenders with the env var above). + clean="$(printf '%s\n' "$output" | sed $'s/\x1b\\[[0-9;]*m//g')" + if ! match="$(grep -F "Found 1 skill" <<< "$clean")"; then echo "ERROR: Expected exactly one discovered skill in $skill_dir" exit 1 fi + echo "OK ($skill_dir): $match" done etherscan-flow: