If it works for you then great, but you are really limiting the pipeline of candidates. I'll bet there are 100 great candidates out there who don't even have Github accounts for every one you are seeing.
Me (who has written my share of Y): "Sure, that'll be fine. Y should be installed."
He proceeded to take 30 minutes to not produce anything resembling X or Y. It was agonizing.
But don’t ask me to code on a whiteboard. That’s not a real world scenario.