  Spin and parity dependent nuclear level densities (NLDs) are obtained for
configuration interaction shell model using a numerically efficient spectral
distribution method. The calculations are performed for $^{24}$Na,
$^{25,26,27}$Mg nuclei using full $sd$-$pf$ model space that incorporates the
cross-shell excitations from $sd$ to $pf$-shell. The NLDs so obtained are then
employed to determine the s-wave neutron resonance spacing (D$_0$) which is one
of the crucial inputs for the predictions of astrophysical reaction rates.
Though the considered nuclei are not neutron-rich, the contributions from
cross-shell excitations to $pf$-shell are indispensable to explain the
experimental data for D$_0$ which otherwise are significantly overestimated.
