Repository navigation
Add optional watch_extension hook to watch.py - #253
Open
Kimovate-git wants to merge 1 commit into
Open
Kimovate-git wants to merge 1 commit into
Kimovate-git wants to merge 1 commit into
Conversation
If a sibling module watch_extension.py exists, __main__ hands control to watch_extension.run(module) instead of main(). Without the module behaviour is unchanged. Lets teams that vendor the skill keep every upstream file byte-identical and put site-local logic into one separate file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
What
Adds a tiny optional hook to
skills/watch/scripts/watch.py:__main__now calls_entry(), which triesimport watch_extensionand, if a siblingwatch_extension.pyexists, returnswatch_extension.run(sys.modules[__name__]). Without that module,_entry()simply returnsmain(), so behaviour is exactly as today. AModuleNotFoundErrorfor any other module is re-raised, so a broken extension can't fail silently.Why
We vendor the
watchskill into a larger video pipeline and add a few site-local things (extra subcommands, report sections, transcription routed through our render scheduler). Until now that meant patchingwatch.py, SKILL.md and friends, and every upstream release turned into a merge conflict — our nightly sync sat in conflict for two weeks after 0.3.x without anyone noticing.With this hook every upstream file can stay byte-identical and all local logic lives in one separate file. Updates from you then apply without conflicts. It's 13 lines, adds no dependency, and changes nothing for anyone who doesn't ship a
watch_extension.py.Testing
watch_extension.py:watch.py --helpand a normal run behave as before (same exit codes).main().Happy to rename the hook/module or move it elsewhere if you prefer a different convention.
🤖 Generated with Claude Code