How can I make a skill that requires a certain item to be used?

Hi, I am trying to make a skill that requires...let's say a potion to be used.
When the skill is used, you should lose one potion, as you are using it.
If there is no potion in your inventory, you can't use the skill.
How can I make this? I've seen this been done in other versions of RPG maker, I'm sure it's possible with MZ. I hope.
VisuStella's Skills and States Core can do this.
You can also do it without a plugin, but it can be more complicated
You can also do it without a plugin, but it can be more complicated
I'm sorry, but that makes no sense.

Your first screenshot shows a script call which is not even close to any valid code.

You show a state with auto battle which has nothing to do with the question.

Sealing skills does not prevent them from being shown in the skill list, so the user would see the skill twice.

And whichever one you're starting with, there's nothing stopping them from using that skill with no potion in the inventory.
VisuStella's Skills and States Core can do this.
Thanks, will look into that one. Completely forgot that existed

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-make-a-skill-that-requires-a-certain-item-to-be-used.171517/