a, Workflow schematic. scRNA-seq and scTCR-seq were performed on T cells sorted from vitiligo-affected skin, tumor and peripheral blood. b, UMAP projection of CD8+ T cells from skin, tumor and blood of four patients. Each dot corresponds to one single cell colored according to tissue (left) or patient identity (right). c, Feature plots demonstrating the expression of marker genes for CD8+ T-cell residency (CD69, RGS1) or recirculation (S1PR1, SELL). Color scale represents normalized gene expression level. d, UMAP projection of 10,658 CD8+ T cells from skin, tumor and blood of four patients, forming ten distinct clusters designated C1–C10 (colored as shown in the legend), with cluster names assigned based on inferred function. e, Attribution of each specimen type to each cluster. The ratio between observed cell number and random expected cell number calculated by chi-square test (Ro/e) was used to evaluate enrichment, with Ro/e > 1 indicating enrichment; colors indicate specimen types; black dots represent individual patients. Bars depict means with error bars representing s.e.m. for n = 4 patients; *P < 0.05; **P < 0.01, by one-sided paired Student’s t-test. f, Heatmap of differentially expressed genes (rows) in cells from different clusters (columns) of four patients. Heatmap colors indicate Z-transformed expression of genes in each row, with scale depicted in legend. Annotations (right) highlight representative genes with high differential gene expression within each cluster, relative to other clusters. Colors of gene names indicate corresponding clusters in d.