Do you need the stage name for logging/debugging message flow or for any other purpose?
If you need it just for logging/debugging then it would be easier to just pass the different stage names from each stage as and when needed at design time itself.
Alternatively you can have a global variable within Proxy called $stage or $stageName and assign the stage name to this variable as first step in each stage. This way you will have the current stage name in the $stage variable.
Also, if you are using OSB Log action then it automatically published the OSB stage name as well so you dont need to separately fetch it.