Heat ghee in a saucepan over medium heat. Sauté onions until soft, about 7 minutes. Add garlic and sauté until fragrant, about 2 minutes.
Place onions, garlic, sardines, avocado, lemon juice, lemon zest and cayenne pepper in a food processor and blend until smooth. Serve with cucumber slices for dipping.