Skeleton is a new notion designed for constructing space-filling curves of self-similar sets. In a previous paper by Dai and the authors [Space-filling curves of self-similar sets (II): Edge-to-trail substitution rule, Nonlinearity 32(5) (2019) 1772–1809] it was shown that for all the connected self-similar sets with a skeleton satisfying the open set condition, space-filling curves can be constructed. In this paper, we give a criterion of existence of skeletons by using the so-called neighbor graph of a self-similar set. In particular, we show that a connected self-similar set satisfying the finite-type condition always possesses skeletons: an algorithm is obtained here.