Repository navigation
Add an opt-in Stop hook for nextflow lint - #14
Open
edmundmiller wants to merge 1 commit into
Open
edmundmiller wants to merge 1 commit into
edmundmiller wants to merge 1 commit into
Conversation
Register a Claude Code Stop hook that lints uncommitted .nf and .config files once when a turn finishes. It stays idle unless NEXTFLOW_LINT_HOOK=1 or .claude/nextflow-lint-hook is present, so install does not lint on each edit. Co-authored-by: Edmund Miller <edmundmiller@users.noreply.github.com>
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.
Summary
Adds a Claude Code Stop hook that runs
nextflow lintonce, after the agent finishes a turn, on uncommitted.nfand.configfiles.This is the small version of the lint hooks from nextflow-io/agent-skills #5 and #10. Those ran on every Write/Edit (
PostToolUse), which linted half-finished files and started a JVM per edit. A Stop hook sees the working tree after the turn's edits are done, and it runs one lint for the whole set of changed files.The hook is registered in
hooks/hooks.json(the file Claude Code loads for a plugin) and stays idle until someone opts in:mkdir -p .claude && touch .claude/nextflow-lint-hookNEXTFLOW_LINT_HOOK=1Until then it exits immediately and does not call Nextflow. It also skips when
nextflowis missing, when the tree has no uncommitted.nfor.configfiles, and when a stop hook has already continued the turn (so a lint failure is reported once).Plugin version is unchanged. No language-server or
.lsp.jsonchanges.Test plan
python3 -I tools/check_sources.py(114 files, 0 errors)python3 -I tools/test_consolidate_skills.pyclaude plugin validate --stricton the marketplace and plugin manifests (Claude Code 2.1.295)claude plugin installreportsHooks (1) Stopplus the existing 28 skills and the seqera MCP servernextflowuncalled;NEXTFLOW_LINT_HOOK=1and a.claude/nextflow-lint-hookfile both enable it; lint failure exits 2 with the report on stderr;stop_hook_active: trueskips; missingnextflowand a non-git directory exit 0; a clean tree exits 0; quoted paths with spaces are passed through and deleted files are not