I wouldn’t use the aura skill checker to check for this. It checks for nearby units to see if one of them has a skill you’re looking for. You want to check for an ability bit for nearby units.
You can compile C code to insertable assembly with here. I just wrote it that way because it was quick. For code this small, though, I’d recommend writing in assembly.