Learning to maintain your guard consistently is a big confidence booster. If someone cannot pass your guard, then you are left with the options of you being able to sweep or submit. Just like all of the other techniques we study the goal is to execute them purposefully and precisely. Drill these with a partner, first each technique in isolation and then randomly. That will help you execute the correct technique and the correct time.
The first recovery technique is pretty simple so I just touch on it lightly. Then I cover how to pass in a manner that minimizes the chances of that guard recovery happening. The follow up guard recovery technique is a slightly more advanced version of the first technique. It takes a fair amount of timing and planning ahead on the part of the guard player.
All of the elements of maintaining your guard are included in this drill. Two of the main elements of this drill, hip mobility and leg dexterity, are essential to a good guard. Getting this drill down solid will give you much more confidence in your ability to maintain your guard. The longer you can maintain your guard, the more you can work from your guard. The more you work from your guard, the better it will get.