I’ve done this enough times I chain the desired command and the cd together:
cd ~/x/y/z && my-command
So that when I CTRL-R for my-command it automatically reminds me.