Adduction and Abduction are related to the midline of the hand (but first anatomic presentation- palm facing up/forward you get it) Thus adduction is towards midline of the palm- think trying to bring thumb to the palm. Abduction is away - direct opposite. Opponens- is not about bringing to the midline (that is - its not about touching palm)- opponens is about thumb touching your fingers- enables your hand to cup. Hence why having 'opposing' thumbs is so important- grip.
flexion and extension are a bit tricky. since they're not ab or adduction they can't be about the midline or the palms. Instead, think of reducing the angle between the fingers and thumb along the lateral aspect of your hand. flexion would decrease this and extension would make that angle wider. This is a crude way to look at it- but its easier this way for me.