When you clone a project, it fetches the repo along with .git
directory in which the hooks reside, right? So I think you're spot on with the last sentence -
trying to use the wrong tool for the job
Per docs there are quite a few hooks, but I don't see any that would be easier than running an external script.
I am but a beginner though, so take my advice with a grain of salt :)