We propose in this paper a novel approach for the automatic detection of sulcal lines on cortical surfaces as the skeleton of sulcal regions. As a first step, we partition a cortical surface into sulcal and gyral regions by using graph cuts to guarantee a global minimum for an associated variational optimization problem. The Hamilton-Jacobi skeleton method is then extended to subsets of triangular meshes using geodesic distance transforms obtained with the fast marching algorithm on triangular meshes. By decomposing the resulting skeleton into branches, we also develop an alternative approach to measure the complexity of the gyrification pattern of the cortex. In our experiments, we apply our method to a group of 40 healthy controls and 42 subjects with Williams syndrome. We report statistically significant group differences that validate previous findings of an increase in cortical complexity in Williams syndrome.