% sudo xcode-select --switch /Library/Developer/CommandLineTools
% xcodebuild --version
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
% skip doctor
[✗] Xcode version: error executing xcodebuild (install from: https://developer.apple.com/xcode/)
skip doctor should suggest running xcode-select in this case.
Note that installing Homebrew automatically installs and selects /Library/Developer/CommandLineTools.