One of the numerous meanings of good is “competent, skillful, clever at or in a certain action or pursuit.”
‘Good at’ and ‘Good in’ are often used interchangeably, but generally speaking, “good at” is used with an activity:
He’s good at football.
She’s good at product design.
Her mother is good at Trivial Pursuit.
When Fatima was only six, she was good at drawing.
When it comes to school subjects, both “good at” and “good in” are used:
Jere is good at math: he always finishes first.
Jere is good in math: he makes all A’s.
It’s difficult to formulate a rule for “good in.” An actor can be “good in a role.” A level-headed friend is “good in an emergency.”
A similar expression used to indicate competency is “good with”:
Because Daiki is good with numbers, he plans to study accounting.
Maribel is good with children; she wants to be an elementary teacher.
Amos is good with his hands; he remodeled the entire house.
Lilah is good with money; she saves at least 40% of her allowance every week.
Here are some examples of all three expressions as used on the Web:
Michael Phelps: Good at swimming, better at golf
Why are humans and dogs so good at living together?
School shootings: We’re good at finding fault, not so good at finding a solution
Is it true that people who are good at music can learn a language sooner?
Are you good in a crisis?
Are pit bulls good with kids?
Are you good or awful with money?
When it comes to using prepositions in idioms, memorization is often necessary.