Two ways.
You could run your skimmer through a water level switch so it shuts off when the sump level gets too high.
or
You can get a device made specifically for your situation.
This one is from BRS, you could DIY the same thing, but I think you'd end up paying more.
Plug it into the wall, plug the skimmer into it. When it's powered up, it waits X minutes before sending power to the skimmer (or whatever is plugged into it).
One other option is to get a float switch for the skimmer cup (or a skimmer with one built in). It won't stop it from filling up when something goes wrong, but it'll shut the skimmer down when it happens so it doesn't keep going and going and going.