Over the last few months I've tinkered with some command-line scripts that fix my bad habit of writing one-off Bash functions, not doing anything to keep them around, and then regretting the loss. The README explains the essentials, but for more context (and the full "behind-the-scenes" of why I did this) I also did a blog write-up:
https://zahlman.github.io/posts/meta-automation/ . Overall it seems like way more framing effort than a few dozen lines of Bash really deserve; but it was fun and I've found all of it surprisingly useful.