Blight-resistant rice lines are the most effective solution for bacterial blight, caused by Xanthomonas oryzae pv. oryzae (Xoo). Key resistance mechanisms involve SWEET genes as susceptibility factors. Bacterial transcription activator-like (TAL) effectors bind to effector-binding elements (EBEs) in SWEET gene promoters and induce SWEET genes. EBE variants that cannot be recognized by TAL effectors abrogate induction, causing resistance. Here we describe a diagnostic kit to enable analysis of bacterial blight in the field and identification of suitable resistant lines. Specifically, we include a SWEET promoter database, RT–PCR primers for detecting SWEET induction, engineered reporter rice lines to visualize SWEET protein accumulation and knock-out rice lines to identify virulence mechanisms in bacterial isolates. We also developed CRISPR–Cas9 genome-edited Kitaake rice to evaluate the efficacy of EBE mutations in resistance, software to predict the optimal resistance gene set for a specific geographic region, and two resistant ‘mega’ rice lines that will empower farmers to plant lines that are most likely to resist rice blight.