Heat 1tbsp oil in a pan; add the red chilies, green chilies, mustard seeds, urad dal and asafoetida. Cook till the seeds start to splutter. Remove from the pan and set aside.
In the same pan, heat 1tbsp oil and add the chopped onions. Cook till the onions turn lightly golden.
Grind all the fried ingredients to a smooth paste along with cilantro, tamarind and salt.
Serve with rice, idli or dosa.