Create a cask in your local casks folder and then just copy it over to a git fork to actually commit it to homebrew-casks repository.
brew tap nrlquaker/createzap
brew create --cask hello-world
cd "$(brew --repo homebrew/cask)"
# e.g. /opt/homebrew/Library/Taps/homebrew/homebrew-cask
You can use Nano if you want or your own IDE or whatever.
brew edit --cask hello-world
brew style --fix hello-world
brew audit --new --online --cask hello-world
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask
brew createzap hello-world
brew uninstall --cask --zap hello-world
When I check this last, even if you add the Zap stanza before uninstalling it's not actually going to use it so you have to repeat the steps to install it etc and uninstall it to test the zap up stanza has worked.
Copy your file over to your local fork and then Create a branch and push and create a pull request