In this paper, we propose a transmission mechanism for a reconfigurable intelligent surface (RIS)-assisted millimeter wave (mmWave) system based on cluster index modulation (CIM), named best-gain optimized cluster selection CIM (BGCS-CIM). The proposed BGCS-CIM scheme considers effective cluster power gain and spatial diversity gain obtained by the additional paths within the indexed cluster to construct an efficient codebook. We also integrate the proposed scheme into a practical system model to create a virtual path between transmitter and receiver where the direct link has been blocked. Thanks to the designed whitening filter, a closed-form expression for the upper bound on the average bit error rate (ABER) is derived and used to validate the simulation results. It has been shown that the proposed BGCS-CIM scheme outperforms the existing benchmarks thanks to its higher effective cluster gain, spatial diversity of indexed clusters, and lower inter-cluster interference.