On the ability side of things,
A simple way to direct counter a unit type (such as only ground or air units) without triggers would be using Cloud (Human Ability), and switching the targets accordingly. This ability can silence, prevent attacks and/or reduce movement. This ability is channeled tho, but you could make a simple dummy caster effect.
A modified Drunken Haze (Neutral Hero Ability) can still be used as a direct counter ability, as it allows you to disable attacks (ranged or melee), silence, slow attack and/or slow movement. It also has a possible area of effect. Soul Burn also comes to mind (this one can reduce attack damage, deal damage over time and/or reduce movement), and obviously Cripple, Doom and Purge (but those are boring).
You can make a modified command or devotion aura that passively decreases attack/defense (by pressing the SHIFT key while modifying a given editor value) that targets only air units for instance. A modified Roar ability can also do this effect in the active side of things.
You can modify Phoenix Fire (Human Ability, this one permanently and passively shots missiles at nearby targets every "Cooldown" seconds), so it targets only air units, ie. an advanced gyrocopter that continiously shots its flak cannons (these deal spell damage) to air units.
Fan of Knives also achieves this easy customizable spread missile effect, and can also only target air units if you modify it.
And, as a personal idea that might not even be related too much to your post, you could make an ability that summons, lets say an immobile and perishable tower (but could be anything, for example a great magic ball that shots magic missiles) at the target point that attacks air units, but which attack type is different from the attack type of the caster. Such ability can be achieved by modifying the Healing Ward (Orc Ability, basically allows you to summon a unit in a target point, instead of the classic instant effect) and creating the desired summoned unit.