Refactor share index action to a clean spec