hmm ok I could make you a quick Sequence chart.
So a skill is usually : clif -> unit -> skill -> skill(recursive?) -> status? -> battle -> (sometime again skill...)
Ok so status doesn't have a skilllv attribute, but it's usually assign on val1, to look that let retrace pneuma from skill.
skill_castend_pos2 => ok put an unit for pneuma (something on the ground) => UNT_PNEUMA in our case then depend on skill_unit_db config
...unit will be active when someone step on it...
skill_unit_onplace => case UNT_PNEUMA: //when someone step in UNT_PNEUMA and match the condition (like enemy all etc, on place is only on enter)
==> sc_start4(bl, type, 100, sg->skill_lv, sg->group_id, sg->src_id, 0, sg->limit); //type here is the status we wanna launch it's SC_PNEUMA calculate from skillid
So since we started our status you can see SC_PNEUMA->val1 = sg->skill_lv, SC_PNEUMA->val2 = sg->group_id and val3 = sg->src_id.
On battle.c we usually deal with status, and active skill, like on our case it's
if(skill is ranged and target as pneuma) block atk; // so you just have to do SC_PNEUMA->val1 to know what was the skilllvl of pneuma when it was casted.
nb : now thinking about it, ending the status won't end the unit, so you'll have to do something about it.
about unit_id2 finally may won't be a perfet id, since it's used when the unit is active so dunno, but on the same way you could just replace another unit when this one is almost done.