Over the course of my PhD, I've had the pleasure of being a TA for many courses under many different profs, all were great experiences. I learned a lot, did a lot of good work with the other TAs and helped the students a ton.
Currently however, the professor I am a TA for is an absolute menace to deal with, especially over email. He will give me vague instructions on what to do. If I do what I think he wants, he will rudely ask if I ever bothered to read his emails. If I ask him for clarification, he also rudely asks if I bothered to read his emails (even though the emails have nothing to do with my question). If I say nothing, then he tells me I am not responsive and need to communicate more and ask more questions if I'm confused. At one point, I asked him about a problem that students had with an assignment, and he told me not to bother with anything anymore and that he would just do everything himself (implying that my question had annoyed him to the point of giving up on me trying to help him as his TA). He just seems impossible to work with. No matter what I do, he will complain about something.
He has a very bad review on RateMyProf, and from what I heard from his former PhD students, he was a nightmare and they were treading on thin ice because they didn't want to lose funding. Fortunately this TA position is only a semester long, and even if he ends up giving me poor feedback, I just want to be able to tell myself I did my best at doing my job, even if he does not think so. So I'd like to ask for general advice on dealing with such people, especially when they're professors.