This video explains how you can create, run and use SKILL scripts to create your own commands in Cadence Allegro.
The source code of the example script from the video can be downloaded from here: https://github.com/FEDEVEL/allegro-script-add_layer_name