Skew hook formula for $d$-complete posets