MZ Open battle skill window with a common event?

I am currently in the process of trying to alter the actor command window, and for this I need a way to open the current actor's skill select window via a script call or common event. The idea is to have certain actions mapped to button inputs similar to persona 5.

I only plan on having 3 skill types (Physical, Magic, and Special) so the inputs would look like this:
Actor command window -> Open skill type select -> Press Down, Left, or Right to open the corresponding skill type's window.

I have all of Visustella's 8 wave collection and am using the STB system if there's an option in one of the plugins to call the skill window.

Some simple script call to open the battle skill window is really all I need but I can't seem to find any way to open just the skill select for MZ.
This is the stuff that opens it in base game (just put a number in the setStypeId parentheses). But I quickly tried it and even though it does open the skill window, you'll get an error when the game advances to next turns and it can't find the object it tries to check lastSkill for, so you'd have to know how to work around that.

Scene_Battle.prototype.commandSkill = function() {
this._skillWindow.setActor(BattleManager.actor());
this._skillWindow.setStypeId(this._actorCommandWindow.currentExt());
this._skillWindow.refresh();
this._skillWindow.show();
this._skillWindow.activate();
this._statusWindow.hide();
this._actorCommandWindow.hide();
};
This is the stuff that opens it in base game (just put a number in the setStypeId parentheses). But I quickly tried it and even though it does open the skill window, you'll get an error when the game advances to next turns and it can't find the object it tries to check lastSkill for, so you'd have to know how to work around that.

Scene_Battle.prototype.commandSkill = function() {
this._skillWindow.setActor(BattleManager.actor());
this._skillWindow.setStypeId(this._actorCommandWindow.currentExt());
this._skillWindow.refresh();
this._skillWindow.show();
this._skillWindow.activate();
this._statusWindow.hide();
this._actorCommandWindow.hide();
};
Unfortunately for some reason I cant seem to get this to work, anywhere I put the number either doing nothing or causing an error. And I tried it on a blank project with no plugins just to be sure.
While looking through the .js files for help I did at least find what seems to control the last used skill.

Scene_Battle.prototype.onSkillOk = function() {

const skill = this._skillWindow.item();

const action = BattleManager.inputtingAction();

action.setSkill(skill.id);

BattleManager.actor().setLastBattleSkill(skill);

this.onSelectAction();

};

Will try experimenting some more to figure out what I'm doing wrong 😔
That was just the function doing the stuff. I think you need to put it like below (works for me). But yeah, I just posted what looks like opens the skill window, haven't tried checking what you should do to make what you want functional.

SceneManager._scene._skillWindow.setActor(BattleManager.actor());
SceneManager._scene._skillWindow.setStypeId(1);
SceneManager._scene._skillWindow.refresh();
SceneManager._scene._skillWindow.show();
SceneManager._scene._skillWindow.activate();
SceneManager._scene._statusWindow.hide();
SceneManager._scene._actorCommandWindow.hide();

Original thread: https://forums.rpgmakerweb.com/threads/open-battle-skill-window-with-a-common-event.177993/