I finally learned how the alias command works:
You can use alias <command_name>:<command> to temporary set a command.
I.e. alias assist_tank:assist %t
%t will be replaced with the name of your target at the time of the alias command.
Now you can use assist_tank to assist your tank no matter who you have targeted or changing a macro by hand.