To to stop Skype on iPhone & Mac competing for AirPods' connection?
Go to System Preferences → Bluetooth and for your AirPods choose Options and set ‘Connect to This Mac’ to ‘When Last Connected to This Mac’.

Now your AirPods won't automatically switch away from your iPhone to your Mac. Make the equivalent change on your iPhone to stop the other way round.
Then your AirPods will always connect to the last device and you can manually select your AirPods from the Bluetooth or Sound menu to connect them to your desired device.