Do you win the boss while keeping your health above 80%? If so, it's probably a bug.
The skeleton is designed to be unwinnable, so there's no way.