know every trick in the book
To be aware of or knowledgeable in every possible way to do or achieve something, especially ways that are clever, cunning, or ethically questionable. My dad was a shrewd businessman who knew every trick in the book to seal a deal. If you want girls to be interested in you, my older brother knows every trick in the book.