To keep it simple and safe only do this in those questionable scenarios and as mentioned, have an alternate anchor point.
Use a basic lanyard with friction hitch. Make sure there is no stopper knot or spliced eye at the tail end, things go wrong just pull the friction hitch towards you and...