In a cocktail shaker with ice, add the tequila, lime juice, triple sec and agave syrup. Shake vigorously to combine. Strain into 4 tall shot glasses.
Mix the sugar and salt together onto a small plate. Dip each lime slice into the sugar mixture, shaking off any excess. Place a slice of lime on top of each of the shot glasses, then place a sugar cube on top of each lime. Pour a dash of the rum over each sugar cube. Using a long match or fire starter, ignite the sugar cubes, and when the sugar begins to caramelize, blow out the flame. Fold the lime slice and drop it into the shot with the sugar cube, and serve immediately.