A lightweight and fast skew detection and recognition method is proposed to address low detection accuracy, slow speed, and the inability to detect skewed spray codes on complex background packaging. Built upon the YOLOv5-obb network, the approach utilizes the Ghost module to lightweight the backbone network, reducing parameters and computations. The introduction of the Slim-neck lightweight feature fusion network structure in the neck further simplifies the model while enhancing detection accuracy. SimAM is added to both the backbone and neck to improve overall detection and recognition rates. In post-processing, a method for merging scene text characters is proposed to address skewed text merging. The final model reduces in size by 39.3%, achieving recognition rates, recall rates, and average precision means of 99.0%, 99.8%, and 99.2% for spray code character detection. The algorithm enables fast and accurate detection of skewed spray codes, providing support for rapid detection in relevant fields.