Attack and king safety
Can I castle into that attack?
Before castling, count the opponent’s moves to the first useful entry or check on each wing. A legal castle is not necessarily a safe one.
Worked example
Position in text
White to move. White: pawn a2, pawn b2, pawn c2, pawn d2, pawn e2, pawn f2, rook a1, king e1, rook h1. Black: king e8, rook h8, bishop d5.
FEN: 4k2r/8/8/3b4/8/8/PPPPPP2/R3K2R w KQ - 0 1
Both castles are legal here. After 1.O-O, Black can play 1...Rh1# in a single move. The bishop on d5 guards h1 through e4, f3 and g2, so the king cannot take that rook. After 1.O-O-O, 1...Rxh1 attacks the other white rook on d1 but does not check the king on c1. The a-, b- and c-pawns make the queenside slower to breach. Even long castling is not automatically best: the capture on h1 is a material threat that White still has to assess.
A plausible mistake
Counting three shelter pawns without checking the open lines can mislead you, especially when the opponent’s rook is already lined up and its entry square is guarded.
Try it yourself
Position in text
White to move. White: pawn a2, pawn b2, pawn c2, pawn d2, pawn e2, pawn f2, rook a1, king e1, rook h1. Black: rook a8, king e8, bishop e5.
FEN: r3k3/8/8/4b3/8/8/PPPPPP2/R3K2R w KQ - 0 1
In the second position Black’s rook is on a8 and its bishop is on e5. Does ...Ra1 give an immediate check after White castles long? Check the path rather than guessing from which side the rook starts.
Check your answer
No. The white pawn on a2 stops the rook getting to a1. By contrast the first board’s h-file was completely open after White castled short. Here compare what moves can actually remove a2 and whether the bishop can join; there is no one-move ...Ra1+.