Awareness and defensive riding.
Always assume drivers DO NOT see you; pretend you are invisible.*
Give yourself ample braking distance; anticipate escape routes should obstacles appear.
Don't pull a trailer; just get a bigger mess bag and toss it in.
If there is NO amount of skills that would avoid a situation, "Period.", how can you ask us for skills to handle a situation?
* (an all-black bike makes this feat of the imagination easier)