Place the chili flakes in a heatproof bowl and set aside.
Heat the avocado oil in a small pot with the Sichuan peppercorns, star anise, cinnamon, garlic, and ginger over medium-low heat. Simmer gently for 8-10 minutes until the aromatics turn golden and fragrant.
Strain out the solids, discarding them, and let the oil cool for 1-2 minutes so it's hot but not smoking.
Carefully pour the hot oil over the chili flakes in three stages, stirring between each pour, to avoid scorching them.
Stir in salt. Let cool completely before transferring to a jar. Keeps at room temperature for up to a month.
Notes
Makes about 1 cup. Pouring the oil in stages rather than all at once keeps the chili flakes from burning and turning bitter.