Prefixing these utility scripts is a nice tip, I used to do that as well.
Some time ago I found sd [1] though. It's a light wrapper around your own scripts which provides namespaces, autocompletion, custom help texts + some other QoL enhancements around that. It improves discoverability and usability a lot, very happy with it.
Prefixing your scripts is an awesome tips. A colleague told me he prefixed all his commands with ',' and I've started to do the same. '_' might clash with 'hidden'(?) shell expansions etc.
Sadly git doesn't allow for aliases with an comma-prefix, so all git aliases starts with a dot.
Nushell has a SQLite history mode which captures more metadata than is typical. I haven't looked into extending it, but it seems like a good setup for adding enough so that some of these cognitive requirements could be recovered from history rather than thought of up front.
Like if I tend to go down the wrong path, fix it, and then go down the right path, maybe that's a pattern that can be identified and then when I search history it finds two or three commands which together set me on the right path in the first place.
I mean, thinking ahead is always gonna be better, but I don't always.
I do a lot of literate coding for shell work, using org-mode. I have param substitution, command chaining, textual explanation and saved output from the last time commands were run. I can save the .org files for reference, or add them directly to my blog.
When a command has some cognitive requirements I create a script with some ${1:-default} values and I store them all in $PATH enabled local/bin
All my scripts start with __ and then some capital letters indicating the topic.
I can copy them to new machines, which is something I would not do with my history.