Generate cls_spec from class name