actually it depends on 2 stats on the pet. The spirit stat of the pet and the growth rate of the pet. This fact has already been tested out.

The higher the spirit and the higher the growth rate will enable the pet to unlock the skill slots at an an earlier level. For example I have one pet who is lvl 35 and already has 4 skill slots open, while I also have another pet at the same level that only has 2. Hope that helps!