A way to know which skill an enemy will use?

I'm looking for a way in game, through a script or plug in to let me know what skill an enemy has selected for use. I know I can manipulate weights of skills to make them more or less likely. However, I want to know exactly what skill will be used and use that in a conditional branch later.

Basically, if a monster chooses to use "fire breath" I want to take that variable and check, IF monster is going to do "fire breath" do this, ELSE do that. I need to know this information before the enemy even attacks.
An enemy's selected action should be stored in enemy._actions[0]

Note that returns a Game_Action, so if you need to look at the ID or name of that skill you'll have to go from there; also, you'll need a reference to the specific enemy in the first place.

But that all depends on where and how you're doing this - hopefully that's what you were looking for.
Yep, try one of these:
  • Get the skill ID for the next action:

    $gameTroop.members()[0].currentAction().item().id
  • Get the skill ID for the action after the next action (a.k.a. "second" action):

    $gameTroop.members()[0].action(1).item().id
These are for enemy index 0 (the first enemy in the troop). Replace the 0 if needed.

By default enemies generate their action list in the "input" phase. So for turn-based mode, you could set this up in a troop event with condition "Turn 1*X". For time-progress mode, you may need a plugin of some kind, since in that case enemies (like actors) decide their actions on the spot.

Alternatively you could use troop events, e.g. with "Turn 0"/"End of turn" conditions, to manually turn on/off switches and thereby completely control the enemy's AI.

[Edit: replaced ._actions[1] with .action(1). I'd forgotten about that getter.]
Oh great, thank you both @caethyril, @ATT_Turan very much, this is exactly what I was looking for!

Original thread: https://forums.rpgmakerweb.com/threads/a-way-to-know-which-skill-an-enemy-will-use.152576/