Thinly slice a habanero pepper, reserve the stem slice for garnish.
Add tequila, pineapple juice, lime juice and agave to a cocktail shaker. Add 1 to 3 slices of habanero to the cocktail shaker, depending on your desired spice level. Add ice to the shaker and shake until chilled.
Add Tajin to a shallow dish. Run a lime wedge over the rim of a cocktail glass and dip into the Tajin to coat the rim of the glass. Fill the glass with ice.
Strain the cocktail mixture into the prepared glass. If desired, garnish with a pineapple slice and frond and the habanero stem.