Check if a skill is being used outside of combat

I'm trying to make a puzzle in my game and I'm trying to make the solution to the puzzle the use of a skill. However, I cannot figure out how to check if the player is using the skill on the event. I don't want to make it obvious because the puzzle is supposed to be difficult. Because of that, I also can't see if the player knows the skill. How can I check to see if the player is using a skill in front of the event?
You can make an event around the puzzle that checks if the player is looking at it. If it is, set a variable to a X value. If not, set it back to 0 or whatever other value.
For example:
1577713187012.png


The red squares would be this event:

1577713099289.png


And the cyan squares (specifically, in this print the yellow one) would be like this:
1577713455474.png


Then go into the skill, and add a Common Event in 'Effects':
1577713610327.png


And in this Common Event would be the events leading to the puzzle's completion.
1577713641344.png

Original thread: https://forums.rpgmakerweb.com/threads/check-if-a-skill-is-being-used-outside-of-combat.116746/