validate-agent.sh exits 1 on plugin-dev's own agent files and aborts at the first warning
plugin-dev/skills/agent-development/scripts/validate-agent.sh exits 1 on agent files shipped in this repository, and stops after its first warning so roughly half the script never runs.
Reproduction
Run it against plugin-dev's own agent:
$ bash plugin-dev/skills/agent-development/scripts/validate-agent.sh plugin-dev/agents/plugin-validator.md
✅ File exists
✅ Starts with frontmatter
✅ Frontmatter properly closed
Checking required fields...
✅ name: plugin-validator
✅ description: 1 characters
⚠️ description too short (minimum 10 characters recommended)
$ echo $?
1
Two separate defects
1. A YAML block scalar is misread as a one-character description.
Line 91:
DESCRIPTION=$(echo "$FRONTMATTER" | grep '^description:' | sed 's/description: *//')
plugin-validator.md uses description: | followed by an indented block. grep plus sed returns the literal |, so the length is 1. There is no YAML parser in the script (grep -c "yq\|python\|js-yaml" returns 0), so any multi-line description is misread the same way.
2. The script aborts at its first warning.
Line 5 sets set -euo pipefail. Line 102 is ((warning_count++)) with warning_count=0 from line 56. ((0++)) evaluates to 0, which is a failing exit status, so set -e terminates the script. The run above stops immediately after the warning, and lines 103 to 217 (the model, color and tools checks) never execute.
The same pattern appears at lines 86, 105, 111, 117, 136, 156, 186 and 192, so the abort triggers on whichever warning fires first.
Suggested fix
For 1, parse the frontmatter with a real YAML parser, or handle | and > block scalars explicitly.
For 2, use a form whose exit status is not the pre-increment value:
warning_count=$((warning_count + 1))
or ((warning_count++)) || true.
Environment: Claude Code 2.1.219, Windows 11, Git Bash 5.2.26, Node 24.14.1.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗