If using live coconut crabs, humanely kill them by placing them in the freezer for about 30 minutes before cooking.
Clean the crabs by removing the gills and any inedible parts. Rinse well under cold water.
In a large pot, bring enough water to a boil to cover the crabs. Add a pinch of salt.
Add the crabs to the boiling water and cook for about 10-15 minutes, or until the shells turn bright red and the meat is cooked through.
Remove the crabs from the pot and let them cool. Once cool enough to handle, crack the shells and remove the meat. Set aside.
In a large skillet or wok, heat the vegetable oil over medium heat.
Add the finely chopped onion, minced garlic, and minced ginger. Sauté until the onion is translucent and fragrant, about 5 minutes.
Stir in the ground turmeric and ground black pepper.
Add the coconut milk, soy sauce, and lime juice to the skillet. Stir to combine.
Bring the mixture to a simmer and cook for about 5-7 minutes, allowing the flavors to meld and the sauce to thicken slightly.
Add the cooked crab meat to the skillet and stir gently to coat the meat with the sauce. Cook for an additional 2-3 minutes to heat through.
If using, stir in the finely chopped red chili peppers for heat.
Remove from heat and garnish with fresh cilantro or parsley.
Enjoy your meal!