I've been using the same pattern for every system I run
1) player describes thier goal and how they attempt to achieve it. In the case of avoiding detection details matter but only to the extent of understanding the spirit of the choice. No <actions> or dice are needed.
2) i determine how possible it it for them to be detected based on all the relevant factors. How alert is the NPC, how well can they perceive in the environment, what things could possibly give the PC(s) away, how focused is the NPC, and so on. Looks like a lot but 2-3 key words cover it.
3) if there is a chance for the NPC to detect the PC(s) then i ask how they react to becoming slightly aware there might be something amiss. This could mean they do nothing, hold their breath,quicky move out of line of sight before a light source exposes them, or about anything else they can think of as long as it has sound base if working.
4) player makes an ability check to see if they stay hidden. Important point here here is a failure doesn't automatically mean the NPCs is aware what they detected only they are confident they sensed something.
5) resolve and repeat as necessary.
In combat it doesn't work all that different then printed in the phb besides i add a note regarding coming out of concealment to attack and using common sense on if the target could reasonably detect them before they attack. The NPCs last action would determine this. Back turned dealing with a different threat? Passive check. Purposely waiting for them to pop out? Auto success. Hectic melee? Make an ability check vs stealth roll.
About the only change is turning the hidden tag into obscured when dealing with combat. That way players can see differences between being undetected and not currently pinpointed.