In my previous post, " Writing hook scripts without stepping on macOS traps ", I covered the basics of writing hooks. This time, the topic is speed. A UserPromptSubmit hook runs synchronously on every single prompt.
Source: [Dev.to](https://dev.to/bokuwalily/speeding-up-a-userpromptsubmit-hook-with-a-60-second-cache-designing-costguardsh-1ffp)