Here is an optional rule for GURPS for when a skill or attribute check fails, but there is some other skill or ability you can use to try to salvage the situation.
Bailing Yourself Out - Secondary Skill Checks
Whenever you fail a skill or attribute check, if the GM finds it plausible that another skill can help you out, you may roll against that skill or attribute to try to snatch success from the jaws of failure. However, you suffer a penalty equal to the amount you failed the first roll by - plus any normal penalties for the skill or stat in that situation. On a critical failure, you do not get a secondary skill check. This does not apply in any way to combat skill rolls, Active Defenses, Resistance rolls, or Fright Checks. If the GM doesn't agree a secondary skill roll makes sense, a failure is just a failure! If the secondary skill check fails, you may not try a tertiary check to get out of that failure.
Optional Rule: Critical Bail-Outs. On a critical failure, you can still try a secondary skill check. The penalty is equal to double the margin of failure, with a minimum of a -10. If you're good enough, you might manage to pull it off . . . but you might make it worse.
Example: Raggi is climbing down a rope with his effective skill of Climbing-14. However, he rolls a 17 and fails, causing him to fall. The GM rules Raggi can snag the rope with a desperate grab and try to hold on with sheer brute strength - a DX roll for the grab. He has DX 12, and needs a 9 or less to succeed. He rolls an 8, and just manages to grab on. Whew!
Example: Vryce is trying to sneak past some flail-armed stone golem guardians. He has Stealth-14, but is at Medium Encumbrance (-2 to his Stealth). He rolls a 15, failing his Stealth roll. Vryce's player argues that he probably made some noise and he'll hold his breath and hold himself still to avoid being heard further, hoping to get a HT or Will check. However, the GM doesn't buy it, and Vryce's clumsy "sneaking" is clearly visible and audible. Good thing he has Two-Handed Sword-26, he'll need it.
I like the idea of enshrining a secondary roll as an option, and building in the margin-of-failure as the specific modifier for the bail-out roll. It works well with situations that have multiple angles of approach, such as social skill rolls (Fail your Intimidation, so try some penalized Diplomacy, instead) or physical skills (your Per-based Survival fails, so try IQ to recognize the quicksand before you step in it or DX to pull back fast enough). It makes less sense in second-to-second resolution, which is why it's explicitly forbidden in combat.
I'd also note that making this an explicit option gives the players a good tool, too. Instead of feeling like a skill or attribute check is pass/fail, players know they can try to visualize, explain, and justify a secondary check. That keeps you right in the action even as the dice say "No, you didn't pull it off." Think of a plausible option and go for that.
You can probably use this in non-GURPS systems, too - although with percentage-based thief options, margin of failure should probably be a fraction of the margin of failure. Or for games like Rolemaster or FASERIP, shift the difficulty level or shift the results down a color block when you fail.