Converting a cluster to skin cluster in maya


I have just recently started to understand a bit about Maya python API so I was trying to create a soft cluster like tool, referring to online tutorials I managed to create a function that creates a soft cluster but how to convert a selected cluster to skin cluster? Any kind of help is deeply appreciated