pf2e.fyi
From Pathfinder Impossible Magic, which isn't enabled.

Countercharm

FEAT 8
Activity reaction
Archetype Captivator

Trigger A creature Casts a Spell with the illusion or mental trait.
Requirements You must have a non-cantrip innate captivator spell with the same trait.

Your charms and illusions are so dominant that you can use them to counteract similar magic cast by others. When a foe casts a spell with the illusion or mental trait and you can see its manifestations, you can use your own innate magic to disrupt it. You lose an innate, non-cantrip spell with the same trait as the triggering spell as if you had cast the spell. You then attempt to counteract the triggering spell.

Pathfinder Impossible MagicORC