Have (something) down pat

To have learned or memorized something perfectly.

I have the dance routine down pat.