Making an enemy only able to use a skill on actors with a certain state?

Hi! I'm fairly new to making games with RPGMaker, and I was hoping to find some help on here. What I'm trying to do is make an enemy use one skill (Grab) to inflict the state "Grabbed" onto an actor in the party. The next turn, they will use the skill "Knife Plunge" with a 100% chance, and then the party member loses the "Grabbed" status (Not due to the attack, it just wears off after 1 turn)

Could anyone help me go about this? I'm unsure if I should be trying to mess around with the Formula box, or making a new Skill Type, or using common events. It's all quite difficult for me to wrap my head around. I'm using Yanfly Core and Battle Engine. RPGMaker VX Ace is the version I'm using.

Can provide more details if necessary.
Could you clarify something.

You say "The next turn, they will use the skill "Knife Plunge" with a 100% chance,". Do you mean that they are obliged to use the skill Knife Plunge (unlikely, but saying "will use" implies that) or that they can use Knife Plunge and it will have this effect?

If you just mean that they can use it, then you can do this in the damage formula box of the skill which inflicts Knife Plunge.

For the sake of example, the state ids are as follows:
Grab = state id 48
Knife Plunge = state id 49

Code:
if b.state?(48);b.add_state(49); end; a.atk * 4 - b.def * 2

What this does is check if the target has the state Grab. If, and only if, that state is present it then adds Knife Plunge. It then does damage in the normal way.

All you need to do is to replace 48 and 49 with your own state ids and put in whatever you are using instead of a.atk * 4 - b.def * 2

The thing to note is that this will give Knife Plunge only to someone who has Grab. Is that what you want?

Original thread: https://forums.rpgmakerweb.com/threads/making-an-enemy-only-able-to-use-a-skill-on-actors-with-a-certain-state.138495/