The use of modern technology to improve skin disease diagnosis includes things like artificial intelligence (AL), deep learning (DL) and computer vision. Medical images of skin lesions, dermatoscopic images, or thermal imaging can be analyzed by automated algorithms and image processing techniques to diagnose skin diseases. Diseases can cause physical and emotional suffering, making them silent killers. Extreme instances might cause skin cancer. skin disease diagnosis from clinical photographs is a key medical image processing challenge. Manual skin diagnosis takes time and it is subjective for doctors. Computerized skin disease prediction can simplify patient and dermatologist treatment planning. To tackle these issues, we proposed a genetic optimization and supervised K-Nearest Neighbor (MGO-SKNN) technique for detecting advanced skin diseases. The research gathers clinical data for detecting advanced skin diseases. Three methods were used to preprocess our data: noise reduction, hair removal and image resizing. The Grey Level Co-Occurrence Matrix (GLCM) approach was used in this work to extract features. The integration of image processing into MGO-SKNN represents a significant step forward in the quest for accurate, efficient and cutting-edge skin disease diagnosis. The metrics like accuracy (97.53%), precision (95.20%), recall (96.74%) and f1-score (98.06%) of our suggested technique, MGO-SKNN, exceed the traditional approaches for skin detection.