I also have some other specific uses off a given -roll- rather than before the attempt has been made.
"Yes, but" is -amazing- for a failed skill check/attack roll/etc in a high stakes situation or a moment where the player is doing something importantly dramatic and rolls poorly. I let them succeed in the moment but it results in additional complications. "Yes you stabbed the doppelganger pretending to be the king. But the Princess opened the door at just the right moment to see you doing it and calls the guard in a blind panic!"
"No, but" is also good in that kind of situation where the player -nearly- succeeds but misses by a few points. I've had BBEGs survive encounters but allowed the players to inflict disfiguring injuries to the face with the intent of both reinforcing the drama and making them feel like they accomplished something even if it wasn't the goal since by doing it they've created a recurring trait and made the BBEG even more recognizable.
And finally "No, and" is a -fantastic- learning tool. Because it's "No, you didn't succeed at the ridiculous thing you tried, but you've also put yourself into an even worse position than before." I have used "No, and" to incredible success with "Rule of Cool" players who climb to the top of a 60ft tower while the rest of the party is struggling to survive an encounter, then dive off to attack the BBEG with a Sephiroth-style strike. Not only did you roll badly enough to not hit, you also take falling damage, and you're prone in front of the BBEG. "But the rule of cool!" doesn't mean you get to do whatever you want with no consequences, Kyle, pick yourself up and work with your party rather than trying to find a cheeky one-shot with no risks.