config-audit/tests/fixtures/plugin-skills-array/.claude-plugin/plugin.json
Kjell Tore Guttormsen 76d5eda101 feat(plh): validate plugin.json skills:-array entries (CA-PLH-016)
PLH now validates each entry of a plugin.json `skills` field (string|array):
every entry must resolve to an existing directory inside the plugin root.
One finding per bad entry (medium, plugin-hygiene), problem ∈ {non-string,
escapes-root, not-found, not-a-directory}. Mirrors `claude plugin validate`.
String|array normalized so a non-string top-level value is caught too.

Verifiseringsplikt: the plan's "CC suggests the parent directory" error text
is NOT in the primary docs — dropped. Only the four primary-source-verified
conditions are asserted (escape backed by the path-traversal rule).

Tests +3 (941->944). Scanner count unchanged (13). --json/--raw byte-stable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ter3E2JSi1Khgmuf2kady8
2026-06-19 21:56:57 +02:00

6 lines
225 B
JSON

{
"name": "skills-array-plugin",
"description": "Fixture: plugin.json skills: array entry validation (CA-PLH-016)",
"version": "1.0.0",
"skills": ["./valid-skill/", "./a-file.md", "./missing-dir/", "../escape", 42]
}