Yanfly SkillCore - Check number of items

I'm using Yanfly's SkillCore plugin and I have just one function I need that I'm not sure how to achieve. This is the example that the plugin's help file gives:

For those who would like to show certain skills and disable them under any


custom conditions using their JavaScript knowledge, use the following:


Skill Notetag:


<Custom Show Eval>


if (user.level > 50) {


visible = true;


} else {


visible = false;


}



I have the plugin "SkillCostsItems" and now I just want to make sure that the skills you can't afford aren't shown in your skill list. This seems like it will be the solution, so I just need another variable than "user.level" to reflect on an individual item instead. Appreciate any and all help!
Use:


$gameParty.numItems($dataItems[itemID]);


to get the number of items in a party.


Simply replace "itemID" with the ID of the Item you wish to check.


For example:


if($gameParty.numItems($dataItems[5]) > 10) {
}


Checks to see if the party has more than 10 of Item ID 5
You might be able to get away with


if (item.isCurrentItemEnabled) {


as the first line after the <Custom Show Eval> for all skills that you want to hide when the player can't afford them.  But if that doesn't work, I think @SumRndmDde's solution above should be solid.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-skillcore-check-number-of-items.67190/