You have to add in code to the CR to do this. With the current CR setup, there's no way to allow for dynamic conditions to control how a skill slot get's used (that's a lot more complicated setup), so in order to make the CR use a skill slot under a really specific condition, you'll have to add it in yourself.
IsTargetable is the property of a NetworkObject that tells you if an object is targetable, but you'll still have to make sure he's attackable (Reaction == Reaction.Enemy).
Instead, you can just do a check for IsActive when you have a Monster object (as opposed to a NetworkObject) and if that returns true, you're desired conditions are met.
So your code would be roughly like:
Code:
var dom = LokiPoe.ObjectManager.GetObjectByName<Monster>("Dominus, High Templar");
if(dom != null && dom.IsActive)
{
var skill = LokiPoe.InGameState.SkillBarPanel.Slot(yourVaalSkillGemSlot);
if(skill.CanUse())
{
// check distance from him, if it's within range, you'd cast the skill based on the slot
var err = LokiPoe.InGameState.SkillBarPanel.UseOn(8, false, yourVaalSkillGemSlot);
if(err == LokiPoe.InGameState.UseError.None)
{
// depending on the skill you might want to delay after the cast.
return true;
}
}
}
You'd want to check the distance from him before casting and either move towards him or not do anything. That's not shown, but you can check the CR or the DominusFight plugin for examples of moving towards mobs.
As to where you'd put it, you would want to handle it most likely before the generic skill use logic, so after the logic for Cold Snap, and before the aoe/melee stuff.
You'll have to code in additional logic to not use the skill again if it's usable and you only want to cast it once, and other things like that. That's the general idea behind what you are asking though.