Some aspects of this disclosure provide compositions, methods, systems, and kits for controlling the activity and/or improving the specificity of RNA-programmable proteins, such as Cas9. For example, provided are guide RNAs (gRNAs) that are engineered to exist in an “on” or “off” state, which control the binding and, in certain instances, cleavage activity of RNA-programmable proteins (e.g., RNA-programmable endonucleases). By incorporating ligand-responsive self-cleaving catalytic RNAs (aptazymes) into guide RNAs, a set of aptazyme-embedded guide RNAs was developed that enable small molecule-controlled nuclease-mediated genome editing and small molecule-controlled base editing, as well as small molecule-dependent transcriptional activation in mammalian cells.