Canceling a action with a skill effect

Hello there, I was wondering if anyone knew how to do this since I'm having trouble figuring this out. I'm using Yanfly's CTB system and like it says in the title I want to make a skill that cancels out an upcoming action and makes the target of said skill to a completely different action their next turn.

For example, say there's an enemy casting a spell that takes a turn to cast, you use the skill in question and the caster will stop casting the spell, and on their next turn will simply attack instead. I think I could do it with action sequences, but I'm not very good with javascript so any help with this is well appreciated, thank you in advance

Original thread: https://forums.rpgmakerweb.com/threads/canceling-a-action-with-a-skill-effect.128767/