Repository navigation
Commit ba7bade
plugin-dev: take the agent frontmatter verdict from claude plugin validate
validate-agent.sh no longer decides parse-ability with an awk classifier of
its own. The file is copied into a throwaway plugin and run through
`claude plugin validate --json` (plain-report fallback for Claude Code older
than 2.1.259; exit 2 "not verified" when no claude can run), so the verdict
is the loader's own parser, Bun YAML plus Claude Code's quoting/tab retry,
and the product's message is what the user reads. The script keeps what the
product does not check: an empty, null, numeric or boolean description
(dropped by the project loader; placeholder or digits for a plugin agent),
and the style checks, which now run on the text the plugin loader hands the
model: block scalars with their chomping, plain and quoted scalars folded,
double-quoted escapes decoded, then trimmed. CRLF and BOM files are read the
way the loader reads them instead of being rejected at the first line.
`validate-agent.sh --description <file>` prints that text.
validate-agent.test.sh asserts against the product: 44 description shapes go
through `claude plugin validate` once and the script's verdict must equal the
product's plus the stated policy (44/44); the extracted text must equal the
runtime's on 27 shapes observed in the agent listing of Claude Code 2.1.266
or replayed through Bun 1.4.1 (27/27). Pointed at PR anthropics#89404's script the
corpus check fails on 19 shapes, at the previous version of this script on
20. The suite passes under gawk, mawk and busybox awk.
Co-Authored-By: Claude Fable 5.1 <[email protected]>1 parent e830ff6 commit ba7bade
3 files changed
Lines changed: 815 additions & 257 deletions
File tree
- plugins/plugin-dev/skills/agent-development
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
409 | 415 | | |
410 | 416 | | |
411 | 417 | | |
| |||
0 commit comments