BackgroundMelanoma is a highly aggressive tumor, predominantly found in the skin, recognized as skin cutaneous melanoma (SKCM). Lymph node metastasis is commonly used as the route of metastasis in SKCM, necessitating the discovery of prognostic genes associated with this process for improved prognosis. MethodsThe prognostic significance of lymph node metastasis in SKCM was assessed through Kaplan-Meier analysis in SEER and TCGA-SKCM datasets. Prognostic genes were identified and a prognostic risk model was constructed Enrichment analysis and immune cell infiltration analysis were also carried out.Moreover, a validation in vitro and in vivo were conducted by CCK8,flow cytometry,transwell and animal study. ResultsThe Kaplan-Meier survival curve revealed that patients with lymph node metastasis had a worse prognosis compared to those without. FCGR3B and PRF1 were screened by TCGA analysis.Additionally, significant differences in nine immune cell types were observed between the two risk groups. Notably, a strong positive association with CD8 T cells and a negative relationship with M2 macrophages were exhibited by PRF1. The validation of our nomogram were conducted in vitro and in vivo, and the results showed the correlations between CD8+ T cell and PRF1. ConclusionIn summary, two prognostic genes (FCGR3B and PRF1) were identified, and a prognostic risk model was developed for SKCM. These findings provide a novel approach for the diagnosis and treatment of SKCM.