Can you use green-flame blade and booming blade with Extra Attack, opportunity attacks, Sneak Attack, and other weapon attack options?

Introduced in the Sword Coast Adventurer’s Guide, the green-flame blade and booming blade spells pose a number of questions, because they each do something unusual: require you to make a melee attack with a weapon as part of the spell’s casting.

First, each of these spells involves a normal melee weapon attack, not a spell attack, so you use whatever ability modifier you normally use with the weapon. (A spell tells you if it includes a spell attack, and neither of these spells do.) For example, if you use a longsword with greenflame blade, you use your Strength modifier for the weapon’s attack and damage rolls.

Second, neither green-flame blade nor booming blade works with Extra Attack or any other feature that requires the Attack action. Like other spells, these cantrips require the Cast a Spell action, not the Attack action, and they can’t be used to make an opportunity attack, unless a special feature allows you to do so.

Third, these weapon attacks work with Sneak Attack if they fulfill the normal requirements for that feature. For example, if you have the Sneak Attack feature and cast green-flame blade with a finesse weapon, you can deal Sneak Attack damage to the target of the weapon attack if you have advantage on the attack roll and hit.