feat: add PostToolUse hook to auto-validate marketplace.json on edit

When marketplace-dev is installed, any Write/Edit to a marketplace.json
automatically runs `claude plugin validate` and reports pass/fail.
Users get instant feedback without remembering to validate manually.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
daymade
2026-04-06 08:59:45 +08:00
parent 1ff1499633
commit c120cd415e
2 changed files with 46 additions and 1 deletions

View File

@@ -960,7 +960,20 @@
],
"skills": [
"./marketplace-dev"
]
],
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/post_edit_validate.sh"
}
]
}
]
}
}
]
}