Keep off level crossing right by yard (5)
I believe the answer is:
parry
'keep off' is the definition.
(thesaurus)
I don't understand the remainder of the clue.
Can you help me to learn more?
(Other definitions for parry that I've seen before include "Deflect (a blow)" , "Fend off (a blow)" , "Block a blow" , "Turn aside (a blow)" , "Answer evasively; 'Jerusalem' composer" .)