IMO you're better off just asking Aider to write one tailored to your specific use cases. Anonymizing the code so that I could post this gist is actually the first time I've read most of it, and it's really bad code. But in case none of that deters you, here you go: https://gist.github.com/dgunay/4a07db199ca154614c2193718da60...