apply hold as a bonus action first i.e, custom bonus action spell effect... personally i'd use a summon which turns invis and just has this custom attack mode [X per rest] as that is very easy to code and does the same thing
Luke Skywalker: I don't, I don't believe it. Yoda: That is why you failed.