refact skynet_command code.