Yeah is a bit more complex to do because Blessing and Agi have some special rules like you can offensively cast them too.
Usually Blessing and Agi end up here:
clif_skill_nodamage(src,bl,skill_id,skill_lv,
sc_start(src,bl,type,100,skill_lv,skill_get_time(skill_id,skill_lv)));
break;
But that is used for all other status change skills too, so you need to split them away from that.
And do an implementation that looks a bit more like the code you quoted above.
if( sd )
party_foreachsamemap(skill_area_sub, sd, skill_get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill_castend_nodamage_id);
But this code should only be called when having link status, so something like:
struct status_change* sc = status_get_sc(src);
if(sd && sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_PRIEST)
With that info you should be able to code it together yourself.