In a mixing bowl, combine the eggs, coconut milk, white sugar, Thai chili paste, oyster sauce, and light soy sauce. Using a whisk, blend these ingredients until smooth.
Place a wok over low heat and pour in the oil. Once the oil is warm, add the chopped garlic and yellow curry paste. Stir-fry for about 10 seconds, until the mixture is fragrant.
Add the crab pieces and onions and mix well with the yellow curry powder.
Cover the wok with a lid and adjust the heat to low-medium. Allow the mixture to simmer for about 3 minutes, or until the crab is fully cooked through.
Uncover and pour in the sauce prepared in Step 1. Toss the ingredients together to ensure they are evenly coated, and cook until the eggs have set. Stir in the chopped chilies and celery, then immediately remove the wok from heat. Transfer your Thai crab curry to a serving plate and enjoy while hot.