Magic Shards and Skill Level Mastery

Hey guys I have a question about yanfly skill mastery plugin(http://www.yanfly.moe/wiki/Skill_Mastery_Levels_(YEP)), I am also using galvs shards (https://galvs-scripts.com/2015/11/18/mv-magic-shards/). what I want to do is equip shards to learn skills temporary, but after the skill reaches a certain mastery level, the skill is then permanently learnt. is that possible?

i have tried

Code:
<After Eval>
if (user.skillMasteryLevel(item.id) >= 1) {
  user.learnSkill(item.id);
}
<After Eval>

but that doesn't work, I think its because galvs plugin forgets the skill when it is unequipped

can you help a guy out 😉
because item.id isn't called anywhere inside that function you made.
but I dont know lunatic code though, but you miss something important.

Original thread: https://forums.rpgmakerweb.com/threads/magic-shards-and-skill-level-mastery.125225/