Sky-only pass with the foreground knocked out?
If you go to "renderlayers -> Passes" You can activate the "environment" pass. This will deliver the background as an RGB value in the compositor. All abjects are now black. This gives you the freedom to combine them as you wish.