fix: drop commandWindows from hooks.json for Claude.ai marketplace validation (#593)#601
Open
prayag0one4 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Removes the unsupported commandWindows field from the Claude/Codex hooks config so the Claude.ai plugin marketplace validator accepts the plugin, and updates the Windows regression tests to enforce the new schema constraint.
Changes:
- Drop
commandWindowsfromhooks/claude-codex-hooks.json(marketplace-schema compatibility). - Update
tests/hooks-windows.test.jsto assertcommandWindowsis absent and simplify the “script ships in hooks/” check to only validatecommand.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| hooks/claude-codex-hooks.json | Removes commandWindows from hook entries to satisfy marketplace validator schema. |
| tests/hooks-windows.test.js | Adds a marketplace validation guard for commandWindows and adjusts Windows hook command assertions accordingly. |
| // via PowerShell, so the shared `command` field must be cross-platform (plain | ||
| // `node`, no bash-only syntax). commandWindows is not part of the supported | ||
| // hooks schema on the Claude.ai plugin marketplace validator, so it is omitted | ||
| // — {{CLAUDE_PLUGIN_ROOT}} expansion and `node` work everywhere. |
| // already runs cross-platform (Claude Code expands ${CLAUDE_PLUGIN_ROOT} | ||
| // before the shell sees it, and VS Code Copilot ignores commandWindows and | ||
| // runs `command` through PowerShell on Windows anyway), it is omitted. | ||
| test('hooks.json has no unrecognized fields for marketplace validation (#593)', () => { |
Comment on lines
+42
to
44
| for (const hook of commandHooks()) { | ||
| assert.equal(hook.commandWindows, undefined, `hook must not use commandWindows (not supported by marketplace validator): ${hook.command}`); | ||
| } |
…lidation (DietrichGebert#593) commandWindows is not part of the supported hooks schema for the Claude.ai plugin marketplace validator, which rejects it as an unknown field. The shared `command` field already runs cross-platform: Claude Code expands ${CLAUDE_PLUGIN_ROOT} before the shell sees it, VS Code Copilot ignores commandWindows and runs `command` through PowerShell on Windows, and `node` is natively available in both bash and PowerShell. Update the regression test to assert commandWindows is absent and remove the now-unused CMD_VAR_SYNTAX guard. Fix comment placeholder syntax ({{CLAUDE_PLUGIN_ROOT}} → ${CLAUDE_PLUGIN_ROOT}) and narrow test name.
prayag0one4
force-pushed
the
fix/drop-commandwindows-marketplace-593
branch
from
July 16, 2026 01:21
27a35c9 to
2909eb0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Claude.ai plugin marketplace validator rejects
claude-codex-hooks.jsonbecausecommandWindowsis not a recognized field in the supported hooks schema. Installation from the marketplace fails with:Root Cause
The
commandWindowsfield is redundant. The sharedcommandfield already runs cross-platform:${CLAUDE_PLUGIN_ROOT}before the shell sees itcommandWindowsand runscommandthrough PowerShell on Windowsnodeis natively available in both bash and PowerShellFix
Remove all three
commandWindowsfields fromclaude-codex-hooks.json. Update the regression test to assertcommandWindowsis absent (marketplace validation guard) and remove the now-unusedCMD_VAR_SYNTAXguard.Verification
All 6 hooks-windows tests pass, including the new marketplace validation check. The
commandfield remains cross-platform —noderuns natively on both bash and PowerShell, andexec-free is already enforced by existing tests.Closes #593