Migration tool for legacy index templates to composable?

We have a large number of legacy index templates. Is there any migration tools to move them to their composable index template version? If not, what is the best way of migrating them?

There was no answer here or any other of our sources so I ended up writing a custom utility to read the existing templates and create a new composable out of it.