How do I make an image appear during an attack?

I'm trying to make a Persona like game. I'm having trouble figuring out how to run a common event that precisely shows the image during an attack and then erases it after an attack. I'm having trouble figuring out what I order I need to put yanfly's action sequences and the image in order to run the common event during an attack.
1628794098763.png

I don't want the common event however to be just for every skill rather than every time the character uses a "Magic Attack" the image will appear in the animation and attack.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-an-image-appear-during-an-attack.139516/