How to create metadata curves for my morph targets?

Hi. I’m new to this editor scripting world. I figured out how to get the list of morph targets in a selected skeletal mesh. Now I can’t find a way to create the curve metadata for them. I’m trying to get the morph target names and loop through it adding a curve with the same name for each one.
I found some pieces of the puzzle here and there, but I can’t get it to work together.
Like I said, listing the morph targets was easy, 3 lines of code after days of research LOL.

I think it could be a really useful script, since there’s a lot of repetion in the curve-morph target setup for animations.

edit:
Found how to add curves trough

skeleton.find_curve_identifier(curve_name, curve_type)

The thing is, there’s no curve in my skeleton after that.