Need Help on custom skills!!!

Hi everyone! I am a beginner of RPG maker MV. I want to create a skill which has the effect like: "If an enemy was executed by this skill, permanently increase the ability of the caster (such like attack, resis or Max HP) for x."

Does anyone know how to achieve this in the game? Or does anyone know any plugin which can do this? I would be very appreciated and happy for any help.
Yanfly Skill Core using after eval which processes after the damage is done.
Code:
 <After Eval>
// Check if the user is an actor, target is an enemy, and the target has been slain.
if (user.isActor() && target.isEnemy() && (target.isDead() || target.hp <= 0)) {
// adds 10 to max hp
user.addMaxHp(10);
// adds 1 to param(2) which is atk, change number to specific stat
user._paramPlus[2] += 1;
// if you want to show an animation on actor who gained stats
user.startAnimation(4);
// optional if you want to have a message appear saying you gained stats.
var logWindow = SceneManager._scene._logWindow;
var msg = '<CENTER>' + user.name() + " feels stronger!";
    logWindow.addText(msg);
  BattleManager.actionWaitForAnimation();
  logWindow.push('clear'); }
</After Eval>

Parameter IDs
0 - Max HP
1 - Max MP
2 - Attack
3 - Defence
4 - Magic Attack
5 - Magic Defence
6 - Agility
7 - Luck

Added some optional stuff like animations or text but this is the jist of it.
Also you can add user.gainHp(10); after user.addMaxHp(10); if you want them to gain the hp on the spot, currently it just adds to max hp and doesnt change current life total.
Yanfly Skill Core using after eval which processes after the damage is done.
Code:
 <After Eval>
// Check if the user is an actor, target is an enemy, and the target has been slain.
if (user.isActor() && target.isEnemy() && (target.isDead() || target.hp <= 0)) {
// adds 10 to max hp
user.addMaxHp(10);
// adds 1 to param(2) which is atk, change number to specific stat
user._paramPlus[2] += 1;
// if you want to show an animation on actor who gained stats
user.startAnimation(4);
// optional if you want to have a message appear saying you gained stats.
var logWindow = SceneManager._scene._logWindow;
var msg = '<CENTER>' + user.name() + " feels stronger!";
    logWindow.addText(msg);
  BattleManager.actionWaitForAnimation();
  logWindow.push('clear'); }
</After Eval>

Parameter IDs
0 - Max HP
1 - Max MP
2 - Attack
3 - Defence
4 - Magic Attack
5 - Magic Defence
6 - Agility
7 - Luck

Added some optional stuff like animations or text but this is the jist of it.
Also you can add user.gainHp(10); after user.addMaxHp(10); if you want them to gain the hp on the spot, currently it just adds to max hp and doesnt change current life total.
Thank you so much for this !!!

Original thread: https://forums.rpgmakerweb.com/threads/need-help-on-custom-skills.120797/