Sorry to say he is probably dying. How long have you had him? Too fast acclimation can be a problem with them. They are also very sensative to water quality changes.
Shedding spines is not a good sign. All you can really do is keep excellent water quality for him and hope.
Sorry