Like the base spell, this can be cast on either the spell/ability's area-of-effect (AoE) or the user/caster.
Healing effect is a flat rate 20% of the companion's maximum health, regardless of how much damage it deals. It only works when cast on the spell's AoE itself and allies within Dispel Magic's 5m AoE. Casting on the caster only dispels it (and deals spirit damage).
Damage effect works on both beneficial spells such as a Commander's healing aura and hostile AoEs, and on either the beneficiary or the caster; casting on the beneficiary(-ies) damages them, provided they are in the field. Casting on either user or beneficiary dispels it, but only enemies within Dispel Magic's AoE will suffer spirit damage. Enemies immune to spirit damage on Nightmare difficulty (i.e. Desire demons, blood mages, Arcane Horrors) do not suffer any damage.
Does not dispel or restore health from allied NPC's friendly fire spells on Nightmare difficulty, like Gascard DuPuis or the blood mage allies in Elves at Large, only "hostile" spells. Likewise, it neither dispels allied Commander auras nor damages allied NPCs benefiting from them.
For best results, enemy AoEs must be allowed to persist for a couple of seconds before the effects properly trigger (particularly the healing effect). On Nightmare difficulty this means allowing a hostile AoE to deal far more damage than this upgrade could ever heal, save perhaps when resisting it with an elemental armor rune. The cue to look for is a persistent elemental effect ticking damage (for blood magic it's the companion's model getting shaded black).