1. Press 'K' to open the jsmacros gui(this can be changed in the vanilla controls setting)
2-4. create a macro
6. Write and save your scriptscripts are written in js (or another guest language provided by one of the extensions). Libraries are basically just objects that are loaded into the script above the first line, so you can just call them without any importing.