I've had loaches recover from skinny disease after being treated with levamisole, 3 have not. And thus they were named Mr Skinny 1, 2 and 3 before they died 8) . The other name we have it under in the search is Aviverm.
The rate I use is as follows:
1 ml per 100 litres when the cause is known. 1 ml per 150 litres when the cause is unknown. Usually I do the first one anyway.
leave for 24 hours with no lights.
then gravel vac & 25-40% water change.
do smaller water changes over the next few days.
It's safe to use in the main tank as it's selective, will only kill the worms it's supposed to kill.
If you look in my loach tank thread (see signature) towards the end you will see I recently dosed and the group perked up, but Mr Skinny 3 died. When they get so skinny that their 'rib cage' is fatter than their abdomen and their head looks a little big for the body, then it's likely game over and they will get skinnier and skinnier over a couple of weeks, join with the group less (though still hunting food), until they get unsociable and start resting more than they are moving.... and then goodnight. My last one tried to hide under the wood to die so keep checking to make sure they don't die in an inconvenient place.