In a large (at least 12-inch), deep broiler-safe skillet over medium heat, heat 3 tablespoons of the oil until shimmering. Add the onion, salt, pepper and red pepper flakes. Cook, stirring occasionally, until the onion lightly browns and softens, 8 to 10 minutes. Add the garlic and mustard powder and cook, stirring, until fragrant, about 1 minute.
Add the beans and cook, stirring frequently, until warmed through, about 5 minutes. Reduce the heat to medium-low, add the gruyere and cheddar, and cook, stirring, until melted, 1 to 2 minutes. Remove from the heat.
Position a rack about 6 inches away from the broiling element and preheat the broiler on HIGH.
In a medium bowl, thoroughly mix together the panko, parmesan and the remaining 3 tablespoons of oil. (You want the crumbs to be damp.) Top the beans with the panko mixture; it might seem like a lot of topping, but persevere, because you’ll want all the crunch.
Transfer the skillet to the oven and broil for 1 to 2 minutes, keeping a close eye on it the whole time, until the topping looks golden and toasty.
Garnish with the thyme leaves, if using, and serve warm.
