Your first step is to create a sensor based upon dark_sky_cloud_coverage and use that to trigger an automation.
Here are a few older threads which discuss items similar to what you want to do: