It is well known that the constructions of space-filling curves depend on certain substitution rules. For a given self-similar set, finding such rules is somehow mysterious, and it is the main concern of the present paper. Our first idea is to introduce the notion of skeleton for a self-similar set. Then, from a skeleton, we construct several graphs, define edge-to-trail substitution rules, and explore conditions ensuring the rules lead to space-filling curves. Thirdly, we summarize the classical constructions of the space-filling curves into two classes: the traveling-trail class and the posi...