Skip to content

Commit 16b6866

Browse files
committed
fix: remove ShellCheck and checkpoint checks from reusable validate.yml
ShellCheck and checkpoint verification are tools that skills provide for use on projects, not checks that should run on skill repos themselves. For example, typo3-testing-skill's checkpoints.yaml validates TYPO3 project structure (Build/UnitTests.xml, Tests/Unit/) which doesn't exist in the skill repo. These checks remain available in repo-specific workflows where appropriate (e.g. agent-rules-skill's validate-agents.yml). Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
1 parent 274727f commit 16b6866

File tree

2 files changed

+1
-107
lines changed

2 files changed

+1
-107
lines changed

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "skill-repo",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"description": "Guide for structuring Netresearch skill repositories",
55
"repository": "https://github.com/netresearch/skill-repo-skill",
66
"license": "MIT",

.github/workflows/validate.yml

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -29,109 +29,3 @@ jobs:
2929

3030
- name: Run skill validation
3131
run: bash .skill-repo-tools/skills/skill-repo/scripts/validate-skill.sh .
32-
33-
- name: ShellCheck scripts
34-
run: |
35-
# Auto-discover shell scripts in skill directories and root scripts/
36-
SCRIPTS=$(find . -path './.skill-repo-tools' -prune -o -path './.git' -prune -o \
37-
\( -name '*.sh' -type f -print \) | sort)
38-
if [[ -z "$SCRIPTS" ]]; then
39-
echo "No shell scripts found, skipping ShellCheck"
40-
exit 0
41-
fi
42-
COUNT=$(echo "$SCRIPTS" | wc -l)
43-
echo "Found $COUNT shell script(s)"
44-
sudo apt-get update -qq > /dev/null 2>&1 && sudo apt-get install -y -qq shellcheck > /dev/null 2>&1
45-
FAILED=0
46-
while IFS= read -r script; do
47-
[[ -z "$script" ]] && continue
48-
echo "Checking: $script"
49-
if ! shellcheck -x -S error "$script"; then
50-
FAILED=1
51-
fi
52-
done <<< "$SCRIPTS"
53-
if [[ $FAILED -eq 1 ]]; then
54-
echo "::error::ShellCheck found errors"
55-
exit 1
56-
fi
57-
echo "All $COUNT scripts passed ShellCheck"
58-
59-
- name: Verify checkpoints
60-
run: |
61-
# Find checkpoints.yaml in skill directories
62-
CHECKPOINT_FILES=$(find . -path './.skill-repo-tools' -prune -o -path './.git' -prune -o \
63-
-name 'checkpoints.yaml' -print | sort)
64-
if [[ -z "$CHECKPOINT_FILES" ]]; then
65-
echo "No checkpoints.yaml found, skipping"
66-
exit 0
67-
fi
68-
# Install yq
69-
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.52.2/yq_linux_amd64 2>/dev/null
70-
sudo chmod +x /usr/local/bin/yq
71-
72-
ERROR_FILE=$(mktemp)
73-
trap 'rm -f "$ERROR_FILE"' EXIT
74-
75-
while IFS= read -r checkpoints_file; do
76-
[[ -z "$checkpoints_file" ]] && continue
77-
echo "=== Processing $checkpoints_file ==="
78-
79-
while read -r checkpoint; do
80-
id=$(echo "$checkpoint" | jq -r '.id')
81-
type=$(echo "$checkpoint" | jq -r '.type')
82-
target=$(echo "$checkpoint" | jq -r '.target')
83-
pattern=$(echo "$checkpoint" | jq -r '.pattern // empty')
84-
severity=$(echo "$checkpoint" | jq -r '.severity')
85-
desc=$(echo "$checkpoint" | jq -r '.desc')
86-
87-
if [[ ! -f "$target" ]]; then
88-
if [[ "$severity" == "error" ]]; then
89-
echo "::error::[$id] $desc (file not found: $target)"
90-
echo "1" > "$ERROR_FILE"
91-
fi
92-
continue
93-
fi
94-
95-
case "$type" in
96-
"file_exists")
97-
if [[ -f "$target" ]]; then
98-
echo "OK: [$id] $desc"
99-
else
100-
echo "::error::[$id] $desc"
101-
[[ "$severity" == "error" ]] && echo "1" > "$ERROR_FILE"
102-
fi
103-
;;
104-
"regex")
105-
if grep -qE "$pattern" "$target" 2>/dev/null; then
106-
echo "OK: [$id] $desc"
107-
else
108-
if [[ "$severity" == "error" ]]; then
109-
echo "::error::[$id] $desc"
110-
echo "1" > "$ERROR_FILE"
111-
else
112-
echo "WARNING: [$id] $desc"
113-
fi
114-
fi
115-
;;
116-
"regex_not")
117-
if grep -qE "$pattern" "$target" 2>/dev/null; then
118-
if [[ "$severity" == "error" ]]; then
119-
echo "::error::[$id] $desc"
120-
grep -nE "$pattern" "$target" | head -3
121-
echo "1" > "$ERROR_FILE"
122-
else
123-
echo "WARNING: [$id] $desc"
124-
fi
125-
else
126-
echo "OK: [$id] $desc"
127-
fi
128-
;;
129-
esac
130-
done < <(yq e '.mechanical[]' "$checkpoints_file" -o=json | jq -c '.')
131-
done <<< "$CHECKPOINT_FILES"
132-
133-
if [[ -s "$ERROR_FILE" ]]; then
134-
echo "::error::Some checkpoints failed"
135-
exit 1
136-
fi
137-
echo "All checkpoints passed"

0 commit comments

Comments
 (0)