01 - In a large bowl, rub together flour, salt, and cold butter until mixture resembles breadcrumbs. Gradually add cold water, mixing until dough forms. Shape into a disk, wrap, and chill for 20 minutes.
02 - Melt butter in a skillet over medium heat. Add onions and cook gently for 8 to 10 minutes until soft and translucent without browning. Remove from heat and let cool slightly.
03 - In a bowl, mix cooked onions, grated cheddar, cream cheese, mustard, black pepper, salt, and herbs if using until fully combined.
04 - Preheat oven to 400°F (200°C). Line a baking tray with parchment paper.
05 - On a lightly floured surface, roll pastry to approximately 1/8 inch (3 mm) thickness. Cut into four 7-inch (18 cm) circles.
06 - Spoon cheese and onion filling onto one half of each circle, leaving a 1 cm border. Brush edges with beaten egg.
07 - Fold pastry over filling to form half-moon shapes. Press edges to seal, then crimp with a fork. Place assembled pasties on prepared tray.
08 - Brush each pasty with remaining beaten egg. Create a small slit on top of each to allow steam to escape during baking.
09 - Bake in preheated oven for 30 to 35 minutes until golden brown and crisp.
10 - Allow pasties to cool slightly before serving warm or at room temperature.