Guard analyzing-data Stop hook against missing uv - #248
Draft
Purple-Drain wants to merge 1 commit into
Draft
Conversation
The Stop hook ran `uv run ${CLAUDE_PLUGIN_ROOT}/skills/analyzing-data/scripts/cli.py stop`
directly from plugin.json with no guard. On a machine without `uv` on PATH,
the shell fails before cli.py's own check_uv_installed() helper ever runs,
surfacing a raw "uv: not found" error on every Stop hook invocation instead
of failing gracefully.
Move the command into a co-located hooks/stop.sh script (matching the
skills/airflow/hooks/warm-uvx-cache.sh pattern already used elsewhere in
this repo) that no-ops when uv isn't installed, since there's nothing to
stop if the kernel could never have been started in the first place.
Purple-Drain
marked this pull request as draft
August 10, 2026 06:22
Author
|
@claude thoughts on these? |
Author
|
@copilot pls help resolve and revie wpls |
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
analyzing-dataskill's Stop hook is registered directly inplugin.jsonas:
On a machine where
uvisn't installed / isn't onPATH, the shell fails toexec
uvbeforecli.pyever starts — socli.py's owncheck_uv_installed()helpful-error path never runs. Instead every Stop hookinvocation surfaces a raw, unhelpful error:
This fires on every single turn for any user without
uvonPATH, in bothClaude Code and Cursor (both plugin manifests have the same unguarded
command).
Fix
Move the command into a small co-located
skills/analyzing-data/hooks/stop.shscript — the same pattern already used by
skills/airflow/hooks/warm-uvx-cache.shelsewhere in this repo — that checksfor
uvonPATHand no-ops (exit 0) if it's missing, since a kernel couldnever have been started without
uvin the first place, so there's nothingto stop.
Both
.claude-plugin/plugin.jsonand.cursor-plugin/plugin.jsonnow pointat this script instead of embedding the raw
uv runcommand inline.Testing
Ran the new script directly, both with
uvpresent and withPATHrestricted to simulate
uvmissing:No error output in the missing-
uvcase, clean exit in both.