A command sequence save usually provides the best template for a PCI, because it supplies all of the relevant information to recreate the geometry and other information.
User variables can be added during a command save or added later along with flow control directives where appropriate to add parametric capability.