Hello,
You can just put your macro RunMacroText("/cast [target=pettarget,harm,nodead][] Claw") in spell name, activate option "Not spell, is lua script" and add "Timer".
Or try this sample (I haven't tested) (I have added lua condition IsPetAttackActive()) (I have set up the "Timer" at 2 secondes): http://pastebin.com/stQ3Hkem