How do Claude Skills work under the hood?

Hi everyone. I’m curios about the implementation of the Claude Skills. Specifically, how the system retrieves and activates the right skill at the right time.

Does anyone have insight into how that mechanism works under the hood?