Abstract While individuals of European descent have a higher risk of skin cancer, other ancestries tend to have more advanced disease at diagnosis, resulting in outcome disparities. We examine the diverse All of Us dataset and identify genetic ancestries, lifestyle, social determinants of health and PDE5a inhibitor use as independent risk factors for skin cancer. We integrate these risk factors into a highly accurate XGBoost multiethnic model for identifying patients with skin cancer. Analyses of Shapley scores and interactions indicate the presence of strong non-linear associations between age and other risk factors, in particular cancer history, genetic ancestry and annual income, and suggest a stronger dependence on genetic and social determinants in younger individuals. Our XGBoost multiethnic model offers a precision medicine approach for early skin cancer detection in ethnically diverse patients, which could reduce outcome disparities in individuals of non-European ancestries.