In this study, we performed in vivo diagnosis of skin cancer based on implementation of a portable low‐cost spectroscopy setup combining analysis of Raman and autofluorescence spectra in the near‐infrared region (800–915 nm). We studied 617 cases of skin neoplasms (615 patients, 70 melanomas, 122 basal cell carcinomas, 12 squamous cell carcinomas and 413 benign tumors) in vivo with a portable setup. The studies considered the patients examined by GPs in local clinics and directed to a specialized Oncology Dispensary with suspected skin cancer. Each sample was histologically examined after excisional biopsy. The spectra were classified with a projection on latent structures and discriminant analysis. To check the classification models stability, a 10‐fold cross‐validation was performed. We obtained ROC AUCs of 0.75 (0.71–0.79; 95% CI), 0.69 (0.63–0.76; 95% CI) and 0.81 (0.74–0.87; 95% CI) for classification of a) malignant and benign tumors, b) melanomas and pigmented tumors and c) melanomas and seborrhoeic keratosis, respectively. The positive and negative predictive values ranged from 20% to 52% and from 73% to 99%, respectively. The biopsy ratio varied from 0.92:1 to 4.08:1 (at sensitivity levels from 90% to 99%). The accuracy of automatic analysis with the proposed system is higher than the accuracy of GPs and trainees, and is comparable or less to the accuracy of trained dermatologists. The proposed approach may be combined with other optical techniques of skin lesion analysis, such as dermoscopy‐ and spectroscopy‐based computer‐assisted diagnosis systems to increase accuracy of neoplasms classification.