Spellcasting skill gains (including Chiv) are based on the difficulty of the spells it casts, not on the opponent it's fighting. If i'm purely going for skill gains in Chiv, Bushido or Ninjitsu, i have my pet attack Gregorio the Brigand as he's disarmed, and discord my pet. Gregorio is immune to pet damage, and does very little damage (especially when disarmed), so you can just sit there and train your pet on him all day with no risk.
For Magery/Necro/Mysticism/SW, pets will cast the spells more often when they're not in melee range. I'll get someone else's pet (or even myself) to tank Gregorio, then i'll tell my pet to attack Gregorio, then quickly tell it to stay. My pet will stand in place and spam spells on Gregorio from a range. The only problem is when trying this with pets that have Magery Mastery or Necromage, they absolutely love to Teleport right next to the target, and so won't stay at range (unless you block them in with bag balls).